Repository navigation
ci: persist the vcpkg cache across runs and warm it on main - #45
Merged
Merged
Conversation
VisualText#44 stopped the per-wheel ICU rebuilds, but the cache still never saved: vcpkg-action@v6 saves through pat-s/always-upload-cache@v3, which calls the retired cache service ("Failed to save: Our services aren't available"). - Upgrade to vcpkg-action@v8, which saves with actions/cache@v5. - Pin the vcpkg revision so a new vcpkg release doesn't change the key. - Add vcpkg-cache.yml to build the cache on main. Tag builds can only restore caches from their own tag or the default branch, and publish.yml never runs on main, so without this every release would miss. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #44.
Problem
#44 stopped ICU from being rebuilt for each Python version. On its PR run, the four wheel builds restored ICU in about 2 s each, and the run took 29 min instead of 68.
The cache still didn't persist, though.
vcpkg-action@v6saves throughpat-s/always-upload-cache@v3, which calls GitHub's retired cache service:The repo has 0 Actions caches, so every job still builds ICU once at the start (about 14 min on Windows, 5 min on macOS).
Changes
Upgrade to
johnwason/vcpkg-action@v8. It saves withactions/cache@v5, right after the vcpkg step. Thegithub-binarycacheinput no longer exists in v8; the file cache is always used.Pin
revision: '2026.07.29'. This is the vcpkg release the last runs used. Without a pin, the action checks out the latest vcpkg release, so each new vcpkg release would change the cache key.Add
vcpkg-cache.yml. A tag build can only restore caches saved on its own tag or onmain, andpublish.ymlnever runs onmain, so releases would always miss the cache. This workflow runs only the vcpkg step onmain:vcpkg.jsonor this workflowIts vcpkg inputs must match
publish.ymlexactly. A comment in each file says so.Expected effect
Once
vcpkg-cache.ymlhas run onmain, a release should take roughly 12–15 min. I estimated that from the job logs; it hasn't been measured yet.The cache still misses whenever the key changes, for example when a runner image update changes the compiler and so the package hashes. The next weekly run rebuilds it.
Checking after merge
The merge itself triggers
vcpkg-cache.yml. After that, the next tag'svcpkg buildstep should logCache restored.🤖 Generated with Claude Code