-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
231 lines (182 loc) · 8 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
229
230
231
# === Windows builds ===
image:
- Visual Studio 2017
- Visual Studio 2015
environment:
global:
# NOTE: LibCMaker lib name.
# NOTE: See below the lib deps in 'before_build' and lib CMake keys in 'build_script'.
cmr_LIB_NAME: spdlog
cmr_BUILD_TESTING: ON
cmr_WORK_DIR: C:\projects
cmr_REPO_DIR: ${APPVEYOR_BUILD_FOLDER}
cmr_SAMPLE_SRC_DIR: ${cmr_REPO_DIR}\samples\TestCompileWith${cmr_LIB_NAME}
cmr_SAMPLE_DIR: ${cmr_WORK_DIR}\TestCompileWith${cmr_LIB_NAME}
cmr_SAMPLE_LIB_DIR: ${cmr_SAMPLE_DIR}\libs
cmr_BUILD_DIR: ${cmr_SAMPLE_DIR}\build
cmr_INSTALL_DIR: ${cmr_BUILD_DIR}\install
cmr_DOWNLOAD_DIR: ${cmr_BUILD_DIR}\download
cmr_CMAKE_BUILD_TYPE: Release
cmr_CMAKE_VERSION: 3.11
cmr_CMAKE_RELEASE: cmake-${cmr_CMAKE_VERSION}.0-win64-x64
cmr_CMAKE_DIR: ${cmr_INSTALL_DIR}\${cmr_CMAKE_RELEASE}
cmr_CMAKE_CMD: cmake
cmr_CTEST_CMD: ctest
cmr_MinGW_w64_ROOT_PATH: C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1
PATH: ${cmr_INSTALL_DIR}\bin;${cmr_CMAKE_DIR}\bin;%PATH%
cmr_JOBS_CNT: 4
matrix:
# MSVC 2017, x64, shared
- cmr_MSVC_2017_x64_shared: ON
cmr_GENERATOR: -DCMAKE_GENERATOR:STRING="Visual Studio 15 2017"
cmr_GEN_PLATFORM: -DCMAKE_GENERATOR_PLATFORM:STRING="x64"
cmr_GEN_TOOLSET: -DCMAKE_GENERATOR_TOOLSET:STRING="v141,host=x64"
cmr_CONFIG_TYPES: -DCMAKE_CONFIGURATION_TYPES:STRING=${cmr_CMAKE_BUILD_TYPE}
cmr_STD_LIBS:
cmr_BUILD_SHARED_LIBS: ON
# MSVC 2017, x64, static
- cmr_MSVC_2017_x64_static: ON
cmr_GENERATOR: -DCMAKE_GENERATOR:STRING="Visual Studio 15 2017"
cmr_GEN_PLATFORM: -DCMAKE_GENERATOR_PLATFORM:STRING="x64"
cmr_GEN_TOOLSET: -DCMAKE_GENERATOR_TOOLSET:STRING="v141,host=x64"
cmr_CONFIG_TYPES: -DCMAKE_CONFIGURATION_TYPES:STRING=${cmr_CMAKE_BUILD_TYPE}
cmr_STD_LIBS:
cmr_BUILD_SHARED_LIBS: OFF
# MSVC 2017, x32, shared
- cmr_MSVC_2017_x32_shared: ON
cmr_GENERATOR: -DCMAKE_GENERATOR:STRING="Visual Studio 15 2017"
cmr_GEN_PLATFORM: -DCMAKE_GENERATOR_PLATFORM:STRING="Win32"
cmr_GEN_TOOLSET: -DCMAKE_GENERATOR_TOOLSET:STRING="v141,host=x64"
cmr_CONFIG_TYPES: -DCMAKE_CONFIGURATION_TYPES:STRING=${cmr_CMAKE_BUILD_TYPE}
cmr_STD_LIBS:
cmr_BUILD_SHARED_LIBS: ON
# MSVC 2017, x32, static
- cmr_MSVC_2017_x32_static: ON
cmr_GENERATOR: -DCMAKE_GENERATOR:STRING="Visual Studio 15 2017"
cmr_GEN_PLATFORM: -DCMAKE_GENERATOR_PLATFORM:STRING="Win32"
cmr_GEN_TOOLSET: -DCMAKE_GENERATOR_TOOLSET:STRING="v141,host=x64"
cmr_CONFIG_TYPES: -DCMAKE_CONFIGURATION_TYPES:STRING=${cmr_CMAKE_BUILD_TYPE}
cmr_STD_LIBS:
cmr_BUILD_SHARED_LIBS: OFF
# MSVC 2017, WinXP, shared
- cmr_MSVC_2017_WinXP_shared: ON
cmr_GENERATOR: -DCMAKE_GENERATOR:STRING="Visual Studio 15 2017"
cmr_GEN_PLATFORM: -DCMAKE_GENERATOR_PLATFORM:STRING="Win32"
cmr_GEN_TOOLSET: -DCMAKE_GENERATOR_TOOLSET:STRING="v141_xp,host=x64"
cmr_CONFIG_TYPES: -DCMAKE_CONFIGURATION_TYPES:STRING=${cmr_CMAKE_BUILD_TYPE}
cmr_STD_LIBS:
cmr_BUILD_SHARED_LIBS: ON
# MSVC 2017, WinXP, static
- cmr_MSVC_2017_WinXP_static: ON
cmr_GENERATOR: -DCMAKE_GENERATOR:STRING="Visual Studio 15 2017"
cmr_GEN_PLATFORM: -DCMAKE_GENERATOR_PLATFORM:STRING="Win32"
cmr_GEN_TOOLSET: -DCMAKE_GENERATOR_TOOLSET:STRING="v141_xp,host=x64"
cmr_CONFIG_TYPES: -DCMAKE_CONFIGURATION_TYPES:STRING=${cmr_CMAKE_BUILD_TYPE}
cmr_STD_LIBS:
cmr_BUILD_SHARED_LIBS: OFF
# MSVC 2015, x64, shared
- cmr_MSVC_2015_x64_shared: ON
cmr_GENERATOR: -DCMAKE_GENERATOR:STRING="Visual Studio 14 2015"
cmr_GEN_PLATFORM: -DCMAKE_GENERATOR_PLATFORM:STRING="x64"
cmr_GEN_TOOLSET: -DCMAKE_GENERATOR_TOOLSET:STRING="v140,host=x64"
cmr_CONFIG_TYPES: -DCMAKE_CONFIGURATION_TYPES:STRING=${cmr_CMAKE_BUILD_TYPE}
cmr_STD_LIBS:
cmr_BUILD_SHARED_LIBS: ON
# MSVC 2015, x64, static
- cmr_MSVC_2015_x64_static: ON
cmr_GENERATOR: -DCMAKE_GENERATOR:STRING="Visual Studio 14 2015"
cmr_GEN_PLATFORM: -DCMAKE_GENERATOR_PLATFORM:STRING="x64"
cmr_GEN_TOOLSET: -DCMAKE_GENERATOR_TOOLSET:STRING="v140,host=x64"
cmr_CONFIG_TYPES: -DCMAKE_CONFIGURATION_TYPES:STRING=${cmr_CMAKE_BUILD_TYPE}
cmr_STD_LIBS:
cmr_BUILD_SHARED_LIBS: OFF
# MinGW-w64, x64, shared
- cmr_MinGW_w64_x64_shared: ON
cmr_GENERATOR: -DCMAKE_GENERATOR:STRING="MinGW Makefiles"
cmr_GEN_PLATFORM:
cmr_GEN_TOOLSET:
cmr_CONFIG_TYPES:
cmr_STD_LIBS:
cmr_BUILD_SHARED_LIBS: ON
cmr_CMAKE_VERSION: 3.8
cmr_CMAKE_RELEASE: cmake-${cmr_CMAKE_VERSION}.0-win32-x86
MINGW_HOME: ${cmr_MinGW_w64_ROOT_PATH}\mingw64
PATH: ${cmr_INSTALL_DIR}\bin;${cmr_CMAKE_DIR}\bin;${MINGW_HOME}\bin;%PATH%
# MinGW-w64, x64, static
- cmr_MinGW_w64_x64_static: ON
cmr_GENERATOR: -DCMAKE_GENERATOR:STRING="MinGW Makefiles"
cmr_GEN_PLATFORM:
cmr_GEN_TOOLSET:
cmr_CONFIG_TYPES:
cmr_STD_LIBS: -DCMAKE_C_STANDARD_LIBRARIES:STRING="-static" -DCMAKE_CXX_STANDARD_LIBRARIES:STRING="-static"
cmr_BUILD_SHARED_LIBS: OFF
cmr_CMAKE_VERSION: 3.8
cmr_CMAKE_RELEASE: cmake-${cmr_CMAKE_VERSION}.0-win32-x86
MINGW_HOME: ${cmr_MinGW_w64_ROOT_PATH}\mingw64
PATH: ${cmr_INSTALL_DIR}\bin;${cmr_CMAKE_DIR}\bin;${MINGW_HOME}\bin;%PATH%
matrix:
exclude:
- image: Visual Studio 2015
cmr_MSVC_2017_x64_shared: ON
- image: Visual Studio 2015
cmr_MSVC_2017_x64_static: ON
- image: Visual Studio 2015
cmr_MSVC_2017_x32_shared: ON
- image: Visual Studio 2015
cmr_MSVC_2017_x32_static: ON
- image: Visual Studio 2015
cmr_MSVC_2017_WinXP_shared: ON
- image: Visual Studio 2015
cmr_MSVC_2017_WinXP_static: ON
- image: Visual Studio 2015
cmr_MinGW_w64_x64_shared: ON
- image: Visual Studio 2015
cmr_MinGW_w64_x64_static: ON
- image: Visual Studio 2017
cmr_MSVC_2015_x64_shared: ON
- image: Visual Studio 2017
cmr_MSVC_2015_x64_static: ON
# TODO: remove it after fis this build.
# - image: Visual Studio 2017
# cmr_MinGW_w64_x64_shared: ON
clone_folder: c:\projects\LibCMaker_${cmr_LIB_NAME}
before_build:
- ver
- ps: $env:PATH = $env:PATH -replace "C:\\Program Files\\Git\\usr\\bin",""
- xcopy %cmr_SAMPLE_SRC_DIR% %cmr_SAMPLE_DIR% /e /i /h /q
- xcopy %cmr_REPO_DIR% %cmr_SAMPLE_LIB_DIR%\LibCMaker_%cmr_LIB_NAME% /e /i /h /q
- mkdir %cmr_BUILD_DIR%
- mkdir %cmr_INSTALL_DIR%
- mkdir %cmr_DOWNLOAD_DIR%
- curl -fsS -o %cmr_DOWNLOAD_DIR%\%cmr_CMAKE_RELEASE%.zip https://cmake.org/files/v%cmr_CMAKE_VERSION%/%cmr_CMAKE_RELEASE%.zip
- 7z.exe x -aoa -o%cmr_INSTALL_DIR% %cmr_DOWNLOAD_DIR%\%cmr_CMAKE_RELEASE%.zip
# NOTE: LibCMaker lib deps.
- git clone https://github.com/LibCMaker/LibCMaker.git %cmr_SAMPLE_LIB_DIR%\LibCMaker
- git clone https://github.com/LibCMaker/LibCMaker_GoogleTest.git %cmr_SAMPLE_LIB_DIR%\LibCMaker_GoogleTest
- git clone https://github.com/LibCMaker/LibCMaker_fmt.git %cmr_SAMPLE_LIB_DIR%\LibCMaker_fmt
build_script:
- cd %cmr_BUILD_DIR%
- cmake --version
# NOTE: LibCMaker lib CMake keys.
- cmake %cmr_SAMPLE_DIR%
-Dcmr_BUILD_MULTIPROC_CNT:STRING=%cmr_JOBS_CNT%
-Dcmr_PRINT_DEBUG:BOOL=ON
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DCMAKE_COLOR_MAKEFILE:BOOL=ON
-DBUILD_TESTING:BOOL=%cmr_BUILD_TESTING%
-DCMAKE_INSTALL_PREFIX:PATH=%cmr_INSTALL_DIR%
-Dcmr_DOWNLOAD_DIR:PATH=%cmr_DOWNLOAD_DIR%
-Dcmr_UNPACKED_DIR:PATH=%cmr_DOWNLOAD_DIR%\unpacked
-DCMAKE_BUILD_TYPE:STRING=%cmr_CMAKE_BUILD_TYPE%
-DBUILD_SHARED_LIBS:BOOL=%cmr_BUILD_SHARED_LIBS%
%cmr_GENERATOR% %cmr_GEN_PLATFORM% %cmr_GEN_TOOLSET% %cmr_CONFIG_TYPES% %cmr_STD_LIBS%
- cmake --build . --config %cmr_CMAKE_BUILD_TYPE%
- ctest --output-on-failure --build-config %cmr_CMAKE_BUILD_TYPE%
# === Notifications ===
notifications:
- provider: Email
to:
on_build_success: true
on_build_failure: true
on_build_status_changed: true