Describe the enhancement requested
Our C++ GitHub Actions jobs currently use ccache through actions/cache. Many cache keys include the full C++ source tree hash, for example:
key: cpp-ccache-macos-${{ matrix.macos-version }}-${{ hashFiles('cpp/**') }}
restore-keys: cpp-ccache-macos-${{ matrix.macos-version }}-
This was originally introduced in #7081 as a workaround for GitHub Actions cache immutability: cache entries cannot be updated once written, so changing keys are needed to create new cache snapshots.
However, using hashFiles('cpp/**') might be suboptimal for compiler caches. Hashing the entire source tree at the outer GitHub cache layer creates many distinct cache entries and increases the chance of cache misses/eviction.
Component(s)
Continuous Integration
Describe the enhancement requested
Our C++ GitHub Actions jobs currently use
ccachethroughactions/cache. Many cache keys include the full C++ source tree hash, for example:This was originally introduced in #7081 as a workaround for GitHub Actions cache immutability: cache entries cannot be updated once written, so changing keys are needed to create new cache snapshots.
However, using hashFiles('cpp/**') might be suboptimal for compiler caches. Hashing the entire source tree at the outer GitHub cache layer creates many distinct cache entries and increases the chance of cache misses/eviction.
Component(s)
Continuous Integration