Cache submodules for faster checkout - #5147
Open
RickiNano wants to merge 2 commits into
Open
Conversation
Test Results for Commit 4e31162Pull Request 5147: Results Test Case Results
Last updated: 2026-08-29 15:21:43 UTC |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR speeds up GitHub Actions checkouts by introducing a composite action that restores submodules from an actions/cache entry keyed by the submodule gitlinks and .gitmodules, then runs a forced recursive git submodule update to repair/complete the working tree.
Changes:
- Added a new local composite action (
checkout-submodules) to cache/restoresubmodules/and.git/modules, then sync/update submodules. - Updated CI workflows to stop using
actions/checkout’ssubmodules: recursiveoption and instead invoke the new action. - Applied the new submodule checkout flow across unit tests, sanitizers, coverage, flamegraphs, and build/deploy workflows.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/unit_tests.yml | Replaces actions/checkout submodule handling with the new cached submodule action across jobs. |
| .github/workflows/flamegraphs.yml | Uses the new cached submodule action after checkout. |
| .github/workflows/coverage.yml | Uses the new cached submodule action after checkout. |
| .github/workflows/code_sanitizers.yml | Uses the new cached submodule action after checkout across sanitizer jobs. |
| .github/workflows/build_deploy.yml | Uses the new cached submodule action after checkout for tagged build/deploy jobs. |
| .github/actions/checkout-submodules/action.yml | New composite action that computes a cache key, restores cached submodules, then syncs/updates recursively. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Adds a checkout-submodules action that caches submodules/ and .git/modules, keyed on the gitlink SHAs (git ls-tree HEAD submodules/) and .gitmodules. Replaces actions/checkout's submodules.
On a cache hit, only submodules that actually changed get fetched; everything else restores from cache.
git submodule sync && update --init --force --recursivealways runs afterward to repair partial/stale/missing caches.