CI: emit cobertura artifact from only one job

I do not know what happens if multiple jobs declare
artifacts:reports:cobertura. Maybe the last job to finish wins? Who
cares, Gitlab can only show the results from one cobertura report in the
MR diff view.

Recently, the MR diffs have the coverage annotations, but there was a
time when they seemed to be missing. I don't know why.

Let's make sure the cobertura report Gitlab will use is from the "main"
build only: 64-bit Debian with full features and gcc.

I do not move the after_script, because maybe someone could have a
reason to look at arch-specific coverage reports, so I want to leave the
HTML there in the artifacts.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 3 years ago
parent 533950cc31
commit 3569de7cd1
  1. 6
      .gitlab-ci.yml

@ -287,14 +287,14 @@ aarch64-debian-container_prep:
- ninja -C "$BUILDDIR" coverage-html > "$BUILDDIR/meson-logs/ninja-coverage-html.txt" - ninja -C "$BUILDDIR" coverage-html > "$BUILDDIR/meson-logs/ninja-coverage-html.txt"
- ninja -C "$BUILDDIR" coverage-xml - ninja -C "$BUILDDIR" coverage-xml
- sed -i -e 's/\/build-weston-build-full//' -e 's/\"..\//\"/' "$BUILDDIR/meson-logs/coverage.xml" - sed -i -e 's/\/build-weston-build-full//' -e 's/\"..\//\"/' "$BUILDDIR/meson-logs/coverage.xml"
artifacts:
reports:
cobertura: $BUILDDIR/meson-logs/coverage.xml
x86_64-debian-full-build: x86_64-debian-full-build:
extends: extends:
- .test-env-debian-x86_64 - .test-env-debian-x86_64
- .build-options-full - .build-options-full
artifacts:
reports:
cobertura: $BUILDDIR/meson-logs/coverage.xml
aarch64-debian-full-build: aarch64-debian-full-build:
extends: extends:

Loading…
Cancel
Save