]> granicus.if.org Git - icinga2/blob - appveyor.yml
Merge pull request #6503 from peteeckel/fix/reduce-loglevel-plugin-env-6460
[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
15 branches:
16   only:
17     - master
18
19 cache:
20 - build -> appveyor.yml
21 - C:\ProgramData\chocolatey\lib\winflexbison3
22
23 install:
24 - ps: |
25     if (-not (Test-Path "C:\ProgramData\chocolatey\lib\winflexbison3")) {
26       & choco install winflexbison3
27       if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
28     }
29
30 # why that env handling, see
31 # https://help.appveyor.com/discussions/questions/18777-how-to-use-vcvars64bat-from-powershell#comment_44999171
32 before_build:
33 - ps: |
34     $bits = $env:PLATFORM -replace "^x", ""
35     cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars${bits}.bat`" && set > `"${env:TEMP}\vcvars.txt`""
36     Get-Content "$env:TEMP\vcvars.txt" | Foreach-Object {
37       if ($_ -match "^(VSCMD.*?)=(.*)$") {
38         Set-Content ("env:" + $matches[1]) $matches[2]
39       }
40     }
41
42     if (-not (Test-Path ".\build\vendor\OpenSSL")) {
43       & .\tools\win32\download-openssl.ps1
44       if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
45     }
46
47     & .\tools\win32\configure.ps1
48     if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
49
50     del build\Icinga*.msi
51
52 build_script:
53 - ps: |
54     & .\tools\win32\build.ps1
55     if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
56
57 test_script:
58 - ps: |
59     & .\tools\win32\test.ps1
60     if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
61
62 # Disable until we really need them
63 # https://github.com/Icinga/icinga2/issues/6106
64 # https://help.appveyor.com/discussions/problems/10253-maximum-allowed-artifact-storage-size-of-1000-mb-will-be-exceeded
65 #artifacts:
66 #- path: build/Icinga*.msi
67 #- path: build/choco/*.nupkg
68 #- path: build/Test.xml
69
70 deploy: off