Skip to content
Merged
Show file tree
Hide file tree
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
33 changes: 31 additions & 2 deletions .github/workflows/coverage-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,21 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- run: cargo install cargo-llvm-cov
- name: Cache llvm-cov build
id: cache-llvm-cov
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- run: which cargo-llvm-cov || cargo install cargo-llvm-cov
- run: rustup component add llvm-tools-preview
- run: cargo llvm-cov --workspace --lcov --output-path lcov.info --ignore-filename-regex '^examples/'

Expand Down Expand Up @@ -71,9 +85,24 @@ jobs:
with:
ref: ${{ github.event.pull_request.base.sha }}

- name: Cache llvm-cov build
id: cache-llvm-cov
if: ${{ steps.base_art.outputs.found == 'false' }}
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Install cargo-llvm-cov (fallback path)
if: ${{ steps.base_art.outputs.found == 'false' }}
run: cargo install cargo-llvm-cov
run: which cargo-llvm-cov || cargo install cargo-llvm-cov

- name: Install llvm-tools (fallback path)
if: ${{ steps.base_art.outputs.found == 'false' }}
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,21 @@ jobs:
steps:
- uses: actions/checkout@v4

- run: cargo install cargo-llvm-cov
- name: Cache llvm-cov build
id: cache-llvm-cov
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- run: which cargo-llvm-cov || cargo install cargo-llvm-cov
- run: rustup component add llvm-tools-preview
- run: cargo llvm-cov --workspace --lcov --output-path lcov.info --ignore-filename-regex '^examples/'

Expand Down