diff --git a/.github/workflows/coverage-pr.yml b/.github/workflows/coverage-pr.yml index 4a196aa..21538bc 100644 --- a/.github/workflows/coverage-pr.yml +++ b/.github/workflows/coverage-pr.yml @@ -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-llvm-cov-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-llvm-cov + + - 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/' @@ -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-llvm-cov-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-llvm-cov + - 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' }} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b0d7bf1..5e929c2 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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-llvm-cov-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-llvm-cov + + - 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/' diff --git a/.github/workflows/dependency-audit.yml b/.github/workflows/dependency-audit.yml index 9c68929..9ca153b 100644 --- a/.github/workflows/dependency-audit.yml +++ b/.github/workflows/dependency-audit.yml @@ -32,8 +32,8 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- + key: ${{ runner.os }}-cargo-deny-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-deny - name: Run audit-check action run: | diff --git a/.github/workflows/semver-checks.yml b/.github/workflows/semver-checks.yml index cca3b1c..f3f70bf 100644 --- a/.github/workflows/semver-checks.yml +++ b/.github/workflows/semver-checks.yml @@ -33,9 +33,9 @@ jobs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-semver-checks-${{ hashFiles('**/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo- + ${{ runner.os }}-cargo-semver-checks - name: Get latest version tag id: get-baseline @@ -79,4 +79,4 @@ jobs: echo "3. Future changes will be checked against tagged versions" echo "" echo "Note: Semver checking starts from v0.1.0 as this indicates" - echo "the beginning of API stability commitments in Rust projects" \ No newline at end of file + echo "the beginning of API stability commitments in Rust projects"