forked from libcheck/check
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
229 lines (206 loc) · 6.42 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# This is the configuration file for AppVeyor builds.
# Look at the following for reference:
# https://www.appveyor.com/docs/appveyor-yml
# Notes:
# - Minimal appveyor.yml file is an empty file. All sections are optional.
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 1.0.{build}
#---------------------------------#
# environment configuration #
# and build matrix #
#---------------------------------#
environment:
vsversion: none
arch: default
matrix:
# Visual Studio builds
# - platform: vs
# vsversion: 2008
# arch: x86
- platform: vs
vsversion: 2010
arch: x86
- platform: vs
vsversion: 2012
arch: x86
- platform: vs
vsversion: 2013
arch: x86
- platform: vs
vsversion: 2015
arch: x86
- platform: vs
vsversion: 2017
arch: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- platform: vs
vsversion: 2010
arch: x64
- platform: vs
vsversion: 2012
arch: x64
- platform: vs
vsversion: 2013
arch: x64
- platform: vs
vsversion: 2015
arch: x64
- platform: vs
vsversion: 2017
arch: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- platform: vs
vsversion: 2012
arch: ARM
- platform: vs
vsversion: 2013
arch: ARM
- platform: vs
vsversion: 2015
arch: ARM
- platform: vs
vsversion: 2017
arch: ARM
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# Other compilers than Visual Studio
- platform: msvc
- platform: cygwin
- platform: mingw32
- platform: mingw64msys
# clone directory
clone_folder: c:\projects\check
# build Configuration, i.e. Debug, Release, etc.
configuration: Release
#---------------------------------#
# scripts that are called at #
# the very beginning, before #
# repo cloning #
#---------------------------------#
init:
- git config --global core.autocrlf input
#---------------------------------#
# scripts to run before build #
#---------------------------------#
before_build:
- cd c:\projects\check
- echo Directory before starting build...
- dir
- echo Starting pre-build step...
# Remove the following from the path, as it will interfere with
# the MinGW builds
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- if %platform%==msvc call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
- if %platform%==msvc mkdir build
- if %platform%==msvc chdir build
- if %platform%==msvc cmake --version
- if %platform%==msvc cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
- if %platform%==vs (
set "makecommand=Visual Studio"
)
- set "vcx=false"
- set "vcs=false"
- if %platform%==vs (
set "vcx=true"
)
- if %vsversion%==2005 (
set "vcs=true"
)
- if %vsversion%==2008 (
set "vcs=true"
)
- if %vcs%==true (
set "vcx=false"
)
- if %vsversion%==2005 (
set "makecommand=%makecommand% 8 %vsversion%"
)
- if %vsversion%==2008 (
set "makecommand=%makecommand% 9 %vsversion%"
)
- if %vsversion%==2010 (
set "makecommand=%makecommand% 10 %vsversion%"
)
- if %vsversion%==2012 (
set "makecommand=%makecommand% 11 %vsversion%"
)
- if %vsversion%==2013 (
set "makecommand=%makecommand% 12 %vsversion%"
)
- if %vsversion%==2015 (
set "makecommand=%makecommand% 14 %vsversion%"
)
- if %vsversion%==2017 (
set "makecommand=%makecommand% 15 %vsversion%"
)
- if %arch%==x64 (
set "makecommand=%makecommand% Win64"
)
- if %arch%==ARM (
set "makecommand=%makecommand% ARM"
)
- if %platform%==vs mkdir build
- if %platform%==vs chdir build
- if %platform%==vs cmake --version
- if %platform%==vs cmake -G "%makecommand%" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
- if %platform%==cygwin set PATH=C:\cygwin\bin;%PATH%
- if %platform%==cygwin bash -c "autoreconf -i"
- if %platform%==cygwin bash -c "./configure"
- if %platform%==mingw32 set PATH=C:\MinGW\bin;%PATH%
- if %platform%==mingw32 mkdir build
- if %platform%==mingw32 chdir build
- if %platform%==mingw32 cmake --version
- if %platform%==mingw32 cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
- if %platform%==mingw64msys set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
- if %platform%==mingw64msys bash -c "autoreconf -i"
- if %platform%==mingw64msys bash -c "./configure"
#---------------------------------#
# build code and unit tests #
#---------------------------------#
build_script:
- echo Directory before running build step...
- dir
- echo Building code...
- if %platform%==msvc nmake
- if %platform%==cygwin bash -c "make"
- if %platform%==mingw32 mingw32-make
- if %platform%==mingw64msys bash -c "make"
- if %vcx%==true msbuild /p:Platform=%arch% "ALL_BUILD.vcxproj"
# Build for VS2008 (prior to the vsxproj file format), only 32 bit
# Options see https://msdn.microsoft.com/en-us/library/ms164311.aspx
- if %vcs%==true msbuild /p:Configuration=Release /p:Platform=Win32 /nologo /v:d "check.sln"
#---------------------------------#
# run unit test for all x86 #
# and x64 architecture builds #
#---------------------------------#
test_script:
- set "testplatform=%platform%"
# Can not run ARM builds on x86/x64 build images
- if %arch%==ARM (
set "testplatform=none"
)
- echo Project directory before running test step...
- dir
- echo tests directory before running test step...
- dir tests
- echo Running unit tests...
- if %testplatform%==msvc nmake test VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=TRUE
- if %testplatform%==vs ctest --extra-verbose -C Release
- if %testplatform%==cygwin bash -c "make check"
- if %testplatform%==mingw32 tests\check_check.exe
- if %testplatform%==mingw64msys bash -c "tests/check_check"
- if %testplatform%==none echo Can not test for %arch% here
#---------------------------------#
# build and test completed #
#---------------------------------#
on_finish:
- echo Project directory after running tests...
- dir
- echo tests directory after running tests...
- dir tests
- if %platform%==cygwin bash -c "cat tests/test-suite.log || true"