From 43a3e1474994171d06ef7e5cedf300b4a54f4965 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Mon, 30 Oct 2023 11:20:43 +0200 Subject: [PATCH 1/3] Separate cache for different arch --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58635b442a..43b9fd28c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: cache-directories: ~/.cache/sccache - shared-key: nox + shared-key: nox-${{ matrix.arch }} # github allows only 10GB of cache # so save cache only on merge to master # to use less space and speed up CI From e9c9d462c0d6a4f3cd6c84da0625ca728e7fdb85 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Mon, 30 Oct 2023 11:24:10 +0200 Subject: [PATCH 2/3] Save in tests too --- .github/workflows/tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c3d341e27a..dc143c3806 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,7 +37,11 @@ jobs: with: cache-directories: ~/.cache/sccache shared-key: nox - save-if: false + shared-key: nox-tests + # github allows only 10GB of cache + # so save cache only on merge to master + # to use less space and speed up CI + save-if: ${{ github.event_name == 'push' }} - name: Setup sccache uses: mozilla-actions/sccache-action@v0.0.3 From bb90af3ed7d76fe4a55e82af64aec5d63e036eab Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Mon, 30 Oct 2023 11:25:04 +0200 Subject: [PATCH 3/3] typo --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dc143c3806..a1091a0915 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,6 @@ jobs: uses: Swatinem/rust-cache@v2 with: cache-directories: ~/.cache/sccache - shared-key: nox shared-key: nox-tests # github allows only 10GB of cache # so save cache only on merge to master