Skip to content

ci(windows): fix windows-2025 generator and windows-11-arm SHLWAPI legs - #2471

Merged
ronaldtse merged 7 commits into
mainfrom
fix-windows-preview-legs
Aug 28, 2026
Merged

ronaldtse merged 7 commits into
mainfrom
fix-windows-preview-legs

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

Makes the two non-blocking windows preview legs actually work (#2461), so they can start gating like the rest of the matrix.

windows-2025 — generator selection

cmake -G "Visual Studio 17 2022" fails with could not find any instance of Visual Studio: the image ships VS 2026 only (generator version 18). A new step selects the generator per image (Visual Studio 18 2026 on windows-2025, unchanged elsewhere) and both configure steps use it.

windows-11-arm — SHLWAPI discovery

Configure fails with SHLWAPI_LIBRARY ... NOTFOUND because GetUMWindowsSDKLibraryDir returns an empty directory on the ARM64 images (-- Using Windows SDK library directory: ). The WindowsSDK-module probing is dropped entirely; shlwapi is now linked by name and resolved by the linker from the per-architecture Windows SDK library paths, which works on every architecture.

Sequencing

The legs remain continue-on-error while this PR verifies them green; the final commit here removes the exemption so they become blocking.

Closes #2461 (once the exemption is removed).

Test plan

  • windows-2025 leg configures with the VS 18 2026 generator and v143 toolset
  • windows-11-arm leg passes generate (SHLWAPI resolved by the linker) and builds
  • All other windows-2022 legs unchanged
  • Remove continue-on-error once both are green

windows-2025 ships Visual Studio 2026 only, so the hardcoded
"Visual Studio 17 2022" generator finds no VS instance; select the
generator per image (VS 18 2026 on windows-2025).

windows-11-arm fails at generate time because
GetUMWindowsSDKLibraryDir returns an empty directory on ARM64 images,
leaving SHLWAPI_LIBRARY NOTFOUND; link shlwapi by name and let the
linker resolve it from the per-architecture SDK library paths.

Both legs stay continue-on-error until verified green; a follow-up
commit in this PR will make them blocking (see #2461).
Per the runner-images Windows2025 README, plain windows-2025 and
windows-11-arm ship VS2022; only the new *-vs2026 labels ship VS2026.
Select the generator by label suffix instead of assuming windows-2025
lacks VS2022, and add windows-2025-vs2026 / windows-11-vs2026-arm
legs (default toolset; the v143 availability on VS2026 images is
unverified). Empty toolsets skip -T entirely. All four non-2022 legs
stay continue-on-error until verified.
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.39%. Comparing base (4211d52) to head (b573af3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2471      +/-   ##
==========================================
- Coverage   85.40%   85.39%   -0.01%     
==========================================
  Files         126      126              
  Lines       22964    22958       -6     
==========================================
- Hits        19612    19605       -7     
- Misses       3352     3353       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The live windows-2025 image exposes no VS2022 instance even though the
runner-images README lists VS Enterprise 2022, so label-based generator
selection still failed there. Ask vswhere what is actually installed
and map 17->VS2022 / 18->VS2026 generators; keep -T only for VS2022
since the VS2026 images may not ship the v143 toolset.
Direct bash invocation of the Program Files (x86) vswhere is known not
to work on these images; the toolchain step already uses the Chocolatey
shim through cmd. Strip the CRLF cmd appends.
An extra ']' after the [ -n ... ] test would abort every configure step
under set -e before cmake ran.
All four (windows-2025, windows-11-arm, windows-2025-vs2026,
windows-11-vs2026-arm) are verified green with the vswhere-driven
generator detection. Closes #2461.
@ronaldtse

Copy link
Copy Markdown
Contributor Author

@ni4 this is the windows CI fix that unblocks the windows-11-arm leg across all PRs (including #2472): #2471

CI/workflow-only change (no runtime code), so just needs your solo approval. It:

  • links SHLWAPI by name instead of the broken GetUMWindowsSDKLibraryDir probing (fixes the ARM64 NOTFOUND)
  • detects the Visual Studio generator via vswhere instead of trusting the runner label (the windows-2025 image ships VS2026 despite the README listing VS2022)
  • adds windows-2025-vs2026 and windows-11-vs2026-arm legs
  • removes continue-on-error: all four preview legs are verified green and now blocking

Closes #2461. Once this merges, #2472's windows-11-arm goes green and both can land.

@ronaldtse
ronaldtse requested a review from ni4 August 27, 2026 22:25

@ni4 ni4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ronaldtse

Copy link
Copy Markdown
Contributor Author

Thanks @ni4 ! The only failures are codecov 0.01% and the two fuzzing jobs that are blocked by google/oss-fuzz#15882, so everything is passing here. Merging.

@ronaldtse
ronaldtse merged commit 7853ae9 into main Aug 28, 2026
150 of 156 checks passed
@ronaldtse
ronaldtse deleted the fix-windows-preview-legs branch August 28, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(windows-native): make windows-2025 and windows-11-arm legs blocking

2 participants