-
Notifications
You must be signed in to change notification settings - Fork 76
/
appveyor.yml
303 lines (258 loc) · 15.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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
environment:
COVERITY_SCAN_PROJECT_NAME: "saprykin/plibsys"
COVERITY_SCAN_NOTIFICATION_EMAIL: "saprykin.spb@gmail.com"
COVERITY_DESCRIPTION: "Appveyor CI build"
COVERITY_UPLOAD_URL: "https://scan.coverity.com/builds?project=saprykin%2Fplibsys"
COVERITY_SCAN_TOKEN:
secure: 6WFXzLxAMuUovtYc+u8OoruE/V6zhK2M4mZlrszRBIA=
matrix:
- CMAKE_GENERATOR: "Visual Studio 16 2019"
CMAKE_GENERATOR_ARCH: "x64"
USE_COVERITY: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019"
- CMAKE_GENERATOR: "Watcom WMake"
USE_WATCOM: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "MinGW Makefiles"
USE_MINGW: "1"
USE_MINGW_493: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "MinGW Makefiles"
USE_MINGW: "1"
USE_MINGW64: "1"
USE_MINGW_540: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "MinGW Makefiles"
USE_MINGW: "1"
USE_MINGW64: "1"
USE_MINGW_630: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "MinGW Makefiles"
USE_MINGW: "1"
USE_MINGW64: "1"
USE_MINGW_730: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "MinGW Makefiles"
USE_MINGW: "1"
USE_MINGW64: "1"
USE_MINGW_810: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "Unix Makefiles"
USE_MSYS64: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2022"
- CMAKE_GENERATOR: "MSYS Makefiles"
USE_MSYS64: "1"
USE_MINGW64: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2022"
- CMAKE_GENERATOR: "Unix Makefiles"
USE_CYGWIN64: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019"
- CMAKE_GENERATOR: "Visual Studio 9 2008"
USE_OLD_MSBUILD: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "Visual Studio 10 2010"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "Visual Studio 10 2010 Win64"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "Visual Studio 11 2012"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "Visual Studio 11 2012 Win64"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "Visual Studio 12 2013"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "Visual Studio 12 2013 Win64"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "Visual Studio 14 2015"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "Visual Studio 14 2015 Win64"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
- CMAKE_GENERATOR: "Visual Studio 15 2017"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
- CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
- CMAKE_GENERATOR: "Visual Studio 16 2019"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019"
- CMAKE_GENERATOR: "NMake Makefiles"
USE_LLVM: "1"
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
configuration: Release
version: 0.0.1.{build}
branches:
only:
- master
- appveyor_test
clone_folder: c:\projects\plibsys
cache:
- c:\projects\i686-4.9.3-release-win32-dwarf-rt_v4-rev1.7z
- c:\projects\x86_64-5.4.0-release-win32-seh-rt_v5-rev0.7z
- c:\projects\x86_64-6.3.0-release-win32-seh-rt_v5-rev1.7z
- c:\projects\x86_64-7.3.0-release-win32-seh-rt_v5-rev0.7z
- c:\projects\x86_64-8.1.0-release-win32-seh-rt_v6-rev0.7z
- c:\projects\open-watcom-c-win32-1.9.exe
- c:\cygwin-setup-cache
install:
- If "%USE_CYGWIN64%" == "1" (
c:\cygwin64\setup-x86_64.exe -gqnNdO -R c:\cygwin64 -s https://cygwin.mirror.constant.com `
-l "c:\cygwin-setup-cache" -P cmake -P cygrunsrv
)
- ps: >-
If ($env:USE_MSYS64 -eq "1") {
$env:PATH = "c:\msys64\usr\bin;$env:PATH";
If ($env:USE_MINGW64 -eq "1") {
$env:PATH = "c:\msys64\mingw64\bin;$env:PATH";
} Else {
& C:\msys64\usr\bin\mkdir -p /var/cache/pacman/pkg;
& pacman --sync --noconfirm cmake doxygen;
}
} ElseIf ($env:USE_MINGW -eq "1") {
If ($env:USE_MINGW_493 -eq "1") {
$MINGW_BASE = "i686-4.9.3-release-win32-dwarf-rt_v4-rev1";
$MINGW_VERSION = "4.9.3";
} ElseIf ($env:USE_MINGW_540 -eq "1") {
$MINGW_BASE = "x86_64-5.4.0-release-win32-seh-rt_v5-rev0";
$MINGW_VERSION = "5.4.0";
} ElseIf ($env:USE_MINGW_630 -eq "1") {
$MINGW_BASE = "x86_64-6.3.0-release-win32-seh-rt_v5-rev1";
$MINGW_VERSION = "6.3.0";
} ElseIf ($env:USE_MINGW_730 -eq "1") {
$MINGW_BASE = "x86_64-7.3.0-release-win32-seh-rt_v5-rev0";
$MINGW_VERSION = "7.3.0";
} ElseIf ($env:USE_MINGW_810 -eq "1") {
$MINGW_BASE = "x86_64-8.1.0-release-win32-seh-rt_v6-rev0";
$MINGW_VERSION = "8.1.0";
}
$MINGW_ARCHIVE = "$MINGW_BASE.7z";
If ($env:USE_MINGW64 -eq "1") {
$MINGW_URL = ("https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/" +
"Personal%20Builds/mingw-builds/$MINGW_VERSION/threads-win32/seh/$MINGW_ARCHIVE/download");
} Else {
$MINGW_URL = ("https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/" +
"Personal%20Builds/mingw-builds/$MINGW_VERSION/threads-win32/dwarf/$MINGW_ARCHIVE/download");
}
Set-Location c:\projects | Out-Null;
If (-Not (Test-Path "$MINGW_ARCHIVE")) {
& appveyor DownloadFile "$MINGW_URL" -FileName "$MINGW_ARCHIVE";
}
New-Item -ItemType directory -Path "$MINGW_BASE" | Out-Null;
Copy-Item "$MINGW_ARCHIVE" "$MINGW_BASE";
Set-Location "$MINGW_BASE" | Out-Null;
& 7z x -y "$MINGW_ARCHIVE";
If ($env:USE_MINGW64 -eq "1") {
$env:PATH = "c:\projects\$MINGW_BASE\mingw64\bin;C:\Program Files (x86)\CMake\bin";
} Else {
$env:PATH = "c:\projects\$MINGW_BASE\mingw32\bin;C:\Program Files (x86)\CMake\bin";
}
} ElseIf ($env:USE_WATCOM -eq "1") {
$WATCOM_BASE = "open-watcom-c-win32-1.9";
$WATCOM_INSTALLER = "$WATCOM_BASE.exe";
$WATCOM_URL = "https://sourceforge.net/projects/openwatcom/files/open-watcom-1.9/$WATCOM_INSTALLER/download";
Set-Location c:\projects | Out-Null;
If (-Not (Test-Path "$WATCOM_INSTALLER")) {
& appveyor DownloadFile "$WATCOM_URL" -FileName "$WATCOM_INSTALLER";
}
New-Item -ItemType directory -Path "$WATCOM_BASE" | Out-Null;
Copy-Item "$WATCOM_INSTALLER" "$WATCOM_BASE";
Set-Location "$WATCOM_BASE" | Out-Null;
& 7z x -y "$WATCOM_INSTALLER";
$CUR_LOCATION = "c:\projects\$WATCOM_BASE";
$env:PATH = "$CUR_LOCATION\binw;$env:PATH";
$env:PATH = "$CUR_LOCATION\binnt;$env:PATH";
$env:INCLUDE = "$CUR_LOCATION\h\nt;$env:INCLUDE";
$env:INCLUDE = "$env:INCLUDE;$CUR_LOCATION\h\nt\directx";
$env:INCLUDE = "$env:INCLUDE;$CUR_LOCATION\h\nt\ddk";
$env:INCLUDE = "$CUR_LOCATION\h;$env:INCLUDE";
$env:WATCOM = "$CUR_LOCATION";
$env:EDPATH = "$CUR_LOCATION\eddat";
}
build_script:
- ps: >-
$BUILD_DIR = "c:\projects\plibsys-build";
New-Item -ItemType directory -Path $BUILD_DIR | Out-Null;
Set-Location $BUILD_DIR | Out-Null;
If ($env:USE_MSYS64 -eq "1") {
if ($env:USE_MINGW64 -eq "1") {
$BUILD_TYPE = "";
} Else {
$BUILD_TYPE = "-DCMAKE_BUILD_TYPE=$env:configuration";
$CTEST_PARAMS = @("-E", "pshm|psemaphore");
}
$BUILD_COMMAND = "make";
$BUILD_PARAMS = @("-j", "2");
} ElseIf ($env:USE_MINGW -eq "1") {
if ($env:USE_MINGW_493 -eq "1") {
$BUILD_TYPE = "-DCMAKE_BUILD_TYPE=$env:configuration";
} Else {
$BUILD_TYPE = "";
}
$BUILD_COMMAND = "mingw32-make";
$BUILD_PARAMS = @("-j", "2");
} ElseIf ($env:USE_CYGWIN64 -eq "1") {
$env:PATH = "c:\cygwin64\bin";
$BUILD_COMMAND = "make";
$BUILD_PARAMS = @("-j", "2");
If ($env:APPVEYOR_REPO_BRANCH -eq "appveyor_test") {
& bash -lc 'cygserver-config --yes';
& cygrunsrv -S cygserver;
}
} ElseIf ($env:USE_LLVM -eq "1") {
pushd "$env:VS140COMNTOOLS\..\..\VC\bin\amd64"
cmd /c "vcvars64.bat&set" |
foreach {
if ($_ -match "=") {
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
}
popd
$env:PATH = "C:\Program Files\LLVM\bin;$env:PATH";
$BUILD_COMMAND = "nmake";
$BUILD_PARAMS = "/NOLOGO"
$BUILD_TYPE = "-DCMAKE_BUILD_TYPE=$env:configuration";
$CMAKE_C_COMPILER = "-DCMAKE_C_COMPILER=clang-cl.exe"
$CMAKE_CXX_COMPILER = "-DCMAKE_CXX_COMPILER=cl.exe"
} ElseIf ($env:USE_WATCOM -eq "1") {
$BUILD_COMMAND = "wmake";
} Else {
If ($env:USE_OLD_MSBUILD -eq "1") {
$env:PATH = "C:\Windows\Microsoft.NET\Framework\v3.5;$env:PATH";
}
$BUILD_COMMAND = "msbuild";
$BUILD_PARAMS = @("/verbosity:normal", "$BUILD_DIR\plibsys.sln", "/p:Configuration=$env:configuration", "/m");
}
$CMAKE_GENERATOR_ARGS = "-G`"$env:CMAKE_GENERATOR`"";
If (Test-Path env:CMAKE_GENERATOR_ARCH) {
$CMAKE_GENERATOR_ARGS = "$CMAKE_GENERATOR_ARGS -A $CMAKE_GENERATOR_ARCH";
}
If($env:USE_COVERITY -eq "1" -And $env:APPVEYOR_REPO_BRANCH -eq "appveyor_test") {
Write-Host "Installing Coverity 2023.12.2..." -ForegroundColor Cyan;
$covPath = "$env:SYSTEMDRIVE\Tools\Coverity";
if (Test-Path $covPath) {
Remove-Item -Path $covPath -Recurse -Force;
}
Write-Host "Downloading Coverity...";
$covZip = "$env:TEMP\cov-analysis-win64-2023.12.2.zip";
$covUrl = "https://appveyordownloads.blob.core.windows.net/misc/cov-analysis-win64-2023.12.2.zip";
(New-Object Net.WebClient).DownloadFile($covUrl, $covZip);
Write-Host "Unpacking Coverity...";
$tempPath = "$env:TEMP\Coverity";
& 7z x $covZip -o"$tempPath" | Out-Null;
[IO.Directory]::Move("$tempPath\cov-analysis-win64-2023.12.2", $covPath);
Remove-Item -Path $tempPath -Recurse -Force;
Remove-Item -Path $covZip -Force;
Add-Path "$covPath\bin";
Write-Host "Coverity installed" -ForegroundColor Green;
& cmake '$CMAKE_GENERATOR_ARGS' $CMAKE_C_COMPILER $CMAKE_CXX_COMPILER ../plibsys;
& cov-configure --msvc;
& cov-build --dir "$BUILD_DIR\cov-int" $BUILD_COMMAND $BUILD_PARAMS;
& 7z a -tzip "$BUILD_DIR\cov-int.zip" "$BUILD_DIR\cov-int";
Remove-Item alias:curl;
& curl --form token="$env:COVERITY_SCAN_TOKEN" --form email="$env:COVERITY_SCAN_NOTIFICATION_EMAIL" `
--form file="`@$BUILD_DIR\cov-int.zip" --form version="$env:APPVEYOR_BUILD_VERSION" `
--form description="$env:COVERITY_DESCRIPTION" "$env:COVERITY_UPLOAD_URL";
Get-ChildItem -Path ./ -Recurse | Remove-Item -Force -Recurse;
}
& cmake '$CMAKE_GENERATOR_ARGS' $BUILD_TYPE $CMAKE_C_COMPILER $CMAKE_CXX_COMPILER ../plibsys;
& $BUILD_COMMAND $BUILD_PARAMS;
If ($env:APPVEYOR_REPO_BRANCH -eq "appveyor_test") {
$env:PATH = "c:\projects\plibsys-build\src;c:\projects\plibsys-build\src\Release;$env:PATH";
& ctest $CTEST_PARAMS --output-on-failure -V -C Release;
}