From 987f617459bafec2544c4dbb588a08837fc2baba Mon Sep 17 00:00:00 2001 From: Hugo Hakim Damer Date: Wed, 20 Nov 2024 14:53:30 +0100 Subject: [PATCH] fix(ci): replace removed -Zprofile with -Cinstrument-coverage for source-based coverage reports --- .github/workflows/check.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d384936..2d2c719 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -95,7 +95,7 @@ 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 @@ -103,11 +103,12 @@ jobs: - 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' + LLVM_PROFILE_FILE: 'target/debug/coverage/dcaf-%p-%m.profraw' + RUSTFLAGS: '-Cinstrument-coverage -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} + - run: zip ./target/debug/coverage/files.zip ./target/debug/deps/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: