From 2fe91a6c8fec77b154bb52d0223ced416f68d3b0 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 a73663501..e9fd5ef3d 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -47,8 +47,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 env: diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index f4c5f5d6d..bcae07196 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -41,7 +41,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 -- 2.11.4.GIT