Commit 0fd8b22
committed
fix(ci): use vswhere to locate MSVC for x86 on windows-2025 (VS 2026/18 support)
The hardcoded 2022 discovery failed because windows-2025 runners
now use Visual Studio 2026 (paths under Microsoft Visual Studio\18\...).
Proper solution (matching ilammy/msvc-dev-cmd logic and community
practices for GitHub Actions + VS 2022/2026):
- Use vswhere.exe (official locator, handles any VS version/year)
- Find installationPath dynamically
- Activate with amd64_x86 (64-bit host tools for 32-bit target)
- Verify activation (where cl + version) in logs
- Export full env via GITHUB_ENV for uv sdist builds (pyyaml etc.)
This is the standard robust way used across Python/C++ extension
CI on GitHub Windows runners. No external action (avoids Node 20
issues). shell: pwsh for reliable scripting + child cmd for vcvars.
Keeps change strictly to the x86 CI fix.1 parent a995e7d commit 0fd8b22
1 file changed
Lines changed: 26 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
0 commit comments