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
This commit is contained in:
trinity-1686a 2022-02-25 17:38:52 +01:00
parent 0ad45d437c
commit ee4ea74698
1 changed files with 7 additions and 6 deletions

View File

@ -57,7 +57,7 @@ rust-latest-async-std-rustls:
- amd64 - amd64
rust-nightly: rust-nightly:
stage: build stage: test
image: rustlang/rust:nightly image: rustlang/rust:nightly
allow_failure: true allow_failure: true
script: script:
@ -71,7 +71,7 @@ rust-nightly:
# and similar, for when nightly clippy has false positives. (There is no builtin # 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.) # 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 - 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: tags:
- amd64 - amd64
@ -79,19 +79,20 @@ coverage:
stage: test stage: test
image: rust:latest image: rust:latest
allow_failure: true allow_failure: true
variables:
RUSTFLAGS: "-Zinstrument-coverage"
LLVM_PROFILE_FILE: "arti-%p-%m.profraw"
script: script:
- apt-get update && apt-get install -y python3-pip python3-setuptools - apt-get update && apt-get install -y python3-pip python3-setuptools
- pip3 install beautifulsoup4 lxml - pip3 install beautifulsoup4 lxml
- rustup toolchain add nightly - rustup toolchain add nightly
- rustup default nightly - rustup default nightly
- rustup component add llvm-tools-preview - rustup component add llvm-tools-preview
- cargo install grcov - cp grcov $CARGO_HOME/bin/ || cargo install grcov
- cp $CARGO_HOME/bin/grcov .
# Generate report # Generate report
- ./maint/with_coverage cargo test --verbose --all-features - ./maint/with_coverage cargo test --verbose --all-features
- ./maint/with_coverage -f cobertura -o coverage.xml -c true - ./maint/with_coverage -f cobertura -o coverage.xml -c true
cache:
paths:
- grcov
artifacts: artifacts:
paths: paths:
- 'coverage' - 'coverage'