Skip to content

Commit d2b3d70

Browse files
committed
fix(ci): replace removed -Zprofile with -Cinstrument-coverage for source-based coverage reports
1 parent 2520c0e commit d2b3d70

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/check.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,20 @@ jobs:
9595
submodules: true
9696
- uses: dtolnay/rust-toolchain@nightly
9797
with:
98-
components: rustc, rust-std, cargo, llvm-tools
98+
components: rustc, rust-std, cargo, llvm-tools, llvm-tools-preview
9999
- uses: baptiste0928/cargo-install@v3
100100
with:
101101
crate: grcov
102102
- run: cargo clean
103+
- run: mkdir -p ./target/debug/coverage
103104
- run: cargo test --all-features --no-fail-fast
104105
env:
105106
CARGO_INCREMENTAL: '0'
106-
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
107-
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
108-
- run: mkdir ./target/debug/coverage
109-
- run: zip ./target/debug/coverage/files.zip ./target/debug/deps/dcaf-*.gcda ./target/debug/deps/dcaf-*.gcno
110-
- run: grcov ./target/debug/coverage/files.zip -s . --service-name "Continuous Integration" --commit-sha ${GITHUB_SHA} -t coveralls --branch --ignore-not-existing --ignore "../*" --ignore "/*" --ignore "*/test_helper.rs" -o ./target/debug/coverage/ --token=${COVERALLS_TOKEN}
107+
LLVM_PROFILE_FILE: 'target/debug/coverage/dcaf-%p-%m.profraw'
108+
RUSTFLAGS: '-Cinstrument-coverage -Cpanic=abort -Zpanic_abort_tests'
109+
RUSTDOCFLAGS: '-C instrument-coverage -Cpanic=abort -Zpanic_abort_tests -Z unstable-options --persist-doctests target/debug/'
110+
- run: zip ./target/debug/coverage/files.zip ./target/debug/coverage/dcaf-*.profraw
111+
- run: grcov ./target/debug/coverage/files.zip -s . --binary-path ./target/debug/ --service-name "Continuous Integration" --commit-sha ${GITHUB_SHA} -t coveralls --branch --ignore-not-existing --ignore "../*" --ignore "/*" --ignore "*/test_helper.rs" -o ./target/debug/coverage/ --token=${COVERALLS_TOKEN}
111112
- name: Coveralls upload
112113
uses: coverallsapp/github-action@main
113114
with:

0 commit comments

Comments
 (0)