Skip to content

Commit

Permalink
ci: Set custom prefix names for Rust caches (#1243)
Browse files Browse the repository at this point in the history
… to be able to tell caches apart easily in the web UI.
  • Loading branch information
svix-jplatte authored Feb 29, 2024
1 parent f909fed commit c9a3561
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/bridge-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
# only save the cache on the main branch
# cf https://github.com/Swatinem/rust-cache/issues/95
save-if: ${{ github.ref == 'refs/heads/main' }}
# include relevant information in the cache name
prefix-key: "bridge-${{ matrix.rust }}"

- name: rustfmt
run: cargo fmt -- --check
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rust-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
# only save the cache on the main branch
# cf https://github.com/Swatinem/rust-cache/issues/95
save-if: ${{ github.ref == 'refs/heads/main' }}
# include relevant information in the cache name
prefix-key: "rust-client-${{ matrix.rust }}"

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rust-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
workspaces: "rust -> target"
# only restore cache for faster publishing, don't save back results
save-if: false
# use the cache from rust-lint/stable
prefix-key: "rust-client-stable"

- name: Publish
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/server-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
# only save the cache on the main branch
# cf https://github.com/Swatinem/rust-cache/issues/95
save-if: ${{ github.ref == 'refs/heads/main' }}
# include relevant information in the cache name
prefix-key: "server-${{ matrix.rust }}"

- name: rustfmt
run: cargo fmt -- --check
Expand Down

0 comments on commit c9a3561

Please sign in to comment.