From ee4ea7469805092d5d0ef8bf9772f2e70931bb6d Mon Sep 17 00:00:00 2001 From: trinity-1686a Date: Fri, 25 Feb 2022 17:38:52 +0100 Subject: [PATCH] attempt at making CI faster Move rust-nightly to stage test so it runs in parallel with coverage, which are the two longest jobs, and currently run in sequence. Don't document dependancies, should make the step about 50% faster Use about 12M of cache to not recompile grcov each time Don't compile grcov with coverage, we don't need it, it's probably slower both to compile and execute --- .gitlab-ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c9f54f57..d8868eef3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,7 +57,7 @@ rust-latest-async-std-rustls: - amd64 rust-nightly: - stage: build + stage: test image: rustlang/rust:nightly allow_failure: true script: @@ -71,7 +71,7 @@ rust-nightly: # and similar, for when nightly clippy has false positives. (There is no builtin # cfg flag for nightly, and a cargo "feature" would be bad with --all-features.) - cargo clippy --all-features --tests -- --cfg ci_arti_nightly -D clippy::dbg_macro -D clippy::print_stdout -D clippy::print_stderr - - RUSTDOCFLAGS="-Dwarnings" cargo doc --all-features --document-private-items + - RUSTDOCFLAGS="-Dwarnings" cargo doc --all-features --document-private-items --no-deps tags: - amd64 @@ -79,19 +79,20 @@ coverage: stage: test image: rust:latest allow_failure: true - variables: - RUSTFLAGS: "-Zinstrument-coverage" - LLVM_PROFILE_FILE: "arti-%p-%m.profraw" script: - apt-get update && apt-get install -y python3-pip python3-setuptools - pip3 install beautifulsoup4 lxml - rustup toolchain add nightly - rustup default nightly - rustup component add llvm-tools-preview - - cargo install grcov + - cp grcov $CARGO_HOME/bin/ || cargo install grcov + - cp $CARGO_HOME/bin/grcov . # Generate report - ./maint/with_coverage cargo test --verbose --all-features - ./maint/with_coverage -f cobertura -o coverage.xml -c true + cache: + paths: + - grcov artifacts: paths: - 'coverage'