Skip to content

Commit b2982fa

Browse files
t3dotggclaude
andcommitted
perf(release): trim Windows packaging setup
Windows arm64 is the slowest release job, and its setup is slow file work. Two changes, both measured on the release runners: - Check out with checkout.workers=0, which writes files on every core. Alternating both ways in one job, it was about 10s faster. - Drop the Windows package cache. Linking dominates a Windows install, so restoring the ~700 MB cache cost more than it saved: 183-233s for restore plus install on arm64 against 142-210s for a plain install across recent nightlies. The arm64 entries also used 4 GB of the 10 GB Actions cache. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent d15210c commit b2982fa

1 file changed

Lines changed: 11 additions & 15 deletions

File tree

‎.github/workflows/release-desktop.yml‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ jobs:
109109
# This repository is public, so Git needs no credentials. checkout's
110110
# credential cleanup runs submodule foreach even with submodules disabled,
111111
# which fails on the orphaned gitlinks in our vendored .repos tree.
112+
# checkout.workers=0 writes the files on every core. Alternating both ways
113+
# in one job on the Windows runners, it wrote the files about 10s faster
114+
# (about 40% on arm64).
112115
- name: Checkout
113116
shell: bash
114117
env:
@@ -120,28 +123,21 @@ jobs:
120123
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
121124
git fetch --no-tags --depth=1 origin "$CHECKOUT_REF"
122125
git sparse-checkout set --no-cone '/*' '!/.repos/'
123-
git checkout --detach FETCH_HEAD
124-
126+
git -c checkout.workers=0 checkout --detach FETCH_HEAD
127+
128+
# Windows installs straight from the registry. There, linking the packages
129+
# takes the time, not downloading them, so a ~700 MB package cache did not
130+
# pay for its own restore. Across recent nightlies, restore plus install
131+
# took 183-233s on arm64 and 116-172s on x64, while a plain install took
132+
# 142-210s and 84-160s. The arm64 entries also filled 4 GB of the
133+
# repository's 10 GB Actions cache.
125134
- name: Setup Vite+
126135
uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1
127136
with:
128137
node-version-file: package.json
129138
cache: ${{ inputs.platform != 'win' }}
130139
run-install: false
131140

132-
- name: Resolve Windows package cache path
133-
if: inputs.platform == 'win'
134-
id: package_cache_path
135-
shell: pwsh
136-
run: '"path=$(vp pm cache dir)" >> $env:GITHUB_OUTPUT'
137-
138-
- name: Cache Windows packages
139-
if: inputs.platform == 'win'
140-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
141-
with:
142-
path: ${{ steps.package_cache_path.outputs.path }}
143-
key: windows-release-packages-v1-${{ inputs.arch }}-${{ hashFiles('pnpm-lock.yaml') }}
144-
145141
# pnpm checks the lockfile and policy before reusing this result. A missing
146142
# artifact leaves the cache empty, so installation runs the checks again.
147143
- name: Download dependency verification

0 commit comments

Comments
 (0)