diff options
author | Niklas Haas <git@haasn.xyz> | 2020-05-27 17:24:03 +0300 |
---|---|---|
committer | Jean-Baptiste Kempf <jb@videolan.org> | 2020-06-07 17:55:06 +0300 |
commit | 2b98fd286cbe6768ce9877314cba9fc4ffa11259 (patch) | |
tree | 454c646ad65fdd781217773cb14ad72c58c388b7 /.gitlab-ci.yml | |
parent | a2f90805e00a9f7e0aec50a7b7d3abcd670cad14 (diff) |
CI: Enable coverage reports
Blacklisted some files not directly relevant to the codebase (such as
tests, tools and debugging functions).
The coverage HTML report gets attached as a build artifact, although
unfortunately we can't link directly to the `index.html`. We also attach
the coverage XML as a cobertura report, although I'm not sure if it does
anything.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9cd9b1c..c921b6a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: - test .debian-amd64-common: - image: registry.videolan.org/dav1d-debian-unstable:20200306210534 + image: registry.videolan.org/dav1d-debian-unstable:20200602183013 stage: build tags: - docker @@ -383,8 +383,21 @@ test-debian: - meson build --buildtype release -Dtestdata_tests=true -Dlogging=false + -Db_coverage=true - ninja -C build - cd build && time meson test -v + - ninja coverage-html + - mv meson-logs/coveragereport ../coverage + - ninja coverage-xml + - grep -Eo 'line-rate="[^"]+"' meson-logs/coverage.xml | head -n 1 | + grep -Eo '[0-9.]+' | awk '{ print "coverage:", $1 * 100 } ' + coverage: '/^coverage: (\d+.\d+)$/' + artifacts: + expose_as: 'Coverage HTML report' + paths: + - coverage/ + reports: + cobertura: build/meson-logs/coverage.xml test-debian-asm: extends: |