Skip to content

CI: share the Conan cache with pull requests, retry downloads longer - #7

Merged
thervier merged 2 commits into
masterfrom
ci/cache-and-retries
Oct 12, 2026
Merged

thervier merged 2 commits into
masterfrom
ci/cache-and-retries

Conversation

@thervier

Copy link
Copy Markdown

Two CI improvements.

Share the Conan cache with pull requests. GitHub only shows a cache saved by a pull request to that same pull request. Our caches were all saved by pull requests, so each new pull request rebuilt every dependency: ~1h on Windows instead of ~20 min. Caches saved on master are visible to every pull request, so:

  • the workflow now also runs on master when build-related files change, with the same paths as for pull requests. Path filters don't apply to tags, so releases still run on every v* tag. Each build on master also gives the wheels of the current master as artifacts.
  • runs on master and on tags are never cancelled. Only a run on a pull request is cancelled by a new push to it.
  • the cache is no longer saved when a run is cancelled, since it could be incomplete.

Retry longer when a download fails. A temporary github.com outage (HTTP 504) while downloading the pybind11 sources made a build fail. Conan now retries these downloads 5 times, every 20 s, instead of 2 times, every 5 s (tools.files.download:retry / retry_wait). Downloads from the Conan server (core.download:*) can only be configured in the user's global.conf, which the script shouldn't modify.

Expected cost: changing ci/conan_deps.sh changes the cache key, so this pull request rebuilds all the dependencies once (~1h on Windows). After the merge, the run on master saves caches that later pull requests will use.

🤖 Generated with Claude Code

thervier and others added 2 commits October 12, 2026 19:28
A cache saved by a pull request is only visible to that pull request, so each
new pull request rebuilt all the dependencies (~1h on Windows). Caches saved
on master are visible to all of them.

- Build on master when build-related files change.
- Never cancel the builds on master and on tags, only on pull requests.
- Do not save the cache of a cancelled build, which could be incomplete.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A temporary outage of github.com (HTTP 504) when downloading the pybind11
sources made a build fail: retry 5 times, every 20s, instead of 2 times,
every 5s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thervier
thervier merged commit 7f448ed into master Oct 12, 2026
4 checks passed
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.

1 participant