summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2022-09-26 12:18:24 -0500
committerFederico Mena Quintero <federico@gnome.org>2022-09-26 12:18:24 -0500
commitadc2d2e0e21258bad797b4400fb2382988886989 (patch)
treea86ec955be0c584a2444d67b9ea8748956385055 /.gitlab-ci.yml
parenta18b13a10138f40093906735cf4ccceb965d2589 (diff)
downloadlibrsvg-adc2d2e0e21258bad797b4400fb2382988886989.tar.gz
CI: Move the coverage script to an actual shell script
I sometimes run this at home, and cutting&pasting things from .gitlab-ci.yml gets old pretty fast. So let's make this reusable. Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/754>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml20
1 files changed, 2 insertions, 18 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e43eaf5f..8f031893 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -302,25 +302,9 @@ coverage:
- job: opensuse-container@x86_64.stable
- job: check
artifacts: false
- variables:
- # Mixed gcc and Rust/LLVM coverage for the C API tests:
- # https://searchfox.org/mozilla-central/source/browser/config/mozconfigs/linux64/code-coverage#15
- CC: "clang"
- CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
- # RUSTFLAGS: "-Cinstrument-coverage"
- RUSTDOCFLAGS: "-Cinstrument-coverage"
- LLVM_PROFILE_FILE: "coverage-profiles/coverage-%p-%m.profraw"
- LDFLAGS: "--coverage -L/usr/lib64/clang/14.0.6/lib/linux"
- LIBS: "-lclang_rt.profile-x86_64"
- RUSTC_BOOTSTRAP: "1" # hack to make -Zprofile work on the non-nightly compiler
- CARGO_INCREMENTAL: "0" # -Zprofile (gcov) doesn't like incremental compilation
- RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off"
script:
- - mkdir -p _build
- - cd _build
- - ../autogen.sh --disable-gtk-doc --disable-vala --enable-debug
- - make
- - make -k check
+ - source ./ci/env.sh
+ - bash -x ./ci/build-with-coverage.sh
after_script:
- source ./ci/env.sh
- bash -x ./ci/gen-coverage.sh