Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: grcov -> llvm-cov (fix test coverage issues). #31

Merged
merged 2 commits into from
Sep 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 7 additions & 24 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Select Rust nightly build
run: rustup default nightly
- name: Test with profiling
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: >-
-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code
-Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort
RUSTDOCFLAGS: >-
-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code
-Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort
run: cargo test --all-features
- name: Install grcov
run: |
curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 \
| tar jxf -
- name: Run grcov
run: |
mkdir coverage
./grcov ./target/debug/ -s . -t lcov --llvm --branch --ignore-not-existing \
--ignore "/*" --ignore "src/error.rs" \
--excl-line '#\[|=> panic!|unreachable!|Io\(std::io::Error\)|//!|///|^[ }]*$' \
--excl-br-line '#\[|=> panic!|unreachable!|assert_..!|//!|///' -o ./coverage/lcov.info
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: mkdir coverage && cargo llvm-cov --tests --all-features --lcov --output-path ./coverage/lcov.info
- name: Send to Coveralls
uses: coverallsapp/github-action@master
with:
Expand Down
Loading