Skip to content
Merged
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
31 changes: 15 additions & 16 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -120,28 +123,21 @@ 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:
node-version-file: package.json
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
Expand Down Expand Up @@ -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"
Expand Down
Loading