Cache the installed GCC trunk tree between CI runs - #299
Merged
Conversation
philipcraig
force-pushed
the
cache-gcc-trunk-297
branch
2 times, most recently
from
September 3, 2026 06:07
b1144b4 to
e601e6f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #299 +/- ##
=======================================
Coverage 72.87% 72.87%
=======================================
Files 9 9
Lines 822 822
Branches 208 208
=======================================
Hits 599 599
Misses 24 24
Partials 199 199
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closes #297. A composite action resolves the snapshot the unversioned URL redirects to, restores /opt/gcc-latest from the Actions cache under a key made of that file name and its Last-Modified date, and falls back to the download and apt install on a miss. The package's mkheaders postinst, which is the slow part of the install, therefore runs once per snapshot. Replaces the five copies of the install step in cmake.yml, bazel.yml, sanitizers.yml, and coverage.yml.
philipcraig
force-pushed
the
cache-gcc-trunk-297
branch
from
September 3, 2026 08:54
e601e6f to
e37f10e
Compare
philipcraig
marked this pull request as ready for review
September 3, 2026 09:22
jbcoe
approved these changes
Sep 3, 2026
jbcoe
left a comment
Owner
There was a problem hiding this comment.
Thanks for this. This should speed up CI.
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.
Closes #297.
Every GCC trunk job spent 81 to 149 s installing the compiler, more than the build it then ran, and most of that was the package's
mkheaderspostinst regenerating fixed headers..github/actions/install-gcc-trunkresolves the versioned file the unversioned URL redirects to, restores/opt/gcc-latestfrom the Actions cache under a key made of that file name and itsLast-Modifieddate, and falls back to the download and apt install on a miss. If the server ever stops providing either identifier, it installs without caching rather than key blindly.cmake.yml,bazel.yml,sanitizers.yml, andcoverage.ymlnow use the action, and the action file is in each workflow's paths filter. Pinning a snapshot after an upstream regression is the action'spackage-urlinput.