ci/macos: tweak ccache handling (#13141)
Some checks are pending
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (10.15, 13, x86-64, 15.2) (push) Waiting to run
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (11.0, 14, ARM64, 15.4) (push) Waiting to run

Ensure the cache does not get removed after being stale when not bumping base for more than 7 days.
This commit is contained in:
Benoit Pierre
2025-01-25 23:05:14 +01:00
committed by GitHub
parent d270f08ceb
commit 9eeb23104f

View File

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