Skip to content

Commit

Permalink
Fix coverage CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
gferon authored Nov 10, 2024
1 parent 45c39d3 commit c6b6eac
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ jobs:
strategy:
fail-fast: false
matrix:
toolchain: ["stable", "beta", "nightly", "1.75"]
toolchain: ["stable", "beta", "1.75"]
include:
- toolchain: nightly
coverage: true
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -51,6 +54,7 @@ jobs:
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: llvm-tools

- name: Configure CI cache
uses: Swatinem/rust-cache@v2
Expand All @@ -67,13 +71,14 @@ jobs:
run: cargo +${{ steps.rustc.outputs.name }} test --all-targets --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
LLVM_PROFILE_FILE: 'libsignal-service-%p-%m.profraw'
RUSTFLAGS: '-Cinstrument-coverage'
RUSTDOCFLAGS: '-Cinstrument-coverage'

- name: Generate code coverage
uses: actions-rs/[email protected]
if: ${{ matrix.coverage }}
if: matrix.toolchain == 'nightly'

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
if: ${{ matrix.coverage }}
if: matrix.toolchain == 'nightly'

0 comments on commit c6b6eac

Please sign in to comment.