From ba5229a069237837eac2723bef93211288539f29 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 18 Nov 2023 14:58:51 +0800 Subject: [PATCH] GHA CI: only store compile cache on stable branches Given the amount of PR and compile matrix, the CI cache size limit is easy to hit. So for now on, only store compile cache for stable branches to avoid cache thrashing. --- .github/workflows/ci_macos.yaml | 1 + .github/workflows/ci_ubuntu.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index 896ef381e..4b2709516 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -49,6 +49,7 @@ jobs: - name: Setup ccache uses: Chocobo1/setup-ccache-action@v1 with: + store_cache: ${{ startsWith(github.ref, 'refs/heads/') }} update_packager_index: false - name: Install boost diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index cf903dca4..313275b07 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -39,6 +39,7 @@ jobs: - name: Setup ccache uses: Chocobo1/setup-ccache-action@v1 with: + store_cache: ${{ startsWith(github.ref, 'refs/heads/') }} update_packager_index: false ccache_options: | max_size=2G