forked from Governikus/AusweisApp2-Omapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
89 lines (75 loc) · 2.63 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
version: "{build}"
environment:
matrix:
- PlatformToolset: mingw-w64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
QTPath: C:\Qt\5.11\mingw53_32
OPENSSLPath: C:\OpenSSL-v111-Win32
- PlatformToolset: v140
platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
QTPath: C:\Qt\5.11\msvc2015_64
OPENSSLPath: C:\OpenSSL-v111-Win64
ARCHI: amd64
- PlatformToolset: v140
platform: Win32
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
QTPath: C:\Qt\5.11\msvc2015
OPENSSLPath: C:\OpenSSL-v111-Win32
ARCHI: x86
- PlatformToolset: v141
platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
QTPath: C:\Qt\5.11\msvc2017_64
OPENSSLPath: C:\OpenSSL-v111-Win64
ARCHI: amd64
configuration:
- Release
#- Debug
install:
- if "%PlatformToolset%"=="mingw-w64" set PATH=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;%PATH:C:\Program Files\Git\usr\bin;=%
- if "%PlatformToolset%"=="v140" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %archi%
- if "%PlatformToolset%"=="v141" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\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)
{
"v141" {"Visual Studio 15 2017"}
"v140" {"Visual Studio 14 2015"}
"mingw-w64" {"MinGW Makefiles"}
}
if ($env:PLATFORM -eq "x64")
{
$generator = "$generator Win64"
}
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: |
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 "AusweisApp2 VERSION ([0-9.]+)" | % { $_.Matches[0].Groups[1].Value }
Update-AppveyorBuild -Version "$version-$env:APPVEYOR_BUILD_NUMBER"