Skip to content

CI: toolchain cache keyed on what the build uses; actions on Node 24 - #24

Merged
WDrijver merged 1 commit into
mainfrom
ci-cache-key-and-actions
Nov 5, 2026
Merged

WDrijver merged 1 commit into
mainfrom
ci-cache-key-and-actions

Conversation

@WDrijver

@WDrijver WDrijver commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Toolchain cache key

Before: apollocrossdev-gcc650dev-<ApolloCrossDev main sha>. Every ApolloCrossDev commit, even to Projects/ApolloLib or the README, meant a full toolchain rebuild of about an hour. That happened five times on 2026-11-04.

Now: apollocrossdev-gcc650dev-<hash of GCC-6.50-Dev-Linux.sh>-<tree hash of Compilers/_archives>.

  • These two are what the build script reads from the repository: the script itself, and the patches and sources under Compilers/_archives.
  • Projects/ (ApolloLib, examples, acp, bgdbserver) doesn't end up in the cached compiler folder.
  • The hashes come from the sparse fetch that already gets Projects/ApolloLib (--filter=blob:none, trees only), so no extra download.
  • Tested locally: ApolloCrossDev main gives the key 8fda59f7ee9c-2184ff37b459.

Not covered, as before: the script also clones amiga-gcc and DevPac from the network, so an upstream change there doesn't change the key.

First run: the first run of this PR rebuilds the toolchain once, because the new key isn't cached yet.

Actions off Node 20

CI warned "Node.js 20 is deprecated" for checkout, setup-python and markdownlint-cli2-action. All actions are moved to their latest major, all running on Node 24:

Action Was Now
actions/checkout v4 v7
actions/setup-python v5 v7
actions/cache/restore, /save v4 v6
actions/upload-artifact v4 v7
DavidAnson/markdownlint-cli2-action v16 (cli2 0.13.0) v25 (cli2 0.24.0)

Release notes: they list no breaking change beyond Node 24, which needs runner 2.327.1+; GitHub-hosted runners have that.

Markdown lint: markdownlint goes from cli2 0.13 to 0.24 and may bring new rules. This PR's own run is the test; if it flags existing files, the fixes go into this PR.

🤖 Generated with Claude Code

- compile-examples: the toolchain cache key is the git hash of
  GCC-6.50-Dev-Linux.sh plus the tree hash of Compilers/_archives, read
  from the sparse ApolloLib fetch (blob:none, so only trees). Commits to
  Projects/ or the README no longer trigger an hour-long rebuild.
- Actions off the deprecated Node 20: checkout v7, setup-python v7,
  cache restore/save v6, upload-artifact v7, markdownlint-cli2-action v25.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@WDrijver
WDrijver requested a review from TuKo1982 as a code owner November 5, 2026 07:55
@WDrijver
WDrijver merged commit ef2962f into main Nov 5, 2026
2 checks passed
@WDrijver
WDrijver deleted the ci-cache-key-and-actions branch November 5, 2026 09:54
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.

1 participant