]> granicus.if.org Git - icinga2/blob - appveyor.yml
Merge pull request #6821 from Icinga/bugfix/downtimes-disappear-satellite-6542
[icinga2] / appveyor.yml
1 ---
2 version: 2.9.0.dev.{build}
3
4 os: Visual Studio 2017
5 platform: x64
6
7 environment:
8   CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
9   VSCMD_VER: 15.0
10   BOOST_ROOT: 'C:\Libraries\boost_1_65_1'
11   BOOST_LIBRARYDIR: 'C:\Libraries\boost_1_65_1\lib64-msvc-14.1'
12   BISON_BINARY: 'C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_bison.exe'
13   FLEX_BINARY: 'C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_flex.exe'
14   CMAKE_BUILD_TYPE: Debug
15
16 branches:
17   only:
18     - master
19
20 cache:
21 - build -> appveyor.yml
22 - C:\ProgramData\chocolatey\lib\winflexbison3
23
24 install:
25 - ps: |
26     if (-not (Test-Path "C:\ProgramData\chocolatey\lib\winflexbison3")) {
27       & choco install winflexbison3
28       if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
29     }
30
31 # why that env handling, see
32 # https://help.appveyor.com/discussions/questions/18777-how-to-use-vcvars64bat-from-powershell#comment_44999171
33 before_build:
34 - ps: |
35     $bits = $env:PLATFORM -replace "^x", ""
36     cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars${bits}.bat`" && set > `"${env:TEMP}\vcvars.txt`""
37     Get-Content "$env:TEMP\vcvars.txt" | Foreach-Object {
38       if ($_ -match "^(VSCMD.*?)=(.*)$") {
39         Set-Content ("env:" + $matches[1]) $matches[2]
40       }
41     }
42
43     if (-not (Test-Path ".\build\vendor\OpenSSL")) {
44       & .\tools\win32\download-openssl.ps1
45       if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
46     }
47
48     & .\tools\win32\configure.ps1
49     if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
50
51     del build\Icinga*.msi
52
53 build_script:
54 - ps: |
55     & .\tools\win32\build.ps1
56     if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
57
58 test_script:
59 - ps: |
60     & .\tools\win32\test.ps1
61     if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
62
63 # Disable until we really need them
64 # https://github.com/Icinga/icinga2/issues/6106
65 # https://help.appveyor.com/discussions/problems/10253-maximum-allowed-artifact-storage-size-of-1000-mb-will-be-exceeded
66 #artifacts:
67 #- path: build/Icinga*.msi
68 #- path: build/choco/*.nupkg
69 #- path: build/Test.xml
70
71 deploy: off