Repository navigation
Commit 72dec93
authored
fix(ci): install VS 2022 Build Tools for Node 22 on windows-arm64 (#222)
## Problem
`windows-arm64 (22)` fails every time
([example](https://github.com/yao-pkg/pkg-fetch/actions/runs/39743037572/job/119704702722)):
```
Looking for Visual Studio 2022
Failed to find a suitable Visual Studio installation.
```
The `windows-11-arm` label now uses the `windows-11-vs2026-arm64` image,
which has only VS 2026 (actions/runner-images#14602, finished Sept 30).
Node 22's `vcbuild.bat` only looks for VS 2022 (`[17.6,18.0)`). Node 24
and 26 also look for VS 2026, so they still pass. No hosted arm64
Windows image with VS 2022 is left.
## Fix
For the arm64 + Node 22 job only, install VS 2022 Build Tools with the
VC tools workload, ARM64 compilers and ARM64 ATL. Node 22's vswhere
query uses `-products *`, so it finds a Build Tools install.
Considered instead:
- **Patch `vcbuild.bat` to accept VS 2026** (port of nodejs/node#60727,
~30 lines). Node 22's gyp already supports VS 2026, so this would be
enough to find the compiler. But upstream keeps v22 on VS 2022 on
purpose (the VS 2026 tooling/doc PRs are `dont-land-on-v22.x`), so Node
22 is never built with MSVC 18 and its older V8 may not compile with it.
It would also add a hunk to carry into every new v22 patch, and our
binary would use a different compiler than the official release.
- **Switch to a different runner label.** None exists: the VS 2022 arm64
image is gone.
## Test
Windows workflow run on this branch:
https://github.com/yao-pkg/pkg-fetch/actions/runs/397792798951 parent 5f4a2d5 commit 72dec93
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| |||
0 commit comments