Skip to content

Cache the installed GCC trunk tree between CI runs - #299

Merged
philipcraig merged 1 commit into
mainfrom
cache-gcc-trunk-297
Sep 3, 2026
Merged

Cache the installed GCC trunk tree between CI runs#299
philipcraig merged 1 commit into
mainfrom
cache-gcc-trunk-297

Conversation

@philipcraig

@philipcraig philipcraig commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

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 mkheaders postinst regenerating fixed headers.

  • .github/actions/install-gcc-trunk resolves the versioned file 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. If the server ever stops providing either identifier, it installs without caching rather than key blindly.
  • The five copies of the install step in cmake.yml, bazel.yml, sanitizers.yml, and coverage.yml now use the action, and the action file is in each workflow's paths filter. Pinning a snapshot after an upstream regression is the action's package-url input.

@philipcraig
philipcraig force-pushed the cache-gcc-trunk-297 branch 2 times, most recently from b1144b4 to e601e6f Compare September 3, 2026 06:07
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.87%. Comparing base (5806556) to head (e37f10e).
⚠️ Report is 1 commits behind head on main.

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           
Flag Coverage Δ
consteval 97.46% <ø> (ø)
runtime 70.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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
philipcraig marked this pull request as ready for review September 3, 2026 09:22
@philipcraig
philipcraig requested a review from jbcoe as a code owner September 3, 2026 09:22

@jbcoe jbcoe left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. This should speed up CI.

@philipcraig
philipcraig merged commit d53ca2c into main Sep 3, 2026
20 checks passed
@philipcraig
philipcraig deleted the cache-gcc-trunk-297 branch September 3, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cache the installed GCC trunk tree in CI

2 participants