# Version format version: git-{build} # Skip Github tags skip_tags: true # VM Template image: Visual Studio 2017 # Clone depth clone_depth: 1 # Branches to clone branches: only: - master # Environment variables environment: nodejs_version: "Stable" 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' matrix: # VS2017 64 - builder: vs2017_64 PYTHON: 'C:\\Python37-x64' BUILD_DIR: build # VS2017 64 (Dynamic linking) - builder: vs2017_64_dyn PYTHON: 'C:\\Python37' BUILD_DIR: build # Init init: # Build dependent custom commands - cmd: "%init_command%" # Required software 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 "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget %NINJA_URL% -OutFile ninja.zip" && unzip ninja.zip ) # Build scripts build_script: - appveyor AddMessage "Compiling radare2 %R2_VERSION% (%builder%)" - 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% ) - 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% ) test_script: - set PATH=%APPVEYOR_BUILD_FOLDER%\%DIST_FOLDER%\bin;C:\msys64\mingw64\bin;%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_modules/.bin/r2r - 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