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 Vladimir Golovnev (Glassez)
parent 020b49add1
commit 73cedb6ea1
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
2 changed files with 4 additions and 2 deletions

View file

@ -49,8 +49,10 @@ jobs:
- name: Setup ccache - name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1 uses: Chocobo1/setup-ccache-action@v1
with: with:
store_cache: ${{ startsWith(github.ref, 'refs/heads/') }} store_cache: ${{ github.ref == 'refs/heads/master' }}
update_packager_index: false update_packager_index: false
ccache_options: |
max_size=2G
- name: Install boost - name: Install boost
run: | run: |

View file

@ -39,7 +39,7 @@ jobs:
- name: Setup ccache - name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1 uses: Chocobo1/setup-ccache-action@v1
with: with:
store_cache: ${{ startsWith(github.ref, 'refs/heads/') }} store_cache: ${{ github.ref == 'refs/heads/master' }}
update_packager_index: false update_packager_index: false
ccache_options: | ccache_options: |
max_size=2G max_size=2G