Skip to content

Cache llvm-cov tool (#34) #87

Cache llvm-cov tool (#34)

Cache llvm-cov tool (#34) #87

Workflow file for this run

name: Coverage (Push)
on:
push:
branches: ['**'] # all branches, including main
permissions:
contents: read
actions: write
jobs:
coverage-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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/'
- name: Upload branch coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-lcov
path: lcov.info
retention-days: 21