]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
gitlab-ci: add cmake Windows builds with VS and mingw-ucrt
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 4 Jan 2022 11:16:02 +0000 (15:16 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 21 Jan 2022 17:16:45 +0000 (21:16 +0400)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
.gitlab-ci.yml

index 5b1838903bc8722ae20cd52978bd7206899b00b3..d70b94afffff097ca4c4cfd9fd3b2be91c03e532 100644 (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: