Skip to content

NOJIRA: Cache SDKs (#994) - #1007

Merged
sarthak shaha (Sarthak-Shaha) merged 1 commit into
release_2.10-1.6.1from
cache/submodules_release_2.10
Aug 25, 2026
Merged

NOJIRA: Cache SDKs (#994)#1007
sarthak shaha (Sarthak-Shaha) merged 1 commit into
release_2.10-1.6.1from
cache/submodules_release_2.10

Conversation

@Sarthak-Shaha

Copy link
Copy Markdown
Contributor

CP : #994

Issue Link:
NOJIRA

Description of Problem/Feature:
We clone the sisdk submodule for each run multiple times ,this is inefficient ( was designed in this was as we keep on bumping with new CoL builds frequently) but worked in past. With intemrittent lfs issues faced by public sisdk/wifisdk repos there's a need to update our dev flow to get reliability in CI.

Description of Fix/Solution:
Cache the SiSDK and WiFi SDK working trees in GitHub Actions instead of cloning + LFS-pulling them in every builder job. Docker images were not used; each submodule bump would require rebuilding and publishing a new image.

The cache key is:
silabs-sdks-${{ runner.os }}-${{ runner.arch }}-${SCOPE}-${SISDK_TAG}-${SISDK_SHA:0:12}-${WIFI_SHA:0:12}

SCOPE is the PR base branch (main or release_*) on pull requests, otherwise the branch the workflow runs on. The SiSDK .gitmodules tag is used (WiFi SDK uses the same tag). Gitlink SHAs are included so a pin change still busts the cache if the tag string is unchanged.

  1. .github/actions/cache-sdks restores /tmp/silabs-sdks.tar on a key match and extracts the two working trees. On a miss it shallow-clones both submodules, LFS-pulls, packs a tarball (no .git), saves the cache, and deletes the tarball.
  2. dev-apps-builder has a cache-sdks warm job (same idea as cache-tools, but this cache is kept for later runs). Builder jobs wait on it, then builder.yaml calls the same action so they restore instead of each cloning.
  3. .github/workflows/cache-sdks.yaml seeds the durable cache on push to main / release_* when .gitmodules or the two submodule pins change, and on workflow_dispatch from those branches only. After a successful seed it keeps the new cache on that branch, deletes the previous cache on that branch, and deletes leftover PR/feature-branch silabs-sdks-* caches. Other main / release_* caches are left alone.
    A PR that does not change the SDK pins should hit the base-branch cache. A pin-bump PR misses, the warm job creates a PR-scoped cache for that run’s builders, and merge + seed writes the new durable cache on main / release_* and drops the old one.

Future improvement: Find similar mechanism for the tools cache

Testing Done:
caching checked on this PR CI

* cache_sdk

* cache_sdk

* apply comment fixes

* workflow dispatch on main/release

* draft:update all

* delete cache
@Sarthak-Shaha
sarthak shaha (Sarthak-Shaha) requested a review from a team as a code owner August 19, 2026 14:22
@Sarthak-Shaha
sarthak shaha (Sarthak-Shaha) merged commit 667fa58 into release_2.10-1.6.1 Aug 25, 2026
475 of 476 checks passed
@Sarthak-Shaha
sarthak shaha (Sarthak-Shaha) deleted the cache/submodules_release_2.10 branch August 25, 2026 14:26
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