@@ -113,38 +113,43 @@ jobs:
113113 ## Install `rust` toolchain
114114 rustup toolchain install nightly --no-self-update -c rustfmt --profile minimal
115115 rustup default nightly
116- rustup component add llvm-tools-preview
117116
118- - name : " `grcov` ~ install"
119- run : cargo install grcov
117+ #- name: "`grcov` ~ install"
118+ #run: cargo install grcov
119+
120+ #- name: cargo test
121+ #run: |
122+ #cargo test --all --no-fail-fast ${{ matrix.cargo_flags }}
123+ #env:
124+ #CARGO_INCREMENTAL: "0"
125+ #RUSTFLAGS: "-Cinstrument-coverage -Zcoverage-options=branch -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off"
126+ #RUSTDOCFLAGS: "-Cinstrument-coverage -Zcoverage-options=branch -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off"
127+ #LLVM_PROFILE_FILE: ${{ vars.RUNNER_TEMP }}"/find-%p-%m.profraw"
128+
129+ #- name: Generate coverage data
130+ #id: grcov
131+ #run: |
132+ #grcov target/debug/ \
133+ # --binary-path=target/debug/ \
134+ # --branch \
135+ # --llvm \
136+ # --source-dir . \
137+ # --output-path lcov.info \
138+ # --ignore-not-existing \
139+ # --excl-line "#\\[derive\\(" \
140+ # --excl-br-line "#\\[derive\\(" \
141+ # --excl-start "#\\[cfg\\(test\\)\\]" \
142+ # --excl-br-start "#\\[cfg\\(test\\)\\]" \
143+ # --commit-sha ${{ github.sha }} \
144+ # --service-job-id ${{ github.job }} \
145+ # --service-name "GitHub Actions" \
146+ # --service-number ${{ github.run_id }}
147+
148+ - name : Install cargo-llvm-cov
149+ uses : taiki-e/install-action@cargo-llvm-cov
150+ - name : Generate code coverage
151+ run : cargo llvm-cov --all-features --lcov --branch --output-path lcov.info
120152
121- - name : cargo test
122- run : |
123- cargo test --all --no-fail-fast ${{ matrix.cargo_flags }}
124- env :
125- CARGO_INCREMENTAL : " 0"
126- RUSTFLAGS : " -Cinstrument-coverage -Zcoverage-options=branch -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off"
127- RUSTDOCFLAGS : " -Cinstrument-coverage -Zcoverage-options=branch -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort -Cdebug-assertions=off"
128- LLVM_PROFILE_FILE : ${{ vars.RUNNER_TEMP }}"/find-%p-%m.profraw"
129-
130- - name : Generate coverage data
131- id : grcov
132- run : |
133- grcov target/debug/ \
134- --binary-path=target/debug/ \
135- --branch \
136- --llvm \
137- --source-dir . \
138- --output-path lcov.info \
139- --ignore-not-existing \
140- --excl-line "#\\[derive\\(" \
141- --excl-br-line "#\\[derive\\(" \
142- --excl-start "#\\[cfg\\(test\\)\\]" \
143- --excl-br-start "#\\[cfg\\(test\\)\\]" \
144- --commit-sha ${{ github.sha }} \
145- --service-job-id ${{ github.job }} \
146- --service-name "GitHub Actions" \
147- --service-number ${{ github.run_id }}
148153 - name : Upload coverage as artifact
149154 uses : actions/upload-artifact@v4
150155 with :
0 commit comments