perf(release): trim Windows packaging setup (#14037)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Theo BrowneandClaude Opus 5.5 authored and GitHub committed 2026-09-30 21:47:13 -07:00
1 parent 6f8e2534f2
commit 8630e1ac7a
1 file changed
+14 -15
+14 -15
View File
@@ -109,6 +109,9 @@ jobs:
# This repository is public, so Git needs no credentials. checkout's
# credential cleanup runs submodule foreach even with submodules disabled,
# which fails on the orphaned gitlinks in our vendored .repos tree.
# checkout.workers=0 writes the files on every core. Alternating both ways
# in one job on the Windows runners, it wrote the files about 10s faster
# (about 40% on arm64).
- name: Checkout
shell: bash
env:
@@ -120,8 +123,14 @@ jobs:
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
git fetch --no-tags --depth=1 origin "$CHECKOUT_REF"
git sparse-checkout set --no-cone '/*' '!/.repos/'
git checkout --detach FETCH_HEAD
git -c checkout.workers=0 checkout --detach FETCH_HEAD
# Windows installs straight from the registry. There, linking the packages
# takes the time, not downloading them, so a ~700 MB package cache did not
# pay for its own restore. Across recent nightlies, restore plus install
# took 183-233s on arm64 and 116-172s on x64, while a plain install took
# 142-210s and 84-160s. The arm64 entries also filled 4 GB of the
# repository's 10 GB Actions cache.
- name: Setup Vite+
uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1
with:
@@ -129,19 +138,6 @@ jobs:
cache: ${{ inputs.platform != 'win' }}
run-install: false
- name: Resolve Windows package cache path
if: inputs.platform == 'win'
id: package_cache_path
shell: pwsh
run: '"path=$(vp pm cache dir)" >> $env:GITHUB_OUTPUT'
- name: Cache Windows packages
if: inputs.platform == 'win'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ${{ steps.package_cache_path.outputs.path }}
key: windows-release-packages-v1-${{ inputs.arch }}-${{ hashFiles('pnpm-lock.yaml') }}
# pnpm checks the lockfile and policy before reusing this result. A missing
# artifact leaves the cache empty, so installation runs the checks again.
- name: Download dependency verification
@@ -217,8 +213,11 @@ jobs:
name: cli-linux-${{ inputs.arch }}
path: wsl-runtime
# Only the resource monitor build needs these libraries. With a cached
# monitor, the desktop build's preflight skips its MSVC check, and node-pty
# ships prebuilt Windows binaries, so the 30-60s install is skipped too.
- name: Install Spectre-mitigated MSVC libs
if: inputs.platform == 'win'
if: inputs.platform == 'win' && steps.resource_monitor_cache.outputs.cache-hit != 'true'
shell: pwsh
run: |
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"