You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because GitHub’s caches are immutable (on a hit, the cache will not be updated), and because master’s php_version.h changes rarely, ccache is currently using a 9 month old cache, as per https://github.com/php/php-src/actions/caches. A 9 month old cache might as well not exist.
The cache should regularly be regenerated, e.g. by embedding the current week within the cache key and then configuring restore keys with a common prefix that allows everything, no matter the week:
- id: week
run: |
echo "week=$(date +"%Y-%W")" >> $GITHUB_OUTPUT
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
# This duplicates the "job.name" expression above because
# GitHub has no way to query the job name (github.job is the
# job id, not the job name)
key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}-${{hashFiles('main/php_version.h')}}-${{ steps.week.outputs.week }}"
restore-keys: |
LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}-${{hashFiles('main/php_version.h')}}-
append-timestamp: false
Alternatively append-timestamp could be configured as true, which would update the caches for every build.
PHP Version
n/a
Operating System
No response
The text was updated successfully, but these errors were encountered:
Description
The cache key for GitHub is configured as:
Because GitHub’s caches are immutable (on a hit, the cache will not be updated), and because master’s
php_version.h
changes rarely, ccache is currently using a 9 month old cache, as per https://github.com/php/php-src/actions/caches. A 9 month old cache might as well not exist.The cache should regularly be regenerated, e.g. by embedding the current week within the cache key and then configuring restore keys with a common prefix that allows everything, no matter the week:
Alternatively
append-timestamp
could be configured astrue
, which would update the caches for every build.PHP Version
n/a
Operating System
No response
The text was updated successfully, but these errors were encountered: