From 3e74978f74154935afb53675aa304dc689399899 Mon Sep 17 00:00:00 2001 From: Jacob Persson <7156+typfel@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:06:02 +0100 Subject: [PATCH] chore: fix broken code coverage job --- .github/workflows/coverage.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 487b20aa2..97398941f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -12,23 +12,28 @@ jobs: uses: actions/checkout@v3 with: submodules: true - - - uses: dtolnay/rust-toolchain@master + - uses: dtolnay/rust-toolchain@nightly + with: + components: rustc, rust-std, cargo, llvm-tools, llvm-tools-preview + - uses: baptiste0928/cargo-install@v3 with: - toolchain: nightly + crate: grcov - uses: Swatinem/rust-cache@v2 - name: Run profiling tests - run: cargo test --no-fail-fast -p openmls + run: | + mkdir -p target/debug/coverage + cargo test --no-fail-fast -p openmls env: CARGO_INCREMENTAL: '0' - RUSTFLAGS: '-Cinstrument-coverage -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' - RUSTDOCFLAGS: '-Cinstrument-coverage -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' + LLVM_PROFILE_FILE: 'target/debug/coverage/openmls-%p-%m.profraw' + RUSTFLAGS: '-Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' + RUSTDOCFLAGS: '-Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' - name: Run grcov id: coverage - uses: actions-rs/grcov@v0.1 + run: grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing -o ./target/debug/coverage/ - name: Upload to codecov.io uses: codecov/codecov-action@v3 with: - files: ${{ steps.coverage.outputs.report }} + files: target/debug/coverage/lcov