summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMarco Trevisan (TreviƱo) <mail@3v1n0.net>2020-05-06 15:27:41 +0200
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2020-05-07 22:08:44 +0000
commit5c4938e47923333001508d39e5cd96bb2cdff186 (patch)
tree440acb7f5c9d17f17f3079fcb9b34710a96ea2dd /.gitlab-ci.yml
parent322b51cded630fb36f1759ebb608fe4985bd228b (diff)
downloadmutter-5c4938e47923333001508d39e5cd96bb2cdff186.tar.gz
ci: Enable coverage reports in test build
While we don't have an high number of tests, we still have some code coverage and so we can track this via gitlab CI, given that it supports it natively. So add gcovr to the DockerFile dependency, build with -Db_coverage=true meson native parameter, and add another manual job to make ninja to generate the coverage reports on requests or in any master or tag ref. Keep the artifacts around to be able to browse the generated HTML files and eventually print the text reports so that they can be parsed by gitlab. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1236
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml23
1 files changed, 22 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0e2fbbcae..0dad67390 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,6 +4,7 @@ stages:
- review
- build
- test
+ - coverage
check-commit-log:
stage: review
@@ -17,7 +18,7 @@ check-commit-log:
build-mutter:
stage: build
script:
- - meson . build -Dbuildtype=debugoptimized -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr
+ - meson . build -Dbuildtype=debugoptimized -Db_coverage=true -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr
- ninja -C build
- ninja -C build install
artifacts:
@@ -74,10 +75,30 @@ test-mutter:
- >
dbus-run-session -- xvfb-run -s '+iglx -noreset'
meson test -C build --no-rebuild -t 10 --verbose --no-stdsplit --print-errorlogs --wrap catchsegv
+ artifacts:
+ expire_in: 1 day
+ paths:
+ - build
only:
- merge_requests
- /^.*$/
+test-mutter-coverage:
+ stage: coverage
+ dependencies:
+ - test-mutter
+ script:
+ - ninja -C build coverage
+ - cat build/meson-logs/coverage.txt
+ artifacts:
+ paths:
+ - build/meson-logs
+ when: manual
+ except:
+ refs:
+ - tags
+ - master
+
can-build-gnome-shell:
stage: test
dependencies: