-
Notifications
You must be signed in to change notification settings - Fork 84
/
appveyor.yml
86 lines (74 loc) · 2.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
version: "{build}"
environment:
matrix:
- PlatformToolset: mingw-w64
platform: mingw-w64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
QTPath: C:\Qt\6.7\mingw_64
OPENSSLPath: C:\OpenSSL-v33-Win64\bin
- PlatformToolset: v142
platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
QTPath: C:\Qt\6.7\msvc2019_64
OPENSSLPath: C:\OpenSSL-v33-Win64\bin
ARCHI: amd64
configuration:
- Release
#- Debug
install:
- if "%PlatformToolset%"=="mingw-w64" set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH:C:\Program Files\Git\usr\bin;=%
- if "%PlatformToolset%"=="v141" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
- if "%PlatformToolset%"=="v142" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
- if "%PlatformToolset%"=="v143" call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi%
build:
verbosity: minimal
before_build:
- ps: |
Write-Output "Configuration: $env:CONFIGURATION"
Write-Output "Platform: $env:PLATFORM"
$generator = switch ($env:PLATFORMTOOLSET)
{
"v143" {"Visual Studio 17 2022"}
"v142" {"Visual Studio 16 2019"}
"v141" {"Visual Studio 15 2017"}
"mingw-w64" {"MinGW Makefiles"}
"mingw-w64_i686" {"MinGW Makefiles"}
}
$cmake_generator_architecture = switch ($env:PLATFORM)
{
"x86" {"Win32"}
"x64" {"x64"}
"mingw-w64" {""}
"mingw-w64_i686" {""}
}
build_script:
- cd "%APPVEYOR_BUILD_FOLDER%"
- set OPENSSL_ROOT=%OPENSSLPath%
- set PATH=%PATH%;%QTPATH%;%QTPATH%/bin;%OPENSSLPath%
- echo %PATH%
- echo %OPENSSL_ROOT%
- mkdir _build
- cd _build
- ps: |
if($cmake_generator_architecture) {
cmake -G "$generator" -A $cmake_generator_architecture -DCMAKE_BUILD_TYPE="$env:CONFIGURATION" ..
} else {
cmake -G "$generator" -DCMAKE_BUILD_TYPE="$env:CONFIGURATION" ..
}
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
& cmake --build . --target package --config $env:CONFIGURATION
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
test_script:
- cd "%APPVEYOR_BUILD_FOLDER%"/_build
- set PATH=%PATH%;%QTPATH%;%QTPATH%/bin
- echo %PATH%
- ctest --output-on-failure -C "%CONFIGURATION%"
on_finish:
- cd "%APPVEYOR_BUILD_FOLDER%"
- ps: |
$version = Select-String -Path .\CMakeLists.txt -Pattern "AusweisApp VERSION ([0-9.]+)" | % { $_.Matches[0].Groups[1].Value }
Update-AppveyorBuild -Version "$version-$env:APPVEYOR_BUILD_NUMBER"