Bug description:
- If you look at the
ccache stats in ccache-enabled Github Actions jobs, you'll notice that the cache seems hardly useful most of the time, as there are few hits and many misses.
Example here: https://github.com/python/cpython/actions/runs/8332366775/job/22801352882
ccache stats
/usr/bin/ccache -s
Summary:
Hits: 52 / 341 (15.25 %)
Direct: 30 / 343 (8.75 %)
Preprocessed: 22 / 313 (7.03 %)
Misses: 289
Direct: 313
Preprocessed: 291
Uncacheable: 104
Primary storage:
Hits: 387 / 685 (56.50 %)
Misses: 298
Cache size (GB): 0.18 / 0.20 (90.22 %)
Cleanups: 8
Most likely this is because all those builds clash for the same cache keys even though they use different compiler options. The solution would be to use per-build cache keys.
- The "Post Configure ccache action" step itself takes ~2 minutes (this seems unexpected), which is as long as it takes to compile CPython. So it's not obvious there is a benefit at all, even if the problem above was fixed.
Bug description:
ccachestats inccache-enabled Github Actions jobs, you'll notice that the cache seems hardly useful most of the time, as there are few hits and many misses.Example here: https://github.com/python/cpython/actions/runs/8332366775/job/22801352882
Most likely this is because all those builds clash for the same cache keys even though they use different compiler options. The solution would be to use per-build cache keys.