feat(ci): implement better caching

This commit is contained in:
perf3ct 2025-06-22 00:39:46 +00:00
parent 7f57078b2b
commit 48ab02b3a3
2 changed files with 22 additions and 6 deletions

View File

@ -65,10 +65,18 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
${{ runner.os }}-cargo-registry-
- name: Cache target directory
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-target-release-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/*.rs') }}
restore-keys: |
${{ runner.os }}-cargo-target-release-${{ hashFiles('**/Cargo.lock') }}-
${{ runner.os }}-cargo-target-release-
- name: Build readur binary
run: cargo build --release

View File

@ -44,10 +44,18 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
${{ runner.os }}-cargo-registry-
- name: Cache target directory
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/*.rs') }}
restore-keys: |
${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}-
${{ runner.os }}-cargo-target-
- name: Run Rust unit tests
run: |