Skip to content

ci: persist the vcpkg cache across runs and warm it on main - #45

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

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

Conversation

@ddehilster

Copy link
Copy Markdown
Member

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@v6 saves through pat-s/always-upload-cache@v3, which calls GitHub's retired cache service:

Failed to save: Our services aren't available right now

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 with actions/cache@v5, right after the vcpkg step. The github-binarycache input 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 on main, and publish.yml never runs on main, so releases would always miss the cache. This workflow runs only the vcpkg step on main:

    • on pushes that change vcpkg.json or this workflow
    • weekly, because GitHub evicts caches that go unused for 7 days
    • on manual dispatch

    Its vcpkg inputs must match publish.yml exactly. A comment in each file says so.

Expected effect

Once vcpkg-cache.yml has run on main, 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's vcpkg build step should log Cache restored.

🤖 Generated with Claude Code

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>
@ddehilster
ddehilster merged commit 0885dab into VisualText:main Oct 15, 2026
8 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