Skip to content

Commit

Permalink
try llvm-cov
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbus committed Feb 23, 2024
1 parent 2bc02e0 commit 2f589cf
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,25 @@ jobs:
- name: Setup rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, llvm-tools-preview
components: llvm-tools-preview
toolchain: stable

- name: Run tests
env:
CARGO_INCREMENTAL: "0"
LLVM_PROFILE_FILE: "target/coverage/%p-%m.profraw"
RUSTDOCFLAGS: "-Cinstrument-coverage"
RUSTFLAGS: "-Cinstrument-coverage"
run: cargo test issue
#- name: Run tests
# env:
# CARGO_INCREMENTAL: "0"
# LLVM_PROFILE_FILE: "target/coverage/%p-%m.profraw"
# RUSTDOCFLAGS: "-Cinstrument-coverage"
# RUSTFLAGS: "-Cinstrument-coverage"
# run: cargo test issue

- name: Install grcov
run: cargo install grcov

- name: debug
run: |
pwd
ls -hAl
- name: Install llvm-cov
run: cargo install cargo-llvm-cov

- name: Generate coverage report
run: >
grcov target/coverage/ -s . --binary-path target/debug/ -t lcov --branch
--ignore '/home/runner/work/rgb-lib/rgb-lib' --ignore '.' --ignore '../*' --ignore 'target/*' --ignore 'tests/*' --ignore-not-existing -o coverage.lcov
cargo llvm-cov --lcov --output-path coverage.lcov -- respect_max_allocations
#grcov target/coverage/ -s . --binary-path target/debug/ -t lcov --branch
#--ignore '/home/runner/work/rgb-lib/rgb-lib' --ignore '.' --ignore '../*' --ignore 'target/*' --ignore 'tests/*' --ignore-not-existing -o coverage.lcov
#run: grcov . --binary-path target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov


Expand Down

0 comments on commit 2f589cf

Please sign in to comment.