| ... | ... | @@ -109,6 +109,9 @@ jobs: |
| 109 | 109 | # This repository is public, so Git needs no credentials. checkout's |
| 110 | 110 | # credential cleanup runs submodule foreach even with submodules disabled, |
| 111 | 111 | # 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). |
| 112 | 115 | - name: Checkout |
| 113 | 116 | shell: bash |
| 114 | 117 | env: |
| ... | ... | @@ -120,8 +123,14 @@ jobs: |
| 120 | 123 | git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" |
| 121 | 124 | git fetch --no-tags --depth=1 origin "$CHECKOUT_REF" |
| 122 | 125 | 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. |
| 125 | 134 | - name: Setup Vite+ |
| 126 | 135 | uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1 |
| 127 | 136 | with: |
| ... | ... | @@ -129,19 +138,6 @@ jobs: |
| 129 | 138 | cache: ${{ inputs.platform != 'win' }} |
| 130 | 139 | run-install: false |
| 131 | 140 | |
| 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 | | |
| 145 | 141 | # pnpm checks the lockfile and policy before reusing this result. A missing |
| 146 | 142 | # artifact leaves the cache empty, so installation runs the checks again. |
| 147 | 143 | - name: Download dependency verification |
| ... | ... | @@ -217,8 +213,11 @@ jobs: |
| 217 | 213 | name: cli-linux-${{ inputs.arch }} |
| 218 | 214 | path: wsl-runtime |
| 219 | 215 | |
| 216 | # Only the resource monitor build needs these libraries. With a cached |
| 217 | # monitor, the desktop build's preflight skips its MSVC check, and node-pty |
| 218 | # ships prebuilt Windows binaries, so the 30-60s install is skipped too. |
| 220 | 219 | - name: Install Spectre-mitigated MSVC libs |
| 221 | | if: inputs.platform == 'win' |
| 220 | if: inputs.platform == 'win' && steps.resource_monitor_cache.outputs.cache-hit != 'true' |
| 222 | 221 | shell: pwsh |
| 223 | 222 | run: | |
| 224 | 223 | $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" |