From 535f174060a966954fd618cd700477adebf92a17 Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Wed, 11 Dec 2024 20:24:22 +1100 Subject: [PATCH] chore(ci): add rust caching For the release worfklow, use the same cache keys as the other workflows. Signed-off-by: JP-Ellis --- .github/workflows/build-ffi.yml | 3 +++ .github/workflows/build.yml | 4 ++++ .github/workflows/compatability-suite.yml | 6 ++++++ .github/workflows/release.yml | 3 +-- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-ffi.yml b/.github/workflows/build-ffi.yml index 2e9d5720..452d330a 100644 --- a/.github/workflows/build-ffi.yml +++ b/.github/workflows/build-ffi.yml @@ -34,6 +34,9 @@ jobs: with: toolchain: stable components: rustfmt + - uses: Swatinem/rust-cache@v2 + with: + workspaces: rust - name: Install shared mime info DB if: runner.os == 'macOS' run: brew install shared-mime-info diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0f54038..06902fbc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,6 +62,10 @@ jobs: - uses: taiki-e/install-action@v2 with: tool: cargo-nextest + - uses: Swatinem/rust-cache@v2 + with: + workspaces: rust + shared-key: musl - name: Tests run: cargo nextest run working-directory: rust diff --git a/.github/workflows/compatability-suite.yml b/.github/workflows/compatability-suite.yml index eb4d6aa5..896b6cc7 100644 --- a/.github/workflows/compatability-suite.yml +++ b/.github/workflows/compatability-suite.yml @@ -31,6 +31,12 @@ jobs: - uses: taiki-e/install-action@v2 with: tool: cargo-nextest + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + rust + compatibility-suite + shared-key: compatibility-suite - name: Run Cucumber # Note: cucumber's test executables are incompatible with nextest # See: https://github.com/nextest-rs/nextest/issues/1329 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5fa809da..841eb692 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,10 +62,9 @@ jobs: uses: Swatinem/rust-cache@v2 with: workspaces: rust - key: ${{ matrix.targets }} - name: Set up QEMU - if: runner.os == 'Linux' + if: runner.os == 'Linux' && startsWith(matrix.targets, 'aarch64') uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx