From ceceab78412feefd2f343a0e3bc07f1262665b62 Mon Sep 17 00:00:00 2001 From: 5an7y Date: Tue, 23 Jun 2026 10:38:40 -0700 Subject: Auto-discover _NT_TARGET_VERSION; remove the TargetVersion axis - Remove the -TargetVersion parameter and all its plumbing from Build-Samples.ps1 (restoring the original hard-coded -p:TargetVersion=Windows10), and drop the TargetVersions column from exclusions.csv and Import-SampleExclusions. Only _NT_TARGET_VERSION remains exposed. - Add Get-NtTargetVersions.ps1, which auto-discovers the valid _NT_TARGET_VERSION values (and their NTDDI codes) by parsing the active WDK's DriverGeneral.xml rule. Build-Samples.ps1 uses it to validate -NtTargetVersion, default to the latest, and map to the msbuild code, so a new WDK version needs no script change (accepts '10.0.' or the short '' tag). - CI: ci.yml and ci-pr.yml gain a 'discover' job that emits the newest-N versions as JSON; the build matrix consumes it via fromJSON, so there is no hand-maintained version list anywhere. Build-ChangedSamples.ps1 treats Get-NtTargetVersions.ps1 as a full-build trigger. - Docs updated accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/scripts/Build-ChangedSamples.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/scripts/Build-ChangedSamples.ps1') diff --git a/.github/scripts/Build-ChangedSamples.ps1 b/.github/scripts/Build-ChangedSamples.ps1 index 3e91eb88..f03f93f3 100644 --- a/.github/scripts/Build-ChangedSamples.ps1 +++ b/.github/scripts/Build-ChangedSamples.ps1 @@ -22,7 +22,7 @@ foreach ($file in $ChangedFiles) { $filename = Split-Path $file -Leaf # Files that can affect how every sample is built should trigger a full build - if ($filename -eq "Build-Samples.ps1" -or $filename -eq "exclusions.csv" -or $filename -eq "Directory.Build.props" -or $filename -eq "packages.config") { + if ($filename -eq "Build-Samples.ps1" -or $filename -eq "Get-NtTargetVersions.ps1" -or $filename -eq "exclusions.csv" -or $filename -eq "Directory.Build.props" -or $filename -eq "packages.config") { $buildAll = $true } if ($dir -like "$root\.github\scripts" -or $dir -like "$root\.github\scripts\*") { -- cgit v1.3.1