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.
This commit is contained in:
Chocobo1 2024-04-01 19:36:45 +08:00 committed by GitHub
parent 90383567b2
commit 2fe91a6c8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -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:

View file

@ -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