forked from Snaipe/Criterion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
112 lines (97 loc) · 3.1 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
version: 2.2.0_b{build}-{branch}
os: Visual Studio 2015
init:
- git config --global core.autocrlf input
- set "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%"
- set MSYSTEM=MINGW64
- pacman --noconfirm --needed -S base-devel git zip mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake
- set "PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\build;%APPVEYOR_BUILD_FOLDER%\build\Debug;%APPVEYOR_BUILD_FOLDER%\build\external\bin;%APPVEYOR_BUILD_FOLDER%\build\external\lib"
environment:
COVERALLS_REPO_TOKEN:
secure: 5nuCg+faxFPeppoNNcSwVobswAVFUf8ut83vw8CX/4W2y0kZkGmwEfCUxSQWiQDU
CI_NAME: appveyor
CI_JOB_ID: $(APPVEYOR_JOB_ID)
GCOV_PREFIX: $(APPVEYOR_BUILD_FOLDER)
PYTHON: "C:\\Python34"
PYTHON_BIN: "C:\\Python34\\python.exe"
PYTHON_VERSION: "3.4.2"
PYTHON_ARCH: "32"
PYTHONIOENCODING: "utf-8" # consider cmd encoding to be unicode
CRAM_SHELL: "C:\\msys64\\usr\\bin\\sh.exe"
matrix:
- COMPILER: mingw
GENERATOR: "MSYS Makefiles"
CXXFLAGS: -D__NO_INLINE__
- COMPILER: msvc
GENERATOR: "Visual Studio 14 2015"
CFLAGS: /MP
CXXFLAGS: /MP
clone_depth: 5
platform:
- x86
- x64
configuration:
- Debug
- Release
- RelWithDebInfo
install:
# Install Python
- ps: if (-not(Test-Path($env:PYTHON))) { & .cmake\install_python.ps1 }
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PYTHON%\\bin;%PATH%"
- python --version
# Upgrade pip
- "pip install --disable-pip-version-check --user --upgrade pip"
# Install cram
- "pip install cram"
- python -m cram --version
# Patch buggy cram
- sh -c "patch C:/Python34/Lib/site-packages/cram.py .cmake/cram-win.patch"
- 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%'
# 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 nanomsg
- cmake --build . 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: |
ctest
if (-not $lastexitcode -eq 0) {
type Testing/Temporary/LastTest.log
$host.setshouldexit(1)
}
#after_test:
# - 'make coveralls'
notifications:
- provider: Email
to: [[email protected]]
on_build_status_changed: true
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