gitlab-ci: add cmake Windows builds with VS and mingw-ucrt

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2022-01-04 15:16:02 +04:00
parent 98c903656d
commit 84e60c55e4

View file

@ -156,4 +156,39 @@ xenial:
ci_distro: "ubuntu"
ci_suite: "xenial"
.win-build:
image: $WINDOWS_IMAGE
stage: build
tags:
- 'docker'
- 'windows'
- '1809'
needs:
- "windows amd64 docker"
timeout: '2h'
before_script:
- $ErrorActionPreference = "Stop"
- $WarningPreference = "Stop"
- $env:DBUS_TEST_MALLOC_FAILURES = 0
- $env:PATH += ";C:\bin"
windows-cmake-mingw-ucrt64:
extends: .win-build
script:
- $env:MSYSTEM = "UCRT64"
- $env:CHERE_INVOKING = "1"
- $env:MSYS2_PATH_TYPE = "inherit"
- $env:PATH += ";C:\msys64\usr\bin"
# FIXME: glib from msys2 has issues, disable it for now
- C:\msys64\usr\bin\bash -lc 'cmake -G \"MinGW Makefiles\" -S . -B build -DDBUS_WITH_GLIB=OFF && cmake --build build --config Release'
windows-cmake-vs15:
extends: .win-build
script:
- cmake -DCMAKE_PREFIX_PATH=C:/ -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Debug -DDBUS_ENABLE_VERBOSE_MODE=OFF -S . -B build
- cmake --build build --config Debug
- cmake --install build --config Debug
# FIXME: a few tests timeout on gitlab runner for unknown reason
- cd build ; ctest -C Debug -VV --timeout 1200 -E '(dbus-daemon|monitor)'
# vim:set sw=2 sts=2 et: