Skip to content

ci: restore vcpkg binary caching so ICU isn't rebuilt every run - #44

Merged
ddehilster merged 1 commit into
VisualText:mainfrom
ddehilster:ci/fix-vcpkg-cache
Oct 15, 2026
Merged

ddehilster merged 1 commit into
VisualText:mainfrom
ddehilster:ci/fix-vcpkg-cache

Conversation

@ddehilster

Copy link
Copy Markdown
Member

Problem

Wheel builds take 50–70 minutes. Most of that is ICU being compiled from source, not the engine.

vcpkg removed its x-gha binary cache backend, so github-binarycache: true caches nothing. The job log says so:

warning: The 'x-gha' binary caching backend has been removed.

As a result, ICU is built from source about 5 times per job: once in the vcpkg step, then again in each of the four per-Python wheel builds, because CMake's manifest mode runs vcpkg install again in every build dir.

From the v2.2.66 run:

Job Total Spent building ICU
Windows 49 min about 37 min
macOS 27 min about 21 min
Linux 5 min none (installs ICU with yum)

Fix

Set github-binarycache: false on both vcpkg steps. This switches johnwason/vcpkg-action@v6 to its file cache: it exports VCPKG_DEFAULT_BINARY_CACHE and saves vcpkg_cache with actions/cache. cibuildwheel runs natively on Windows and macOS and inherits that env var, so the per-wheel vcpkg install should restore the same ICU package from the cache instead of rebuilding it.

Expected effect

  • The first run still builds ICU once, to fill the cache.
  • After that, I estimate Windows at about 10–12 min and macOS at about 8 min, so a release would take roughly 12–15 min.
  • These numbers come from the log timings. They haven't been measured yet. The second CI run on this PR will be the first real check.

🤖 Generated with Claude Code

vcpkg removed its 'x-gha' binary cache backend, so github-binarycache: true
cached nothing. ICU was compiled from source in the vcpkg step and again in
each per-Python wheel build (~5x per job), costing ~37 min on Windows and
~21 min on macOS. Switch the action to its file cache
(VCPKG_DEFAULT_BINARY_CACHE + actions/cache), which the wheel builds also hit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ddehilster
ddehilster merged commit 23a0de2 into VisualText:main Oct 15, 2026
8 checks passed
ddehilster added a commit that referenced this pull request Oct 15, 2026
#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>
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