Skip to content

Commit

Permalink
fix(ci): replace removed -Zprofile with -Cinstrument-coverage for sou…
Browse files Browse the repository at this point in the history
…rce-based coverage reports
  • Loading branch information
pulsastrix committed Nov 20, 2024
1 parent 2520c0e commit d2b3d70
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,20 @@ jobs:
submodules: true
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustc, rust-std, cargo, llvm-tools
components: rustc, rust-std, cargo, llvm-tools, llvm-tools-preview
- uses: baptiste0928/cargo-install@v3
with:
crate: grcov
- run: cargo clean
- run: mkdir -p ./target/debug/coverage
- run: cargo test --all-features --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
- run: mkdir ./target/debug/coverage
- run: zip ./target/debug/coverage/files.zip ./target/debug/deps/dcaf-*.gcda ./target/debug/deps/dcaf-*.gcno
- 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}
LLVM_PROFILE_FILE: 'target/debug/coverage/dcaf-%p-%m.profraw'
RUSTFLAGS: '-Cinstrument-coverage -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-C instrument-coverage -Cpanic=abort -Zpanic_abort_tests -Z unstable-options --persist-doctests target/debug/'
- run: zip ./target/debug/coverage/files.zip ./target/debug/coverage/dcaf-*.profraw
- 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}
- name: Coveralls upload
uses: coverallsapp/github-action@main
with:
Expand Down

0 comments on commit d2b3d70

Please sign in to comment.