Skip to content

Commit e2f1338

Browse files
committed
Use Rust stable version to compute code coverage
1 parent 21a2f28 commit e2f1338

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.taskcluster.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,24 +96,25 @@ tasks:
9696
workerType: ci
9797
payload:
9898
maxRunTime: 3600
99-
image: "rustlang/rust:nightly"
99+
image: "rust:buster"
100100
env:
101101
CODECOV_TOKEN: 4df01912-087e-489a-be28-25aa911cb9d2
102102
CARGO_INCREMENTAL: 0
103-
RUSTFLAGS: -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort
104-
RUSTDOCFLAGS: -Cpanic=abort
103+
RUSTFLAGS: -Cinstrument-coverage -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off
104+
RUSTDOCFLAGS: -Cinstrument-coverage -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off
105+
LLVM_PROFILE_FILE: rust-code-analysis-%p-%m.profraw
105106
command:
106107
- "/bin/bash"
107108
- "-cx"
108109
- "apt-get -qq update &&
109110
apt-get -qq install -y zip &&
110111
curl -L https://github.com/mozilla/grcov/releases/download/v0.8.6/grcov-v0.8.6-x86_64-unknown-linux-gnu.tar.gz | tar xz &&
112+
rustup component add llvm-tools-preview &&
111113
git clone --quiet ${repository} &&
112114
cd rust-code-analysis &&
113115
git -c advice.detachedHead=false checkout ${head_rev} &&
114-
cargo test --workspace --verbose --all-features &&
115-
zip -0 ccov.zip `find . -name 'rust_code_analysis*.gc*' -print` &&
116-
../grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore '/*' -o lcov.info &&
116+
cargo test --workspace --verbose --all-features --target x86_64-unknown-linux-gnu &&
117+
../grcov . --binary-path ./target/ -s . -t lcov --llvm --branch --ignore-not-existing --ignore '/*' -o lcov.info &&
117118
bash <(curl -s https://codecov.io/bash) -f lcov.info"
118119
metadata:
119120
name: rust-code-analysis grcov test

0 commit comments

Comments
 (0)