Skip to content

Fetch the dependencies once a job rather than once a build - #138

Merged
martin-s-a merged 2 commits into
mainfrom
keep-the-fetched-sources-for-the-whole-job
Sep 6, 2026
Merged

martin-s-a merged 2 commits into
mainfrom
keep-the-fetched-sources-for-the-whole-job

Conversation

@martin-s-a

Copy link
Copy Markdown
Contributor

Seven archives come down from github, gitlab and sourceforge on every
configure. FetchContent puts them inside the build directory, and
scikit-build-core makes that fresh every time, so a wheel job building
nine interpreters fetches the same sources nine times over — around 380
downloads across a deploy, each one a chance for someone else's outage to
end the run. Two did this week: gitlab timed out after 136 seconds
fetching Eigen, and sourceforge returned a 504 for half.

FETCHCONTENT_BASE_DIR puts them outside the build tree, where they are
populated once and reused.

Checked locally

Two build trees pointed at one base directory configure without
complaint, the second reusing what the first fetched. And with the
sources already present, a configure run inside a namespace with no
network at all completes — where the same configure without them fails
with fourteen errors. So the network really does leave the path, rather
than merely being hit less often.

The seven cover every dependency, so there is no list of names to keep in
step with the CMake.

What this does not do

It leaves one fetch per job. Carrying the directory between runs would
leave none, and that wants a cache of its own, keyed and saved like the
compiler caches are — worth doing separately, once this shows what it is
worth on its own.

🤖 Generated with Claude Code

Seven archives come down from github, gitlab and sourceforge on every
configure, and FetchContent puts them inside the build directory, which
scikit-build-core makes fresh each time. A wheel job builds nine
interpreters, so it fetches the same sources nine times over: about 380
downloads across a deploy, each one a chance for someone else's outage
to end the run. Two did this week, gitlab with a timeout and sourceforge
with a 504.

A base directory outside the build tree is populated once and reused.
Verified locally: two build trees share one without complaint, and with
the sources already there a configure completes with no network at all.

This leaves one fetch per job. Carrying the directory between runs would
leave none, and wants a cache of its own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
runner.temp is C:\a\_temp on Windows, and passing that through a bash
step turns the backslashes into escapes: the value arrived as the
relative a_temp/fetched and the sources landed inside the checkout,
where pytest walked into pybind11's own suite and failed collecting it.

An absolute path with forward slashes survives every shell.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@martin-s-a martin-s-a self-assigned this Sep 6, 2026
@martin-s-a martin-s-a added the enhancement New feature or request label Sep 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Sep 6, 2026

Copy link
Copy Markdown

@martin-s-a
martin-s-a merged commit 3b86b44 into main Sep 6, 2026
47 checks passed
@martin-s-a
martin-s-a deleted the keep-the-fetched-sources-for-the-whole-job branch September 6, 2026 22:24
@martin-s-a martin-s-a added the github_actions Pull requests that update GitHub Actions code label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant