feat(ci): implement better caching

This commit is contained in:
perf3ct 2025-06-22 00:39:46 +00:00
parent ff125ead2f
commit e636a20ee4
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
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: |