icinga2/appveyor.yml

72 lines
2.1 KiB
YAML
Raw Normal View History

2018-02-02 17:22:15 +01:00
---
version: 2.9.0.dev.{build}
os: Visual Studio 2017
2018-08-02 14:42:14 +02:00
platform: x64
2018-02-02 17:22:15 +01:00
environment:
CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
2018-08-02 14:42:14 +02:00
VSCMD_VER: 15.0
2018-02-02 17:22:15 +01:00
BOOST_ROOT: 'C:\Libraries\boost_1_65_1'
BOOST_LIBRARYDIR: 'C:\Libraries\boost_1_65_1\lib64-msvc-14.1'
BISON_BINARY: 'C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_bison.exe'
FLEX_BINARY: 'C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_flex.exe'
CMAKE_BUILD_TYPE: Debug
2018-02-02 17:22:15 +01:00
branches:
only:
- master
cache:
- build -> appveyor.yml
2018-02-02 17:22:15 +01:00
- C:\ProgramData\chocolatey\lib\winflexbison3
install:
- ps: |
if (-not (Test-Path "C:\ProgramData\chocolatey\lib\winflexbison3")) {
2018-08-02 14:42:14 +02:00
& choco install winflexbison3
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
2018-02-02 17:22:15 +01:00
}
2018-08-02 14:42:14 +02:00
# why that env handling, see
# https://help.appveyor.com/discussions/questions/18777-how-to-use-vcvars64bat-from-powershell#comment_44999171
2018-02-02 17:22:15 +01:00
before_build:
- ps: |
2018-08-02 14:42:14 +02:00
$bits = $env:PLATFORM -replace "^x", ""
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars${bits}.bat`" && set > `"${env:TEMP}\vcvars.txt`""
Get-Content "$env:TEMP\vcvars.txt" | Foreach-Object {
if ($_ -match "^(VSCMD.*?)=(.*)$") {
Set-Content ("env:" + $matches[1]) $matches[2]
}
}
if (-not (Test-Path ".\build\vendor\OpenSSL")) {
& .\tools\win32\download-openssl.ps1
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
& .\tools\win32\configure.ps1
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
2018-02-02 17:22:15 +01:00
del build\Icinga*.msi
build_script:
- ps: |
2018-08-02 14:42:14 +02:00
& .\tools\win32\build.ps1
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
2018-02-02 17:22:15 +01:00
test_script:
- ps: |
2018-08-02 14:42:14 +02:00
& .\tools\win32\test.ps1
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
2018-02-02 17:22:15 +01:00
# Disable until we really need them
# https://github.com/Icinga/icinga2/issues/6106
# https://help.appveyor.com/discussions/problems/10253-maximum-allowed-artifact-storage-size-of-1000-mb-will-be-exceeded
#artifacts:
#- path: build/Icinga*.msi
#- path: build/choco/*.nupkg
#- path: build/Test.xml
2018-02-02 17:22:15 +01:00
deploy: off