From e8e964d323ca81b83dc41501eb8eab4379cf9645 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Wed, 10 Sep 2025 15:05:55 -0500 Subject: [PATCH] Unify Linux Rust cache across workflows --- .github/workflows/publish.yml | 2 ++ .github/workflows/tests.yml | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d47ef876..abc83d2a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,6 +30,8 @@ jobs: - name: Setup Rust cache uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ runner.os }} - name: Verify version matches tag run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 36afc671..d30f5ecf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,6 +26,8 @@ jobs: - name: Setup Rust cache uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ runner.os }} - name: Install nextest uses: taiki-e/install-action@nextest @@ -79,6 +81,11 @@ jobs: sudo chown -R ci:ci /home/ci/.cargo/git || true fi + - name: Setup Rust cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ runner.os }} + - name: Setup Rust environment and install nextest run: | source ~/.cargo/env @@ -132,6 +139,8 @@ jobs: - name: Setup Rust cache uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ runner.os }} - name: Install nextest uses: taiki-e/install-action@nextest @@ -160,6 +169,8 @@ jobs: - name: Setup Rust cache uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ runner.os }} - name: Run clippy run: cargo clippy --all-targets -- -D warnings @@ -177,5 +188,10 @@ jobs: toolchain: stable components: rustfmt + - name: Setup Rust cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ runner.os }} + - name: Check formatting run: cargo fmt -- --check