forked from radareorg/radare2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
115 lines (95 loc) · 4.48 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Version format
version: git-{build}
# Skip Github tags
skip_tags: true
# VM Template
image: Visual Studio 2015
# Clone depth
clone_depth: 1
# Branches to clone
branches:
only:
- master
# Environment variables
environment:
nodejs_version: "Stable"
matrix:
# TODO Add missing build platforms
# MSVC CCCL 64
# - builder: msvc_cccl_64
# VS2015 64
- builder: vs2015_64
PYTHON: 'C:\\Python36-x64'
BUILD_DIR: build
# VS2015 32
- builder: vs2015_32
PYTHON: 'C:\\Python36'
BUILD_DIR: build
# VS2015 64 (Dynamic linking)
- builder: vs2015_64_dyn
PYTHON: 'C:\\Python36'
BUILD_DIR: build
NINJA_URL: https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip
# MINGW32 Variables
#- builder: mingw32
# EXP_PATH: '/c/mingw/bin:/c/mingw/msys/1.0/bin:/c/Program\ Files\ \(x86\)/Git/bin'
# MSYS2 Variables
#- builder: msys2
# MSYS2_DIR: msys64
# MSYS2_ARCH: x86_64
# MSYSTEM: MINGW64
## CYGWIN32 Variables
#- builder: cygwin32
# init_command: git config --global core.autocrlf input
# CYG_CACHE: 'C:\cygwin\var\cache\setup'
# CYG_BASH: 'C:\cygwin\bin\bash'
# ZIP_ROOT: '%APPVEYOR_BUILD_FOLDER%\zip'
# Init
init:
# Build dependant custom commands
- cmd: "%init_command%"
# Required softwares for building
install:
# Update environment variables
- ps: $env:R2_VERSION = ( python sys\\version.py )
- ps: $env:DIST_FOLDER = "radare2-$env:builder-$env:R2_VERSION"
- ps: $env:ARTIFACT_ZIP = "$env:DIST_FOLDER.zip"
# Download required packages
- cmd: if defined BUILD_DIR ( %PYTHON%\python.exe -m pip install meson )
- cmd: if defined NINJA_URL ( powershell -Command wget %NINJA_URL% -OutFile ninja.zip && unzip ninja.zip )
# Build scripts
build_script:
- appveyor AddMessage "Compiling radare2 %R2_VERSION% (%builder%)"
- if %builder% == msvc_cccl_64 ( sys\msvc.bat && make windist WINBITS=%builder% )
- cmd: if %builder% == vs2015_64 ( set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && python sys\meson.py --backend vs2015 --release --xp --install="%DIST_FOLDER%" && zip -r %ARTIFACT_ZIP% %DIST_FOLDER% )
- cmd: if %builder% == vs2015_32 ( set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 && python sys\meson.py --backend vs2015 --release --xp --install="%DIST_FOLDER%" && zip -r %ARTIFACT_ZIP% %DIST_FOLDER% )
- cmd: if %builder% == vs2015_64_dyn ( set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && python sys\meson.py --release --shared --install="%DIST_FOLDER%" && zip -r %ARTIFACT_ZIP% %DIST_FOLDER% )
- cmd: if %builder% == mingw32 ( set "PATH=%EXP_PATH%;%PATH%" && sh -c "CC=mingw32-gcc-5.3.0 ./configure --with-ostype=mingw32 && make" && sh -c "make windist WINBITS=%builder% ZIPNAME=%ARTIFACT_ZIP%" )
- cmd: if %builder% == msys2 ( set && set PATH=C:\%MSYS2_DIR%\%MSYSTEM%\bin;C:\%MSYS2_DIR%\usr\bin;"%PATH%" && echo "%PATH%" && sh.exe -c "export PATH=${PATH}:/mingw64/bin; ./configure --build=i686-unknown-windows-gnu ; mingw32-make -j1 ; mingw32-make windist WINBITS=%builder%" )
- cmd: if %builder% == cygwin32 ( %CYG_BASH% -lc "gcc -v" && %CYG_BASH% -lc "uname | tr 'A-Z' 'a-z'" && %CYG_BASH% -lc 'cd $APPVEYOR_BUILD_FOLDER; ./configure --prefix=/usr/local' && %CYG_BASH% -lc 'cd $APPVEYOR_BUILD_FOLDER; make' && %CYG_BASH% -lc 'cd $APPVEYOR_BUILD_FOLDER; make windist WINBITS=%builder%' )
test_script:
- set PATH=%APPVEYOR_BUILD_FOLDER%\%DIST_FOLDER%;%PATH%
- echo %PATH%
- where radare2
- radare2 -v
- ps: Install-Product node $env:nodejs_version
- node --version
- git clone https://github.com/radare/radare2-regressions
- cd radare2-regressions/new
- npm install
- set NOOK=1
- node bin/r2r.js
- cd ../..
after_test:
- git clone https://github.com/radare/radare2-win-installer
- set PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5"
- iscc radare2-win-installer/radare2.iss /DRadare2Location=..\%DIST_FOLDER%\* /DLicenseLocation=..\COPYING.LESSER /DIcoLocation=radare2.ico /DMyAppVersion=%R2_VERSION%
- move radare2-win-installer\Output\radare2.exe radare2_installer-%builder%.exe
# Artifacts
artifacts:
# Binaries
- path: "%ARTIFACT_ZIP%"
# Inno Setup files
- path: radare2_installer-%builder%.exe
# Disable deployment
deploy: off