Conversation
8e6a59c to
7e6a5b7
Compare
Cache on GHA is immutable. For this reason, hendrikmuhs/ccache-action creates a new cache entry for each push, each with an appended timestamp, which fills the cache very quickly. In an attempt to fix this, we've disabled the append-timestamp option and appended a hash of php_version.h. Hence, we'll only get a new cache file once this file is touched. However, since this file rarely ever updates for master, we're relying on an extremely outdated cache. To fix this, append the current year+week to rebuild the cache each week instead, as suggested by Tim. Also use major.minor version instead of the has of php_version.h for readability. Fixes phpGH-14154
0261471 to
d5caa57
Compare
| append-timestamp: false | ||
| save: ${{ github.event_name != 'pull_request' }} | ||
| restore-keys: "${{ steps.cache_key.outputs.prefix }}" | ||
| #save: ${{ github.event_name != 'pull_request' }} |
There was a problem hiding this comment.
Will be reverted before merging.
.github/actions/ccache/action.yml
Outdated
| with: | ||
| key: "${{ inputs.name }}-${{ hashFiles('main/php_version.h') }}" | ||
| key: "${{ steps.cache_key.outputs.key }}" | ||
| append-timestamp: false |
There was a problem hiding this comment.
Nice catch. This was indeed a typo (in two places).
Your suggestion seems to be rejected due to yml validation. Specifically, the error originates from here: |
Ah, we should fix this upstream then to consistently use |
|
I'll look into that. Do you mind merging this for now? The trailing hyphen seems harmless (it's been this way for years). |
Merging should be okay. The upstream fix will then implicitly be applied. |


No description provided.