github: Evict old entries from ccache

We don't want to build old versions using these caches, so we don't
need old entries (if header files change, there could be lots of
differences that increase the cache size unnecessarily).
This commit is contained in:
Tobias Brunner
2026-05-19 17:24:22 +02:00
parent 3b902ea59b
commit 7faf93b701
6 changed files with 53 additions and 1 deletions
+9
View File
@@ -16,6 +16,7 @@ env:
# since the compilers are newly installed every time, we have to use this to
# avoid cache misses
CCACHE_COMPILERCHECK: content
EVICT_CCACHE_AGE: 1200s
MONOLITHIC: yes
jobs:
@@ -53,6 +54,10 @@ jobs:
ccache -sz
- uses: ./.github/actions/default
- run: ccache -sv
- if: github.event_name == 'push'
run: |
ccache --evict-older-than ${{ env.EVICT_CCACHE_AGE }}
ccache -sv
# delete old cache entry as we currently can't update it any other way
- env:
GH_TOKEN: ${{ github.token }}
@@ -114,6 +119,10 @@ jobs:
# sometimes streaming/threading tests hang completely
timeout-minutes: 30
- run: ccache -sv
- if: github.event_name == 'push'
run: |
ccache --evict-older-than ${{ env.EVICT_CCACHE_AGE }}
ccache -sv
# delete old cache entry as we currently can't update it any other way
- env:
GH_TOKEN: ${{ github.token }}