feat(ci): implement better caching
This commit is contained in:
parent
ff125ead2f
commit
e636a20ee4
|
|
@ -65,10 +65,18 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
~/.cargo/git
|
~/.cargo/git
|
||||||
target
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
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
|
- name: Build readur binary
|
||||||
run: cargo build --release
|
run: cargo build --release
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,18 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
~/.cargo/git
|
~/.cargo/git
|
||||||
target
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
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
|
- name: Run Rust unit tests
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue