Skip to content

ci: cache BSD sdk sources separately - #35722

Closed
willcl-ark wants to merge 3 commits into
bitcoin:masterfrom
willcl-ark:depends-sdk-sources
Closed

willcl-ark wants to merge 3 commits into
bitcoin:masterfrom
willcl-ark:depends-sdk-sources

Conversation

@willcl-ark

Copy link
Copy Markdown
Member

Sometimes CI jobs need to (re)download *BSD SDK archives, and these downloads can delay or fail the job, as has been happening recently.

The SDKs are currently downloaded and extracted while building the CI image itself; this means that when the relevant image-build cache is missed or invalidated, the SDK archives are downloaded again, which is unnecessary.

Instead, cache the BSD SDK archives separately and mount them into the runtime container. Move the BSD SDK setup out of 01_base_install.sh and run it after the container starts, so it is no longer part of the image build and the BSD SDKs are no longer part of the image build cache/layers.

This means rebuilding the BSD images no longer relies on pulling the SDK archives, reducing reliance and load we have on archive servers in many cases.

While touching 02_run_container.py and adding new paths to it, unify path handling for all caches a bit more.

@DrahtBot

DrahtBot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #35754 (ci: update and verify SDKs, lock lint dependencies by l0rinc)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

The base install script runs while constructing the CI image, but the BSD
SDKs are only needed later when compiling the source in the running
container.

Moving them out of base_install.sh means we can cache them similarly to
other sources/caches.
Restore and save the NetBSD, FreeBSD, and OpenBSD SDK archives through the
existing cache provider.

Mount the shared sdk-sources directory in the container so cache hits
avoid downloading the archives again.
The cache directories need to be created and mounted in both host and Docker
modes. Keeping separate lists lets the paths drift.

Define each cache's source and destination once and derive the volume and bind
mounts from that definition.
@willcl-ark
willcl-ark force-pushed the depends-sdk-sources branch from ae284ca to cd4b34c Compare July 14, 2026 14:57
@willcl-ark willcl-ark changed the title [NOMERGE] ci: cache BSD sdk sources separately ci: cache BSD sdk sources separately Jul 14, 2026
@willcl-ark
willcl-ark marked this pull request as ready for review July 14, 2026 14:59
@DrahtBot DrahtBot added Tests and removed CI failed labels Jul 14, 2026
@DrahtBot

DrahtBot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

@maflcko

maflcko commented Aug 4, 2026

Copy link
Copy Markdown
Member

An alternative would be to add fallback mirrors (like in depends), but this may be fine as well (haven't looked closely)

@willcl-ark

Copy link
Copy Markdown
Member Author

Yeah I'm open to either option too. The nice thing about caching them in CI is that nobody has to update the fallback mirror on each SDK update (or forget to!). But IMO it's the "cleaner" approach, and the fallbacks also work for contributors local development; could be superior depending on how flakey the original hosts are...

I think it might be @achow101 who could add fallbacks of these, if we want to go that route?

@maflcko

maflcko commented Aug 4, 2026

Copy link
Copy Markdown
Member

Do you recall any CI logs where the download failed?

@willcl-ark

Copy link
Copy Markdown
Member Author

Do you recall any CI logs where the download failed?

I do not, it was just the re-downloading them needlessly which prompted this change.

@sedited

sedited commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Ping for rebase.

@sedited

sedited commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

@willcl-ark do you still think the changes here are worthwhile?

@willcl-ark

Copy link
Copy Markdown
Member Author

Closing due to low value.

@willcl-ark willcl-ark closed this Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants