Commit graph

15 commits

Author SHA1 Message Date
Marijn Suijten
d203745cfc ci: Install rustdoc-stripper in Nightly Rust image
This saves two build-jobs from performing the same (expensive!)
compilation+installation over and over again, when it is much cheaper to
cache it in the image instead.
2021-05-05 12:23:40 +02:00
Guillaume Desmottes
c3946eef7c ci: generate cobertura report directly
grcov 0.8.0 now has cobertura support so we no longer need to to export
to lcov format and then convert.

Extract the summary from the generated html so the metric matches the
one from the html report (for some reason the cobertura ones are
differents).

The new gitlab summary parsing regexp is now:
  <abbr .*>(\d+.\d+) %<\/abbr>
2021-04-23 12:28:54 +00:00
Guillaume Desmottes
ba0b9801e3 ci: use latest grcov release
0.8.0 now display a warning but no longer panic on the overflow issue.
2021-04-23 12:28:54 +00:00
Guillaume Desmottes
1b9c0482d1 ci: uses grcov 0.6.1
Newer versions suffer a regression breaking the job.
2021-04-16 09:02:36 +02:00
Guillaume Desmottes
01e1cfce54 ci: add coverage job
Uses the new llvm source-base coverage from nightly to generate coverage
reports:
- full html report as artifact
- cobertura report for gitlab MR integration
- output coverage summary for gitlab parsing

Here is the regexp to set in gitlab as "Test coverage parsing":
\s*lines\.*:\s*([\d\.]+%)

Ignore sys crates when calculating coverage are those are fully
generated anyway.

Resources:
- https://github.com/marco-c/rust-code-coverage-sample
- https://github.com/mozilla/grcov/issues/468#issuecomment-691615245
- https://www.greycastle.se/how-to-show-flutter-test-coverage-in-gitlab-ci/
2021-01-11 15:41:21 +01:00
Sebastian Dröge
2376f53fd4 ci: Update to Rust 1.49
Minimum supported version is still 1.48
2020-12-31 16:54:16 +02:00
Sebastian Dröge
94b5184c99 ci: Update to rustup 1.23 2020-11-27 17:33:10 +02:00
Sebastian Dröge
9c141a2fbf ci: Explicitly select stable Rust version
And for now we stay at 1.46.0 because 1.47.0 has a bug that prevents
clippy from succeeding.
2020-11-01 09:58:52 +02:00
Sebastian Dröge
01397b213d ci: set -e in all shell scripts
Otherwise errors are silently ignored.
2020-07-28 09:46:21 +03:00
Sebastian Dröge
1d3df7eaa5 ci: Update CI image for Rust 1.25, rustup 1.22.1, meson 0.55 and switch to cargo-outdated release 2020-07-28 09:44:37 +03:00
Guillaume Desmottes
2aa529fbdf ci: remove cargo-audit
It's been replaced by cargo-deny in all modules.

Don't regenerate images for now, it's not a problem to keep it around
until the next images update round.
2020-04-28 11:40:14 +02:00
Guillaume Desmottes
d31a9fece4 ci: install cargo-audit
Not needed for gstreamer-rs as it uses 'cargo deny' but still used by
gst-plugins-rs and gstreamer-rs-sys.
2020-04-27 14:12:26 +02:00
Guillaume Desmottes
932d4720c0 ci: fix CARGO_HOME caching
CARGO_HOME's semantic depends on when it's used in the pipeline:
- it's the install prefix when installing Cargo
- it's the crate cache location when building jobs

env.sh is sourced at the start of all jobs and was overidding the
CARGO_HOME path defined in the CI template for caching. Fix this by
moving the prefix install path to install-rust.sh.
2020-04-21 09:35:33 +00:00
Sebastian Dröge
47d839e58a Switch from cargo-audit to cargo-deny
This provides a superset of the features, including license checks.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/238
2020-04-16 12:12:45 +02:00
Guillaume Desmottes
429962bdd7 ci: use fdo ci template
Build our own images instead of manually installing everything we need
for each job. This should hopefully speed up our ci and make it more
robust.
2020-04-16 09:46:57 +02:00