From 73cedb6ea169b8f51e3b8590b2b4e79ffe96544e Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 1 Apr 2024 19:36:45 +0800 Subject: [PATCH] GHA CI: only store cache for master branch Also set a lower cache limit for macOS to prevent cache thrashing. Previously the default was 5G. PR #20640. --- .github/workflows/ci_macos.yaml | 4 +++- .github/workflows/ci_ubuntu.yaml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index 4b2709516..38b3abce5 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -49,8 +49,10 @@ jobs: - name: Setup ccache uses: Chocobo1/setup-ccache-action@v1 with: - store_cache: ${{ startsWith(github.ref, 'refs/heads/') }} + store_cache: ${{ github.ref == 'refs/heads/master' }} update_packager_index: false + ccache_options: | + max_size=2G - name: Install boost run: | diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index 313275b07..406b3917a 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -39,7 +39,7 @@ jobs: - name: Setup ccache uses: Chocobo1/setup-ccache-action@v1 with: - store_cache: ${{ startsWith(github.ref, 'refs/heads/') }} + store_cache: ${{ github.ref == 'refs/heads/master' }} update_packager_index: false ccache_options: | max_size=2G