2017-05-18 16:50:52 +02:00
|
|
|
# Version format
|
2017-06-08 05:32:17 +02:00
|
|
|
version: git-{build}
|
2017-05-18 16:50:52 +02:00
|
|
|
|
|
|
|
# Skip Github tags
|
|
|
|
skip_tags: true
|
|
|
|
|
|
|
|
# VM Template
|
2019-03-08 22:21:25 +08:00
|
|
|
image: Visual Studio 2017
|
2017-05-18 16:50:52 +02:00
|
|
|
|
|
|
|
# Clone depth
|
|
|
|
clone_depth: 1
|
|
|
|
|
|
|
|
# Branches to clone
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
|
|
|
# Environment variables
|
|
|
|
environment:
|
2017-12-02 16:42:47 +01:00
|
|
|
nodejs_version: "Stable"
|
2019-03-08 22:21:25 +08:00
|
|
|
NINJA_URL: https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-win.zip
|
|
|
|
VSVARSALLPATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat'
|
2017-12-02 16:42:47 +01:00
|
|
|
|
2017-05-18 16:50:52 +02:00
|
|
|
matrix:
|
2019-03-08 22:21:25 +08:00
|
|
|
# VS2017 64
|
|
|
|
- builder: vs2017_64
|
|
|
|
PYTHON: 'C:\\Python37-x64'
|
2017-05-18 16:50:52 +02:00
|
|
|
BUILD_DIR: build
|
2019-03-08 22:21:25 +08:00
|
|
|
# VS2017 64 (Dynamic linking)
|
|
|
|
- builder: vs2017_64_dyn
|
|
|
|
PYTHON: 'C:\\Python37'
|
2017-06-26 14:14:38 +02:00
|
|
|
BUILD_DIR: build
|
2019-08-16 07:10:00 +03:00
|
|
|
# Clang-cl 64 (Dynamic linking)
|
|
|
|
- builder: clang_cl_64_dyn
|
|
|
|
PYTHON: 'C:\\Python37'
|
|
|
|
BUILD_DIR: build
|
2017-05-18 16:50:52 +02:00
|
|
|
|
|
|
|
# Init
|
|
|
|
init:
|
2019-06-18 13:13:08 +08:00
|
|
|
# Build dependent custom commands
|
2017-05-18 16:50:52 +02:00
|
|
|
- cmd: "%init_command%"
|
|
|
|
|
2019-06-18 13:13:08 +08:00
|
|
|
# Required software for building
|
2017-05-18 16:50:52 +02:00
|
|
|
install:
|
2017-06-05 11:00:51 +02:00
|
|
|
# Update environment variables
|
2017-06-29 17:35:40 +02:00
|
|
|
- ps: $env:R2_VERSION = ( python sys\\version.py )
|
|
|
|
- ps: $env:DIST_FOLDER = "radare2-$env:builder-$env:R2_VERSION"
|
2017-06-05 11:00:51 +02:00
|
|
|
- ps: $env:ARTIFACT_ZIP = "$env:DIST_FOLDER.zip"
|
|
|
|
# Download required packages
|
2018-01-11 19:20:23 +03:00
|
|
|
- cmd: if defined BUILD_DIR ( %PYTHON%\python.exe -m pip install meson )
|
2018-02-23 12:57:19 +01:00
|
|
|
- cmd: if defined NINJA_URL ( powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget %NINJA_URL% -OutFile ninja.zip" && unzip ninja.zip )
|
2017-05-18 16:50:52 +02:00
|
|
|
|
|
|
|
# Build scripts
|
|
|
|
build_script:
|
2017-07-10 09:52:00 +02:00
|
|
|
- appveyor AddMessage "Compiling radare2 %R2_VERSION% (%builder%)"
|
2017-06-05 11:00:51 +02:00
|
|
|
|
2019-03-08 22:21:25 +08:00
|
|
|
- cmd: if %builder% == vs2017_64 ( set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "%VSVARSALLPATH%" x64 && python sys\meson.py --backend vs2017 --release --xp --install="%DIST_FOLDER%" --options static_runtime=true && 7z a %ARTIFACT_ZIP% %DIST_FOLDER% )
|
2017-06-26 14:14:38 +02:00
|
|
|
|
2019-03-08 22:21:25 +08:00
|
|
|
- cmd: if %builder% == vs2017_64_dyn ( set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "%VSVARSALLPATH%" x64 && python sys\meson.py --release --shared --install="%DIST_FOLDER%" && 7z a %ARTIFACT_ZIP% %DIST_FOLDER% )
|
2017-12-03 21:26:13 +01:00
|
|
|
|
2019-08-16 07:10:00 +03:00
|
|
|
- cmd: if %builder% == clang_cl_64_dyn ( set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "%VSVARSALLPATH%" x64 && set CC=clang-cl && python sys\meson.py --release --shared --install="%DIST_FOLDER%" && 7z a %ARTIFACT_ZIP% %DIST_FOLDER% )
|
|
|
|
|
2017-12-02 16:42:47 +01:00
|
|
|
test_script:
|
2019-06-20 20:30:08 -03:00
|
|
|
- set PATH=%APPVEYOR_BUILD_FOLDER%\%DIST_FOLDER%\bin;C:\msys64\mingw64\bin;%PATH%
|
2017-12-02 16:42:47 +01:00
|
|
|
- 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
|
2019-08-14 03:08:05 -03:00
|
|
|
- ps: $env:pull_owner=($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0]
|
2019-08-14 23:47:48 -03:00
|
|
|
- ps: if (-not [string]::IsNullOrWhiteSpace($env:pull_owner)) {cmd /c "(git fetch https://github.com/%pull_owner%/radare2-regressions %APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%:%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH% && git checkout %APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%) > nul 2>&1 || exit 0"} else {echo "Using master"}
|
2017-12-02 16:42:47 +01:00
|
|
|
- npm install
|
|
|
|
- set NOOK=1
|
2019-05-08 14:18:54 +02:00
|
|
|
- node_modules/.bin/r2r
|
2017-12-02 16:42:47 +01:00
|
|
|
- cd ../..
|
|
|
|
|
2017-06-05 11:00:51 +02:00
|
|
|
after_test:
|
|
|
|
- git clone https://github.com/radare/radare2-win-installer
|
|
|
|
- set PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5"
|
2017-06-29 17:35:40 +02:00
|
|
|
- iscc radare2-win-installer/radare2.iss /DRadare2Location=..\%DIST_FOLDER%\* /DLicenseLocation=..\COPYING.LESSER /DIcoLocation=radare2.ico /DMyAppVersion=%R2_VERSION%
|
2017-10-14 12:06:55 +02:00
|
|
|
- move radare2-win-installer\Output\radare2.exe radare2_installer-%builder%.exe
|
2017-06-05 11:00:51 +02:00
|
|
|
|
2017-05-18 16:50:52 +02:00
|
|
|
# Artifacts
|
|
|
|
artifacts:
|
2017-06-05 11:00:51 +02:00
|
|
|
# Binaries
|
|
|
|
- path: "%ARTIFACT_ZIP%"
|
|
|
|
# Inno Setup files
|
2017-10-14 12:06:55 +02:00
|
|
|
- path: radare2_installer-%builder%.exe
|
2017-05-18 16:50:52 +02:00
|
|
|
|
|
|
|
# Disable deployment
|
|
|
|
deploy: off
|
2017-06-05 11:00:51 +02:00
|
|
|
|