Skip to content

Commit

Permalink
ci: use -Cinstrument-coverage instead of -Zprofile
Browse files Browse the repository at this point in the history
Support for -Zprofile has been removed: rust-lang/rust#131829
  • Loading branch information
cakebaker committed Nov 12, 2024
1 parent 50b7ec6 commit 28c728e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,17 @@ jobs:
- name: Checkout source code
uses: actions/checkout@v4

#- name: Initialize workflow
#shell: bash
#run: |
# mkdir -p ${{ vars.RUNNER_TEMP }}/coverage

- name: Install `rust` toolchain
run: |
## Install `rust` toolchain
rustup toolchain install nightly --no-self-update -c rustfmt --profile minimal
rustup default nightly
rustup component add llvm-tools-preview
- name: "`grcov` ~ install"
run: cargo install grcov
Expand All @@ -117,13 +123,15 @@ jobs:
cargo test --all --no-fail-fast ${{ matrix.cargo_flags }}
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off"
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off"
RUSTFLAGS: "-Cinstrument-coverage -Zcoverage-options=branch -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off"
RUSTDOCFLAGS: "-Cinstrument-coverage -Zcoverage-options=branch -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off"
LLVM_PROFILE_FILE: ${{ vars.RUNNER_TEMP }}"/find-%p-%m.profraw"

- name: Generate coverage data
id: grcov
run: |
grcov target/debug/ \
--binary-path=target/debug/ \
--branch \
--llvm \
--source-dir . \
Expand Down

0 comments on commit 28c728e

Please sign in to comment.