Skip to content

Commit

Permalink
ci: Added more directories to cache
Browse files Browse the repository at this point in the history
The previous cache pattern was not capturing $CARGO_HOME dirs
  • Loading branch information
max-ishere committed Feb 13, 2024
1 parent 400c7f0 commit 6c52e07
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/cargo-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ jobs:

- uses: actions/cache@v4
with:
path: target/
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-build-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-build-${{ hashFiles('Cargo.lock') }}
Expand All @@ -38,3 +43,6 @@ jobs:
- name: build
run: cargo build --release ${{ matrix.target }} --keep-going --verbose

- name: Debug $CARGO_HOME
run: echo $CARGO_HOME
7 changes: 6 additions & 1 deletion .github/workflows/cargo-doc-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ jobs:

- uses: actions/cache@v4
with:
path: target/
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-doc-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-doc-${{ hashFiles('Cargo.lock') }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/cargo-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ jobs:

- uses: actions/cache@v4
with:
path: target/
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-lint-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-lint-${{ hashFiles('Cargo.lock') }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/cargo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ jobs:

- uses: actions/cache@v4
with:
path: target/
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-test-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-test-${{ hashFiles('Cargo.lock') }}
Expand Down

0 comments on commit 6c52e07

Please sign in to comment.