ci/macos: tweak ccache handling (#13141)
Ensure the cache does not get removed after being stale when not bumping base for more than 7 days.
This commit is contained in:
1 parent
d270f08ceb
commit
9eeb23104f
1 file changed
+4
-2
@@ -125,14 +125,16 @@ jobs:
|
||||
path: build
|
||||
key: ${{ env.CACHE_KEY }}-build-${{ hashFiles('cache-key') }}
|
||||
|
||||
- name: Restore build cache
|
||||
- name: Lookup or restore build cache
|
||||
id: ccache-restore
|
||||
if: steps.build-restore.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: /Users/runner/Library/Caches/ccache
|
||||
key: ${{ env.CACHE_KEY }}-ccache-${{ hashFiles('cache-key') }}
|
||||
restore-keys: ${{ env.CACHE_KEY }}-ccache-
|
||||
# When not building, do a lookup so the cache
|
||||
# does not get removed after 7 days with no use.
|
||||
lookup-only: ${{ steps.build-restore.outputs.cache-hit }}
|
||||
|
||||
- name: Install ccache
|
||||
if: steps.build-restore.outputs.cache-hit != 'true'
|
||||
|
||||
Reference in new issue
Block a user