3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2026-06-26 02:00:35 +00:00

Add source-keyed target cache

This commit is contained in:
Gary Sassano 2026-06-14 00:45:34 +02:00
parent c106961fee
commit c020f6afef
No known key found for this signature in database
GPG key ID: F8FE82821AD22F8F
12 changed files with 420 additions and 141 deletions

29
.github/workflows/target-key.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: target-key
on: [push, pull_request]
permissions: {}
jobs:
target-key:
if: github.repository == 'Swatinem/rust-cache'
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- run: rustup toolchain install stable --profile minimal --no-self-update
- uses: ./
with:
workspaces: tests
cache-workspace-crates: "true"
target-key: ${{ hashFiles('tests/**/*.rs', 'tests/Cargo.toml', 'tests/Cargo.lock') }}
- run: cargo build --release
working-directory: tests