-
Notifications
You must be signed in to change notification settings - Fork 21
U/sgriffin/vc2026 #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
U/sgriffin/vc2026 #167
Changes from all commits
c39ab11
397ed25
7a8ec30
f8efc98
2405bc0
f90d65c
8e457ff
8c7b20d
bba20d7
14f70be
0f6a5a4
a0109fb
4186348
eda8175
3c74dae
096a611
8862bc8
8746341
d7186a2
b41fde2
a5125bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,7 +15,8 @@ permissions: | |||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||
| analyze: | ||||||||||||||||||||||||
| name: Analyze (${{ matrix.language }}) | ||||||||||||||||||||||||
| runs-on: windows-latest | ||||||||||||||||||||||||
| # Use VS 2026 preview runner (GA May 4, 2026, then switch to windows-2025) | ||||||||||||||||||||||||
| runs-on: windows-2025-vs2026 | ||||||||||||||||||||||||
stephenegriffin marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||
| packages: read | ||||||||||||||||||||||||
| actions: read | ||||||||||||||||||||||||
|
|
@@ -39,9 +40,42 @@ jobs: | |||||||||||||||||||||||
| with: | ||||||||||||||||||||||||
| submodules: 'recursive' | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| - name: Install Windows 11 SDK (10.0.22621.0) | ||||||||||||||||||||||||
| shell: pwsh | ||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||
| $sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\10.0.22621.0" | ||||||||||||||||||||||||
| if (Test-Path $sdkPath) { | ||||||||||||||||||||||||
| Write-Host "Windows SDK 10.0.22621.0 already installed" | ||||||||||||||||||||||||
| exit 0 | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Download and verify installer | ||||||||||||||||||||||||
| $installer = "$env:TEMP\winsdksetup.exe" | ||||||||||||||||||||||||
| $expectedHash = "73FE3CC0E50D946D0C0A83A1424111E60DEE23F0803E305A8974A963B58290C0" | ||||||||||||||||||||||||
| Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." | ||||||||||||||||||||||||
| Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Verify SHA256 hash | ||||||||||||||||||||||||
| $actualHash = (Get-FileHash -Path $installer -Algorithm SHA256).Hash | ||||||||||||||||||||||||
| if ($actualHash -ne $expectedHash) { | ||||||||||||||||||||||||
| Write-Error "SHA256 hash mismatch! Expected: $expectedHash, Got: $actualHash" | ||||||||||||||||||||||||
stephenegriffin marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| Write-Host "SHA256 verified: $actualHash" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Install SDK | ||||||||||||||||||||||||
| Write-Host "Installing SDK (this may take a few minutes)..." | ||||||||||||||||||||||||
| $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru | ||||||||||||||||||||||||
| if (!(Test-Path $sdkPath)) { | ||||||||||||||||||||||||
| Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 | ||||||||||||||||||||||||
| Write-Error "Windows SDK installation failed" | ||||||||||||||||||||||||
|
Comment on lines
+69
to
+71
|
||||||||||||||||||||||||
| if (!(Test-Path $sdkPath)) { | |
| Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 | |
| Write-Error "Windows SDK installation failed" | |
| if ($proc.ExitCode -ne 0 -or !(Test-Path $sdkPath)) { | |
| Write-Host "Last 50 lines of SDK install log (if available):" | |
| Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 | |
| if ($proc.ExitCode -ne 0) { | |
| Write-Error "Windows SDK installer exited with code $($proc.ExitCode)." | |
| } elseif (!(Test-Path $sdkPath)) { | |
| Write-Error "Windows SDK installation may have failed: SDK path '$sdkPath' not found after installer completed successfully." | |
| } |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This SDK install step pins a SHA256 for a fwlink URL. fwlink targets can change over time, which risks random CI failures when the binary hash changes. Prefer installing via a stable package/component mechanism (or a stable, versioned direct download URL) rather than a mutable fwlink.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,13 +13,25 @@ permissions: | |||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||
| build: | ||||||||||||||||||||||||||
| runs-on: windows-latest | ||||||||||||||||||||||||||
| # Use VS 2026 preview runner (GA May 4, 2026, then switch to windows-2025) | ||||||||||||||||||||||||||
| runs-on: windows-2025-vs2026 | ||||||||||||||||||||||||||
stephenegriffin marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||
| security-events: write | ||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||
| configuration: [ 'Release', 'Debug', 'Release_Unicode', 'Debug_Unicode' ] | ||||||||||||||||||||||||||
| platform: [ 'Win32', 'x64' ] | ||||||||||||||||||||||||||
| platform: [ 'Win32', 'x64', 'ARM64', 'ARM64EC' ] | ||||||||||||||||||||||||||
| exclude: | ||||||||||||||||||||||||||
| # ARM64/ARM64EC only need Unicode builds | ||||||||||||||||||||||||||
| - platform: ARM64 | ||||||||||||||||||||||||||
| configuration: Release | ||||||||||||||||||||||||||
| - platform: ARM64 | ||||||||||||||||||||||||||
| configuration: Debug | ||||||||||||||||||||||||||
| - platform: ARM64EC | ||||||||||||||||||||||||||
| configuration: Release | ||||||||||||||||||||||||||
| - platform: ARM64EC | ||||||||||||||||||||||||||
| configuration: Debug | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||
| - name: Harden Runner | ||||||||||||||||||||||||||
|
|
@@ -32,6 +44,39 @@ jobs: | |||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| submodules: 'recursive' | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Install Windows 11 SDK (10.0.22621.0) | ||||||||||||||||||||||||||
| shell: pwsh | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| $sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\10.0.22621.0" | ||||||||||||||||||||||||||
| if (Test-Path $sdkPath) { | ||||||||||||||||||||||||||
| Write-Host "Windows SDK 10.0.22621.0 already installed" | ||||||||||||||||||||||||||
| exit 0 | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Download and verify installer | ||||||||||||||||||||||||||
| $installer = "$env:TEMP\winsdksetup.exe" | ||||||||||||||||||||||||||
| $expectedHash = "73FE3CC0E50D946D0C0A83A1424111E60DEE23F0803E305A8974A963B58290C0" | ||||||||||||||||||||||||||
| Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." | ||||||||||||||||||||||||||
| Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Verify SHA256 hash | ||||||||||||||||||||||||||
| $actualHash = (Get-FileHash -Path $installer -Algorithm SHA256).Hash | ||||||||||||||||||||||||||
| if ($actualHash -ne $expectedHash) { | ||||||||||||||||||||||||||
| Write-Error "SHA256 hash mismatch! Expected: $expectedHash, Got: $actualHash" | ||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||
|
Comment on lines
+56
to
+66
|
||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| Write-Host "SHA256 verified: $actualHash" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Install SDK | ||||||||||||||||||||||||||
| Write-Host "Installing SDK (this may take a few minutes)..." | ||||||||||||||||||||||||||
| $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru | ||||||||||||||||||||||||||
stephenegriffin marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| if (!(Test-Path $sdkPath)) { | ||||||||||||||||||||||||||
| Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 | ||||||||||||||||||||||||||
|
Comment on lines
+72
to
+74
|
||||||||||||||||||||||||||
| $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru | |
| if (!(Test-Path $sdkPath)) { | |
| Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 | |
| $logPath = Join-Path $env:TEMP "sdk_install.log" | |
| $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log `"$logPath`"" -Wait -PassThru | |
| if ($proc.ExitCode -ne 0) { | |
| Get-Content $logPath -ErrorAction SilentlyContinue | Select-Object -Last 50 | |
| Write-Error "Windows SDK installer exited with code $($proc.ExitCode)" | |
| exit 1 | |
| } | |
| if (!(Test-Path $sdkPath)) { | |
| Get-Content $logPath -ErrorAction SilentlyContinue | Select-Object -Last 50 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project> | ||
| <PropertyGroup> | ||
| <!-- VS 2026 Toolset --> | ||
stephenegriffin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <PlatformToolset>v145</PlatformToolset> | ||
stephenegriffin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <!-- Windows 11 SDK (pinned for reproducible builds) --> | ||
| <WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion> | ||
|
|
||
| <!-- Security Features (PropertyGroup level) --> | ||
| <!-- Note: Spectre mitigated libs may not be available for ARM64/ARM64EC --> | ||
| <SpectreMitigation Condition="'$(Platform)' != 'ARM64' AND '$(Platform)' != 'ARM64EC'">Spectre</SpectreMitigation> | ||
| <SpectreMitigation Condition="'$(Platform)' == 'ARM64' OR '$(Platform)' == 'ARM64EC'">false</SpectreMitigation> | ||
| <ControlFlowGuard>Guard</ControlFlowGuard> | ||
| <GuardEHContMetadata>true</GuardEHContMetadata> | ||
stephenegriffin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </PropertyGroup> | ||
|
|
||
| <!-- Compiler Settings - Quality & Security Baseline --> | ||
| <!-- CET (Control-flow Enforcement Technology) enabled by default, disabled for ARM64/ARM64EC below --> | ||
| <ItemDefinitionGroup> | ||
| <ClCompile> | ||
| <WarningLevel>Level4</WarningLevel> | ||
| <TreatWarningAsError>true</TreatWarningAsError> | ||
| <SDLCheck>true</SDLCheck> | ||
| <LanguageStandard>stdcpplatest</LanguageStandard> | ||
| </ClCompile> | ||
| <Link> | ||
| <CETCompat>true</CETCompat> | ||
| </Link> | ||
| </ItemDefinitionGroup> | ||
|
|
||
| <!-- Disable CET for ARM64/ARM64EC (not supported) --> | ||
| <ItemDefinitionGroup Condition="'$(Platform)' == 'ARM64' OR '$(Platform)' == 'ARM64EC'"> | ||
| <Link> | ||
| <CETCompat>false</CETCompat> | ||
| </Link> | ||
| </ItemDefinitionGroup> | ||
| </Project> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing
clang-format-17viaapt-getonubuntu-latestis not stable because the available package versions change as the runner image updates. To avoid formatting CI breaking when the package isn’t available, consider using the previously used clang-format action, pinning an Ubuntu version, or adding the LLVM apt repository for the desired clang-format version.