diff options
author | Alex Richardson <arichardson.kde@gmail.com> | 2022-03-20 00:40:22 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2022-05-17 10:48:06 +0000 |
commit | f366b38f318034799336b0fde483b63e99d580ba (patch) | |
tree | b93c953529e94bbf49f40f88729d479e39f7121e /.gitlab-ci.yml | |
parent | f385a747b538da9dd46f5b750a58dada9e9bda3e (diff) | |
download | dbus-f366b38f318034799336b0fde483b63e99d580ba.tar.gz |
tools/ci-build.sh: Add a ci_cmake_junit_output argument
CMake 3.21 can emit JUnit XML test results which can be visualized by
GitLab. This also updates the gitlab CI config file to make use of this
feature whenever possible.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae268459..baf34560 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -62,6 +62,21 @@ variables: FDO_DISTRIBUTION_VERSION: 'leap' FDO_DISTRIBUTION_TAG: '2022-04-17' # Bump this version on every ci-install.sh change +.cmake-common: + variables: + # Default to generating JUnit XML output for all CMake jobs. + # This works fine even for older versions of CMake since the extra arguments + # to CTest are ignored and a missing JUnit XML file does not fail the build. + ci_cmake_junit_output: "$CI_PROJECT_DIR/test-results.xml" + ci_buildsys: "cmake" + artifacts: + name: dbus-$CI_JOB_NAME + when: always + paths: + - $CI_PROJECT_DIR/test-results.xml + reports: + junit: $CI_PROJECT_DIR/test-results.xml + windows amd64 image: stage: "build docker" variables: @@ -143,7 +158,9 @@ debian autotools legacy: ci_variant: "legacy" debian cmake: - extends: .debian-build + extends: + - .cmake-common + - .debian-build when: manual variables: ci_buildsys: "cmake-dist" @@ -155,10 +172,11 @@ debian mingw32 autotools debug: ci_variant: "debug" debian mingw32 cmake: - extends: .debian-build + extends: + - .cmake-common + - .debian-build when: manual variables: - ci_buildsys: "cmake" ci_host: "i686-w64-mingw32" debian mingw64 autotools: @@ -167,7 +185,9 @@ debian mingw64 autotools: ci_host: "x86_64-w64-mingw32" debian mingw64 cmake debug: - extends: .debian-build + extends: + - .cmake-common + - .debian-build when: manual variables: ci_buildsys: "cmake" @@ -196,23 +216,26 @@ opensuse image: stage: build opensuse cmake: - extends: .suse-build + extends: + - .cmake-common + - .suse-build variables: - ci_buildsys: "cmake" ci_local_packages: "no" opensuse mingw32 cmake: - extends: .suse-build + extends: + - .cmake-common + - .suse-build when: manual variables: - ci_buildsys: "cmake" ci_host: "i686-w64-mingw32" ci_local_packages: "no" opensuse mingw64 cmake debug: - extends: .suse-build + extends: + - .cmake-common + - .suse-build variables: - ci_buildsys: "cmake" ci_host: "x86_64-w64-mingw32" ci_local_packages: "no" ci_variant: "debug" @@ -257,12 +280,14 @@ windows msys64 ucrt64 cmake: - C:\msys64\usr\bin\bash -lc 'cmake -G \"MinGW Makefiles\" -S . -B build -DDBUS_WITH_GLIB=OFF && cmake --build build --config Release' windows vs15-64 cmake: - extends: .win-build + extends: + - .cmake-common + - .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)' + - cd build ; ctest -C Debug -VV --timeout 1200 -E '(dbus-daemon|monitor)' --output-junit $ci_cmake_junit_output # vim:set sw=2 sts=2 et: |