Skip to content

Cache submodules for faster checkout - #5147

Open
RickiNano wants to merge 2 commits into
nanocurrency:developfrom
RickiNano:Cache-submodules
Open

Cache submodules for faster checkout#5147
RickiNano wants to merge 2 commits into
nanocurrency:developfrom
RickiNano:Cache-submodules

Conversation

@RickiNano

Copy link
Copy Markdown
Contributor

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 --recursive always runs afterward to repair partial/stale/missing caches.

@gr0vity-dev-bot

gr0vity-dev-bot commented Aug 19, 2026

Copy link
Copy Markdown

Test Results for Commit 4e31162

Pull Request 5147: Results
Overall Status:

Test Case Results

  • 5n4pr_conf_10k_bintree: PASS (Duration: 128s)
  • 5n4pr_conf_10k_change: PASS (Duration: 163s)
  • 5n4pr_conf_change_dependant: PASS (Duration: 110s)
  • 5n4pr_conf_change_independant: PASS (Duration: 109s)
  • 5n4pr_conf_send_dependant: PASS (Duration: 114s)
  • 5n4pr_conf_send_independant: PASS (Duration: 119s)
  • 5n4pr_rocks_10k_bintree: PASS (Duration: 115s)
  • 5n4pr_rocks_10k_change: PASS (Duration: 203s)

Last updated: 2026-08-29 15:21:43 UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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/restore submodules/ and .git/modules, then sync/update submodules.
  • Updated CI workflows to stop using actions/checkout’s submodules: recursive option 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.

Comment thread .github/actions/checkout-submodules/action.yml Outdated
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.

3 participants