From c46678dfd4da9e9b6ff77a3f4767e1770c443900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 7 Jul 2022 16:47:24 +0200 Subject: [PATCH] CI: run benchmarks instead of tests --- .gitlab-ci.yml | 26 ++++---------------------- .gitlab-ci/run-tests.sh | 1 + .gitlab-ci/test-msvc.bat | 2 +- .gitlab-ci/test-msys2.sh | 16 +--------------- 4 files changed, 7 insertions(+), 38 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8fe839a75..c8dd3c4d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,7 +68,7 @@ fedora-x86_64: stage: build needs: [] variables: - CFLAGS: "-coverage -ftest-coverage -fprofile-arcs" + CFLAGS: "-fprofile-arcs" script: - meson ${MESON_COMMON_OPTIONS} --werror @@ -79,13 +79,9 @@ fedora-x86_64: -Dsystemtap=true -Ddtrace=true -Dinstalled_tests=true - -Dgtk_doc=true _build - ninja -C _build - - mkdir -p _coverage - - lcov --config-file .lcovrc --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov" - .gitlab-ci/run-tests.sh - - lcov --config-file .lcovrc --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov" artifacts: reports: junit: "_build/meson-logs/testlog.junit.xml" @@ -261,6 +257,7 @@ cross-android_arm64: # FIXME: add --werror - meson ${MESON_COMMON_OPTIONS} --cross-file=.gitlab-ci/cross_file_android_arm64_31.txt _build - ninja -C _build + - meson test -C _build --benchmark -v --timeout-multiplier 10 cross-mingw64: extends: @@ -271,6 +268,7 @@ cross-mingw64: # FIXME: Add --werror - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build - ninja -C _build + - meson test -C _build --benchmark -v --timeout-multiplier 10 artifacts: reports: junit: "_build/meson-logs/testlog.junit.xml" @@ -465,22 +463,6 @@ macos: - "_build/glib/glibconfig.h" - "_build/meson-logs" -coverage: - extends: .only-default - image: $FEDORA_IMAGE - stage: coverage - needs: ['fedora-x86_64', 'msys2-mingw32'] - artifacts: - name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" - expire_in: 1 week - paths: - - _coverage/ - before_script: - - bash .gitlab-ci/show-execution-environment.sh - script: - - bash -x ./.gitlab-ci/coverage-docker.sh - coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/' - scan-build: extends: - .build-linux @@ -545,7 +527,7 @@ pages: stage: deploy only: - main - needs: ['coverage', 'style-check-diff'] + needs: ['style-check-diff'] script: - mv _coverage/ public/ artifacts: diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh index 86402dcaf..441e015a1 100755 --- a/.gitlab-ci/run-tests.sh +++ b/.gitlab-ci/run-tests.sh @@ -2,6 +2,7 @@ meson test \ -C _build \ + --benchmark -v \ --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \ --no-suite flaky \ "$@" diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index 37976d4d0..ccee8c832 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -17,7 +17,7 @@ meson %args% _build || goto :error ninja -C _build || goto :error :: FIXME: dont ignore test errors -meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% --no-suite flaky +meson test -C _build --benchmark -v --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% --no-suite flaky :: FIXME: can we get code coverage support? diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index d891ee008..78b27d33d 100755 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -43,20 +43,6 @@ meson --werror --buildtype debug _build cd _build ninja -lcov \ - --quiet \ - --config-file "${DIR}"/.lcovrc \ - --directory "${DIR}/_build" \ - --capture \ - --initial \ - --output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov" - # FIXME: fix the test suite -meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" --no-suite flaky || true +meson test --benchmark -v --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" --no-suite flaky || true -lcov \ - --quiet \ - --config-file "${DIR}"/.lcovrc \ - --directory "${DIR}/_build" \ - --capture \ - --output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"