ci: add bounded ccache to C++ workflows#14
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Affected repo & language:
CERALIVE/srt— GitHub Actions YAML for C/C++ buildsWhat
Add bounded ccache restore coverage to every ordinary C/C++ build workflow: ABI current/base, Android NDK r23, C++03/C++11 Linux, macOS, Windows, iOS, Debian runtime/release packaging, and s390x. Cache keys separate platform, purpose, and matrix dimensions and hash the compiled inputs. Pull requests are restore-only; successful trusted runs save caches. Windows now uses Ninja under an explicit x64 MSVC developer environment so CMake compiler launchers work. CodeQL remains intentionally uncached so compiler tracing is not bypassed.
Why
These workflows repeatedly rebuild the same translation units across compatible runs. A consistent 200 MB cache contract reduces that work without changing source, test expectations, ABI checks, package verification, or release gates.
How to verify
.github/workflows/as YAML.actions/cache/restore@v6and trusted-eventactions/cache/save@v6keys, both CMake compiler launchers, a 200 MB cap, and cache statistics.packaging/build-deb.sh,packaging/package-contract.sh, andpackaging/verify-runtime-replacement.shthrough the Docker-mounted cache path.Risks
The first trusted run for each cache namespace is cold. Windows changes from the Visual Studio generator to Ninja while retaining the x64 MSVC toolchain, Release configuration, exclusions, and test command. Cache keys isolate incompatible targets, PRs cannot persist compiler output, and every archive is capped at 200 MB. The release workflow remains dispatch-only and publication still depends on the complete verified build matrix.
Checklist
AGENTS.md)