Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,16 @@ jobs:

- name: vcpkg build
id: vcpkg
uses: johnwason/vcpkg-action@v6
uses: johnwason/vcpkg-action@v8
with:
manifest-dir: ${{ github.workspace }}
triplet: arm64-osx-release
token: ${{ github.token }}
# vcpkg removed its 'x-gha' backend, so github-binarycache: true
# caches nothing and ICU was rebuilt from source on every run -- once
# here and again inside each per-Python wheel build (~5x per job).
# false switches the action to its file cache (VCPKG_DEFAULT_BINARY_CACHE
# + actions/cache), which the wheel builds also hit.
github-binarycache: false
# Pinned so the cache key is stable; must match vcpkg-cache.yml, which
# warms the cache on main (tag builds can only restore main's caches).
# The action's file cache (VCPKG_DEFAULT_BINARY_CACHE) is also what
# the per-Python wheel builds restore ICU from instead of rebuilding.
revision: '2026.07.29'

# Replaces the previous bare `pip wheel`, which only built a single wheel
# for the runner's host Python (leaving cp310-cp312 macOS users with no
Expand Down Expand Up @@ -121,17 +120,16 @@ jobs:

- name: vcpkg build
id: vcpkg
uses: johnwason/vcpkg-action@v6
uses: johnwason/vcpkg-action@v8
with:
manifest-dir: ${{ github.workspace }}
triplet: x64-windows-release
token: ${{ github.token }}
# vcpkg removed its 'x-gha' backend, so github-binarycache: true
# caches nothing and ICU was rebuilt from source on every run -- once
# here and again inside each per-Python wheel build (~5x per job).
# false switches the action to its file cache (VCPKG_DEFAULT_BINARY_CACHE
# + actions/cache), which the wheel builds also hit.
github-binarycache: false
# Pinned so the cache key is stable; must match vcpkg-cache.yml, which
# warms the cache on main (tag builds can only restore main's caches).
# The action's file cache (VCPKG_DEFAULT_BINARY_CACHE) is also what
# the per-Python wheel builds restore ICU from instead of rebuilding.
revision: '2026.07.29'

- name: Build wheels
# See the Linux job: v2.19.2 is too old to build cp313, so 3.13
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/vcpkg-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Builds ICU through vcpkg on main so publish.yml can restore it.
#
# publish.yml only runs on pull requests and v* tags, and a tag build can only
# restore caches saved on its own tag or on the default branch. Without a cache
# on main, every release would build ICU from source (~14 min on Windows). This
# job saves one; the weekly run keeps it from being evicted after 7 idle days.
#
# The vcpkg step must match publish.yml exactly (action version, manifest-dir,
# triplet, revision), or the cache key differs and publish.yml misses it.

name: Warm vcpkg cache

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'
push:
branches: [main]
paths:
- vcpkg.json
- .github/workflows/vcpkg-cache.yml

jobs:
vcpkg:
name: vcpkg (${{ matrix.triplet }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
triplet: x64-windows-release
- os: macOS-latest
triplet: arm64-osx-release

steps:
- uses: actions/checkout@v4

# Autotools are needed for vcpkg to build ICU from source on a cache miss.
- name: Install packages
if: runner.os == 'macOS'
run: brew install autoconf-archive autoconf automake pkg-config

- name: vcpkg build
uses: johnwason/vcpkg-action@v8
with:
manifest-dir: ${{ github.workspace }}
triplet: ${{ matrix.triplet }}
token: ${{ github.token }}
revision: '2026.07.29'
Loading