]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Add meson build CI
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Sat, 5 Feb 2022 22:44:59 +0000 (02:44 +0400)
committerSimon McVittie <smcv@collabora.com>
Wed, 13 Jul 2022 19:36:13 +0000 (20:36 +0100)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
.gitlab-ci.yml
tools/ci-build.sh
tools/ci-install.sh
tools/docker/windows/Dockerfile

index 5591da74afa533b33eb4d04b822f3d2f711c9757..ee993cf15a9368508db497c9009460f530093641 100644 (file)
@@ -44,7 +44,7 @@ variables:
   # If you are hacking on them or need a them to rebuild, its enough
   # to change any part of the string of the image you want.
   ###
-  WINDOWS_TAG: "2022-01-07.1"
+  WINDOWS_TAG: "2022-02-06.2"
 
   UPSTREAM_BRANCH: 'master'
   UPSTREAM_REPO: 'dbus/dbus'
@@ -77,6 +77,17 @@ variables:
     reports:
       junit: $CI_PROJECT_DIR/test-results.xml
 
+.meson-common:
+  variables:
+    ci_buildsys: "meson"
+  artifacts:
+    reports:
+      junit: "$builddir/meson-logs/testlog.junit.xml"
+    name: "dbus-$CI_JOB_NAME"
+    when: always
+    paths:
+      - "$builddir/meson-logs/testlog.txt"
+
 windows amd64 image:
   stage: "build docker"
   variables:
@@ -165,6 +176,13 @@ debian cmake:
   variables:
     ci_buildsys: "cmake-dist"
 
+debian meson:
+  extends:
+    - .meson-common
+    - .debian-build
+  variables:
+    builddir: "ci-build-production-native"
+
 debian mingw32 autotools debug:
   extends: .debian-build
   variables:
@@ -240,6 +258,16 @@ opensuse mingw64 cmake debug:
     ci_local_packages: "no"
     ci_variant: "debug"
 
+opensuse mingw64 meson debug:
+  extends:
+    - .meson-common
+    - .suse-build
+  variables:
+    ci_host: "x86_64-w64-mingw32"
+    ci_local_packages: "no"
+    ci_variant: "debug"
+    builddir: "ci-build-$ci_variant-$ci_host"
+
 .ubuntu-build:
   extends: .unix-host-build
   image: "ubuntu:latest"
@@ -290,4 +318,24 @@ windows vs15-64 cmake:
     # FIXME: a few tests timeout on gitlab runner for unknown reason
     - cd build ; ctest -C Debug -VV --timeout 1200 -E '(dbus-daemon|monitor)' --output-junit $ci_cmake_junit_output
 
+windows-meson-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: -j1: for some reason on CI ninja: fatal: pipe: Too many open files
+    - C:\msys64\usr\bin\bash -lc "
+        meson build &&
+        ninja -j1 -C build &&
+        meson test -C build"
+
+windows-meson-vs15-x86:
+  extends: .win-build
+  script:
+    - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=x86 &&
+        meson build &&
+        meson test -C build"
+
 # vim:set sw=2 sts=2 et:
index 3772daad1d63538e1379c53035548dc2a435ecae..7b8f1e717fcc24faf6378fb165c110c626f1061e 100755 (executable)
@@ -427,6 +427,25 @@ case "$ci_buildsys" in
         ${make} install DESTDIR=$(pwd)/DESTDIR
         ( cd DESTDIR && find . -ls)
         ;;
+
+    (meson)
+        # The test coverage for OOM-safety is too verbose to be useful on
+        # travis-ci, and too slow when running under wine.
+        export DBUS_TEST_MALLOC_FAILURES=0
+
+        meson=meson
+        case "$ci_host" in
+            (*-w64-mingw32)
+                meson=mingw64-meson
+                ;;
+        esac
+        # FIXME: ducktype target fails on debian CI..
+        $meson setup -Dducktype_docs=disabled
+        $meson compile
+        [ "$ci_test" = no ] || $meson test
+        DESTDIR=DESTDIR $meson install
+        ( cd DESTDIR && find . -ls)
+        ;;
 esac
 
 # vim:set sw=4 sts=4 et:
index 48197c52e0f13f04e08b8f11316ae5149d8a7d0b..0d93566bc403a4c807a972d25f36aa628a63b2ab 100755 (executable)
@@ -169,6 +169,8 @@ case "$ci_distro" in
             libselinux1-dev
             libsystemd-dev
             libx11-dev
+            meson
+            ninja-build
             sudo
             valgrind
             wget
@@ -206,6 +208,7 @@ case "$ci_distro" in
             automake
             cmake
             libtool
+            meson
         )
 
         # docs
@@ -272,7 +275,7 @@ case "$ci_distro" in
                     "${packages[@]}"
                     mingw${bits}-cross-gcc-c++
                     mingw${bits}-libexpat-devel
-                    mingw${bits}-glib2-devel
+                    mingw${bits}-cross-meson
                 )
                 ;;
 
index c9a912002a28adbec38471510cca65fd5af66b41..bff4c501c3aa53c9e3512b799bec6a1094af49c2 100644 (file)
@@ -29,7 +29,7 @@ RUN (New-Object System.Net.WebClient).DownloadString('https://wrapdb.mesonbuild.
 RUN (New-Object System.Net.WebClient).DownloadString('https://zlib.net/fossils/') >$null
 
 # MinGW environment
-RUN c:\msys64\usr\bin\bash -lc 'pacman -S --noconfirm mingw-w64-ucrt-x86_64-toolchain expat glib2-devel'
+RUN c:\msys64\usr\bin\bash -lc 'pacman -S --noconfirm mingw-w64-ucrt-x86_64-toolchain expat glib2-devel ninja'
 
 # Visual Studio can't be installed with choco.
 # It depends on dotnetfx v4.8.0.20190930, which requires a reboot: dotnetfx (exit code 3010)