From e99a012bb452febfdd6dca3867feb4b3e4871826 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 4081a3a35..206d93d22 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -46,6 +46,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 a5cfa4c1e..59080bb60 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -40,6 +40,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