From 2f589cff020ac0ab91b042551c753100492f11c8 Mon Sep 17 00:00:00 2001 From: Nicola Busanello Date: Fri, 23 Feb 2024 10:38:29 +0100 Subject: [PATCH] try llvm-cov --- .github/workflows/coverage.yaml | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 8c0fa54..24da4e7 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -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