diff --git a/.github/workflows/bridge-ci.yml b/.github/workflows/bridge-ci.yml index 8561e59e3..54e7c5545 100644 --- a/.github/workflows/bridge-ci.yml +++ b/.github/workflows/bridge-ci.yml @@ -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 diff --git a/.github/workflows/rust-lint.yml b/.github/workflows/rust-lint.yml index f86bdb241..8410a2b08 100644 --- a/.github/workflows/rust-lint.yml +++ b/.github/workflows/rust-lint.yml @@ -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 diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 0c25b459b..f0c5bd281 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -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: diff --git a/.github/workflows/server-ci.yml b/.github/workflows/server-ci.yml index 32089dd5f..cfb1476df 100644 --- a/.github/workflows/server-ci.yml +++ b/.github/workflows/server-ci.yml @@ -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