radare2/.appveyor.yml

131 lines
4.8 KiB
YAML
Raw Normal View History

# Version format
2017-06-08 05:32:17 +02:00
version: git-{build}
# Skip Github tags
skip_tags: true
# Branches to clone
branches:
only:
- master
# Environment variables
environment:
NINJA_URL: https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-win.zip
VSVARSALLPATH2017: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat'
VSVARSALLPATH2019: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat'
matrix:
# VS2017 64
- builder: vs2017_64
PYTHON: 'C:\\Python37-x64'
INNO_SETUP: 'C:\\Program Files (x86)\\Inno Setup 5'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
BUILD_DIR: build
RUN_TESTS: false
# VS2019 64
- builder: vs2019_64
PYTHON: 'C:\\Python38-x64'
INNO_SETUP: 'C:\\Program Files (x86)\\Inno Setup 6'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
BUILD_DIR: build
RUN_TESTS: true
# VS2017 64 (Dynamic linking)
- builder: vs2017_64_dyn
PYTHON: 'C:\\Python37'
INNO_SETUP: 'C:\\Program Files (x86)\\Inno Setup 5'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
2017-06-26 14:14:38 +02:00
BUILD_DIR: build
RUN_TESTS: false
2019-08-16 07:10:00 +03:00
# Clang-cl 64 (Dynamic linking)
- builder: clang_cl_64_dyn
PYTHON: 'C:\\Python38'
INNO_SETUP: 'C:\\Program Files (x86)\\Inno Setup 6'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
2019-08-16 07:10:00 +03:00
BUILD_DIR: build
RUN_TESTS: true
# Skip changes affecting only other CI services
skip_commits:
files:
- .builds/*
- .github/*
- .travis.yml
- .lgtm.yml
- snapcraft.yaml
- '*.md'
- travis-*
- Vagrant*
# Init
init:
2019-06-18 13:13:08 +08:00
# Build dependent custom commands
- cmd: "%init_command%"
2019-06-18 13:13:08 +08:00
# Required software for building
install:
2017-06-05 11:00:51 +02:00
# Update environment variables
- 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
- cmd: if defined BUILD_DIR ( %PYTHON%\python.exe -m pip install meson==0.54.0 )
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 )
# 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
- cmd: if %builder% == vs2017_64 ( set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "%VSVARSALLPATH2017%" x64 && python sys\meson.py --backend vs2017 --release --xp --install="%DIST_FOLDER%" --webui --options static_runtime=true && 7z a %ARTIFACT_ZIP% %DIST_FOLDER% )
- cmd: if %builder% == vs2019_64 ( choco install mingw && refreshenv && set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "%VSVARSALLPATH2019%" x64 && python sys\meson.py --backend vs2019 --release --install="%DIST_FOLDER%" --webui --options static_runtime=true && 7z a %ARTIFACT_ZIP% %DIST_FOLDER% )
2017-06-26 14:14:38 +02:00
- cmd: if %builder% == vs2017_64_dyn ( set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "%VSVARSALLPATH2017%" x64 && python sys\meson.py --release --shared --install="%DIST_FOLDER%" --webui && 7z a %ARTIFACT_ZIP% %DIST_FOLDER% )
- cmd: if %builder% == clang_cl_64_dyn ( set "PATH=C:\mingw\bin;C:\mingw\msys\1.0\bin;%PYTHON%;%PATH%" && call "%VSVARSALLPATH2019%" x64 && set CC=clang-cl && python sys\meson.py --release --shared --install="%DIST_FOLDER%" --webui && 7z a %ARTIFACT_ZIP% %DIST_FOLDER% )
2019-08-16 07:10:00 +03:00
# Run tests only conditionally
for:
-
matrix:
only:
- RUN_TESTS: true
test_script:
- set PATH=%APPVEYOR_BUILD_FOLDER%\%DIST_FOLDER%\bin;C:\msys64\mingw64\bin;%PATH%
- echo %PATH%
- where radare2
- radare2 -v
- cd test
- git clone -q --depth 1 https://github.com/radareorg/radare2-testbins bins
2020-04-06 17:40:46 +02:00
- r2r -L db
2020-04-13 21:15:43 +02:00
- cd ..
after_test:
- git clone --depth 1 https://github.com/radare/radare2-win-installer
- set PATH=%PATH%;%INNO_SETUP%
- 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
2017-06-05 11:00:51 +02:00
# Artifacts
artifacts:
2017-06-05 11:00:51 +02:00
# Binaries
- path: "%ARTIFACT_ZIP%"
# Inno Setup files
- path: radare2_installer-%builder%.exe
# Upload builds to the CI release at GitHub
deploy:
tag: Continuous-Windows
release: Continuous-Windows
description: 'Radare2 Windows release'
provider: GitHub
auth_token:
secure: aIhLJhegEu8fMuyfhVxiEyF5+28ozTtmDmQ3UBddNou3nQlXyIWJ5dZSPnf6HqsS # encrypted token from GitHub
artifact: /.*\.zip/ # All generated ZIP packages for MSVC and clang-cl builds
2020-03-05 13:43:45 +08:00
draft: false
prerelease: true
force_update: true
on:
branch: master # release from master branch only