|
15 | 15 |
|
16 | 16 | jobs: |
17 | 17 | coverage: |
| 18 | + name: Run cargo coverage |
18 | 19 | runs-on: ubuntu-latest |
| 20 | + env: |
| 21 | + CARGO_TERM_COLOR: always |
19 | 22 | steps: |
20 | | - - uses: actions/checkout@v4 |
21 | | - - uses: actions-rs/toolchain@v1 |
| 23 | + - name: Checkout sources |
| 24 | + uses: actions/checkout@v4 |
| 25 | + - name: Install toolchain |
| 26 | + uses: actions-rs/toolchain@v1 |
22 | 27 | with: |
23 | | - toolchain: nightly-2024-08-02 |
| 28 | + toolchain: 1.81.0 |
| 29 | + profile: minimal |
24 | 30 | override: true |
25 | | - - name: Build |
26 | | - run: cargo build --release --all-features --all --verbose |
27 | | - - name: Run tests |
28 | | - run: cargo test --release --all-features --all --verbose |
29 | | - env: |
30 | | - CARGO_INCREMENTAL: '0' |
31 | | - RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_abort_tests' |
32 | | - RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_abort_tests' |
33 | | - - name: rust-grcov |
34 | | - # You may pin to the exact commit or the version. |
35 | | - # uses: actions-rs/grcov@bb47b1ed7883a1502fa6875d562727ace2511248 |
36 | | - uses: actions-rs/[email protected] |
37 | | - - name: Codecov |
38 | | - # You may pin to the exact commit or the version. |
39 | | - # uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 |
40 | | - uses: codecov/codecov-action@v5 |
41 | | - env: |
42 | | - CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} |
43 | | - with: |
44 | | - # Repository upload token - get it from codecov.io. Required only for private repositories |
45 | | - # token: # optional |
46 | | - # Specify whether the Codecov output should be verbose |
47 | | - verbose: true |
48 | | - fail_ci_if_error: true |
| 31 | + components: llvm-tools-preview |
| 32 | + - name: Install cargo-llvm-cov |
| 33 | + uses: taiki-e/install-action@cargo-llvm-cov |
| 34 | + - name: Generate code coverage |
| 35 | + run: sudo bash -c "ulimit -Sl 512 && ulimit -Hl 512 && sudo -u runner /home/runner/.cargo/bin/cargo llvm-cov --all-features --release --workspace --lcov --output-path lcov.info" |
| 36 | + - name: Upload coverage to Codecov |
| 37 | + run: bash <(curl -s https://codecov.io/bash) -f lcov.info -t ${{ secrets.CODECOV_TOKEN }} |
0 commit comments