summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-03-30 17:44:49 +0200
committerJustus Winter <justus@sequoia-pgp.org>2021-04-26 11:29:52 +0200
commit20f09930546fda71148bbb5718dba4cf72b73bf1 (patch)
tree33e8493d51018c174914ae83a98777da5936795c
parent7961a663239567089508c7962a6c77d22b588c3a (diff)
ci: Add coverage testing.justus/ci-coverage
-rw-r--r--.gitlab-ci.yml32
1 files changed, 32 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d8dbc31d..aba8279e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -263,6 +263,38 @@ windows-msvc:
variables:
CFLAGS: "" # Silence some C warnings when compiling with MSVC
+coverage:
+# XXX If this works, only do it occasionally.
+# only:
+# - web
+# - scheduled
+ tags:
+ - self-hosted
+ stage: build
+ image: rustlang/rust:nightly-slim
+
+ before_script:
+ - apt update -y -qq
+ - apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 clang libclang-dev llvm pkg-config nettle-dev libssl-dev cmake zlib1g-dev
+ - if [ -d $CARGO_TARGET_DIR ]; then find $CARGO_TARGET_DIR | wc --lines; du -sh $CARGO_TARGET_DIR; fi
+ - if [ -d $CARGO_HOME ]; then find $CARGO_HOME | wc --lines; du -sh $CARGO_HOME; fi
+ - rustc --version
+ - cargo --version
+ - clang --version
+ - cargo install cargo-tarpaulin
+ - mkdir coverage
+
+ script:
+ - cargo tarpaulin -p buffered-reader -p sequoia-openpgp -p sequoia-openpgp --run-types Tests --run-types Doctests -o Html --output-dir $(pwd)/coverage
+
+ artifacts:
+ paths:
+ - coverage
+
+ variables:
+ CARGO_TARGET_DIR: $CI_PROJECT_DIR/../target.$CI_CONCURRENT_ID.rust-nightly
+ RUSTFLAGS: -D warnings -A unused-parens
+
variables:
DEBIAN_FRONTEND: noninteractive
CARGO_HOME: $CI_PROJECT_DIR/../cargo