Criterion/appveyor.yml

101 lines
3.1 KiB
YAML

version: 2.3.0-rc1_b{build}-{branch}
os: Visual Studio 2015
environment:
COVERALLS_REPO_TOKEN:
secure: 5nuCg+faxFPeppoNNcSwVobswAVFUf8ut83vw8CX/4W2y0kZkGmwEfCUxSQWiQDU
CI_NAME: appveyor
CI_JOB_ID: $(APPVEYOR_JOB_ID)
GCOV_PREFIX: $(APPVEYOR_BUILD_FOLDER)
PYTHON_BIN: python
PYTHONIOENCODING: "utf-8" # consider cmd encoding to be unicode
CRAM_SHELL: "C:\\msys64\\usr\\bin\\sh.exe"
matrix:
- COMPILER: mingw
GENERATOR: "MSYS Makefiles"
BUILD_FLAGS: -j2
- COMPILER: msvc
GENERATOR: "Visual Studio 14 2015 Win64"
CFLAGS: /MP
CXXFLAGS: /MP
BUILD_FLAGS: /verbosity:m
init:
- git config --global core.autocrlf input
- set MSYSTEM=MINGW64
# Disable windows process crash popup
# See: https://msdn.microsoft.com/en-us/library/bb513638%28VS.85%29.aspx
- reg add "HKLM\SYSTEM\CurrentControlSet\Control\Windows" /f /v ErrorMode /t REG_DWORD /d 2
- reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /f /v DontShowUI /t REG_DWORD /d 1
- reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /f /v Disable /t REG_DWORD /d 1
- set PATH=C:\Python35;C:\Python35\Scripts;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin;C:\msys64\usr\bin;%PATH%
- set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\build;%APPVEYOR_BUILD_FOLDER%\build\Debug;%APPVEYOR_BUILD_FOLDER%\build\external\bin;%APPVEYOR_BUILD_FOLDER%\build\external\lib"
- set MSYSTEM=MINGW64
- pip install cram==0.7
# Remove Xamarin msbuild warnings
- del "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
clone_depth: 5
configuration:
- Debug
- RelWithDebInfo
install:
- ps: $env:RELEASE_NAME = $env:APPVEYOR_REPO_BRANCH -replace "/", "-"
# Hack to make git think it is on the tip of the repo branch
- 'git checkout -B %APPVEYOR_REPO_BRANCH%'
# Patch buggy cram
- sh -c "patch /c/Python35/lib/site-packages/cram/_test.py .cmake/cram-env.patch"
# Configure project
- 'mkdir build && cd build'
- >
cmake
-Wno-dev
-DCTESTS=ON
-DI18N=OFF
-DCMAKE_INSTALL_PREFIX="criterion-%RELEASE_NAME%"
-DCMAKE_BUILD_TYPE="%CONFIGURATION%"
%CMAKE_OPTS%
-G "%GENERATOR%"
..
build_script:
# open dummy fd 0 to prevent errors at configure time for autoconf dependencies
- cmake --build . -- %BUILD_FLAGS% 0<nul
before_deploy:
- ps: |
$archive = "criterion-$env:RELEASE_NAME-windows-$env:COMPILER-$env:PLATFORM"
cmake --build . --target install
7z a -ttar "$archive.tar" "criterion-$env:RELEASE_NAME"
7z a -tbzip2 "../$archive.tar.bz2" "$archive.tar"
Push-AppveyorArtifact "../$archive.tar.bz2"
test_script:
- cmake --build . --target criterion_tests
- ps: |
sh -c "ctest --output-on-failure --timeout 10"
if (-not $lastexitcode -eq 0) {
$host.setshouldexit(1)
}
#after_test:
# - 'make coveralls'
deploy:
provider: GitHub
auth_token:
secure: MnZZQeoxBVnpV9GSSvVok5Je0/N2d/fzG4+ITw95/tYSgZ8rleBV23a5sCwAea3r
artifact: 'criterion-$(RELEASE_NAME)-windows-$(COMPILER)-$(PLATFORM).tar.bz2'
draft: false
prerelease: false
on:
appveyor_repo_tag: true
configuration: RelWithDebInfo