From 3e69d65bcc5b5ac0bb2b1e62f512788cae6e3508 Mon Sep 17 00:00:00 2001 From: J / Jacob Babich Date: Sat, 5 Oct 2024 01:42:53 -0400 Subject: [PATCH] ci: aim to increase cache reuse --- .github/workflows/check-and-build-and-test.yml | 3 +++ .github/workflows/compile-and-publish-binaries-to-release.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/check-and-build-and-test.yml b/.github/workflows/check-and-build-and-test.yml index 9430405..259a646 100644 --- a/.github/workflows/check-and-build-and-test.yml +++ b/.github/workflows/check-and-build-and-test.yml @@ -88,6 +88,9 @@ jobs: targets: ${{ matrix.supporteds.target }} - uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ matrix.supporteds.target }} + cache-on-failure: "true" - name: Check run: cargo check --verbose --target ${{ matrix.supporteds.target }} diff --git a/.github/workflows/compile-and-publish-binaries-to-release.yml b/.github/workflows/compile-and-publish-binaries-to-release.yml index db68064..9fcb152 100644 --- a/.github/workflows/compile-and-publish-binaries-to-release.yml +++ b/.github/workflows/compile-and-publish-binaries-to-release.yml @@ -19,6 +19,9 @@ jobs: uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + with: + shared-key: ${{ matrix.supporteds.target }} + cache-on-failure: "true" - name: Build for release run: cargo build --release --verbose