From 8745e5b82f0a0183e779dcdcc8164ad926fdcf8c Mon Sep 17 00:00:00 2001 From: 5an7y Date: Tue, 23 Jun 2026 11:05:03 -0700 Subject: Drop hardcoded version defaults and the un-discoverable label map - Remove the hand-maintained _NT_TARGET_VERSION -> friendly-name map (latest/24H2/...) from Join-CsvReports.ps1, along with its "Release" column in the HTML and step-summary tables; those labels cannot be auto-discovered. - Stop hardcoding a version in the helper defaults: Import-SampleExclusions' -NtTargetVersion now defaults to empty (treated as the latest, so no NT-scoped row applies), and Build-SingleSample's -NtTargetVersionCode has no hardcoded code (the resolved value is always passed in). Blank MaxNtTargetVersion now uses [int]::MaxValue so 'latest'/empty matches the newest version's exclusion set. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/scripts/Join-CsvReports.ps1 | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to '.github') diff --git a/.github/scripts/Join-CsvReports.ps1 b/.github/scripts/Join-CsvReports.ps1 index b3e6cd4f..43e0c826 100644 --- a/.github/scripts/Join-CsvReports.ps1 +++ b/.github/scripts/Join-CsvReports.ps1 @@ -26,12 +26,6 @@ if (-not (Test-Path $logsPath)) { return } -# --- Friendly labels for the known _NT_TARGET_VERSION build tags -------------- -$ntLabel = @{ - '28000' = 'latest'; '26100' = '24H2'; '22621' = '22H2'; '22000' = '21H2' - '20348' = 'Server 2022'; '19041' = '2004'; '18362' = '1903'; '17763' = '1809' -} - # --- Load every per-job CSV --------------------------------------------------- # data[sample][tag][combo] = status $data = @{} @@ -130,16 +124,15 @@ $csvRows | Export-Csv -Path (Join-Path $logsPath "$reportFileName.csv") -NoTypeI # --- HTML (colour-coded sample x version matrix) ------------------------------ $generated = Get-Date -Format 'yyyy-MM-dd HH:mm:ss' -$sumHead = "_NT_TARGET_VERSIONReleasePassFlakyPartialFailn/aCombos OKSporadicFailedExcludedPass rate" +$sumHead = "_NT_TARGET_VERSIONPassFlakyPartialFailn/aCombos OKSporadicFailedExcludedPass rate" $sumRows = '' foreach ($t in $tags) { $x = $totals[$t]; $tot = $x.pass + $x.flaky + $x.partial + $x.fail + $x.na; $elig = $tot - $x.na $rate = if ($elig -gt 0) { '{0:N0}%' -f (100.0 * ($x.pass + $x.flaky) / $elig) } else { 'n/a' } - $rel = $ntLabel[$t]; if (-not $rel) { $rel = '' } - $sumRows += "$t$rel$($x.pass)$($x.flaky)$($x.partial)$($x.fail)$($x.na)$($x.S)$($x.O)$($x.F)$($x.E)$rate`n" + $sumRows += "$t$($x.pass)$($x.flaky)$($x.partial)$($x.fail)$($x.na)$($x.S)$($x.O)$($x.F)$($x.E)$rate`n" } $matHead = "Sample" -foreach ($t in $tags) { $rel = $ntLabel[$t]; if (-not $rel) { $rel = '' }; $matHead += "$t
$rel" } +foreach ($t in $tags) { $matHead += "$t" } $matHead += "" $html = @" @@ -181,13 +174,12 @@ if ($env:GITHUB_STEP_SUMMARY) { [void]$md.AppendLine("Columns are **_NT_TARGET_VERSION** (the WDK library version drivers link against). Each version was built for Debug/Release x x64/arm64.") [void]$md.AppendLine() [void]$md.AppendLine("## Summary by _NT_TARGET_VERSION") - [void]$md.AppendLine("| _NT_TARGET_VERSION | Release | :white_check_mark: Pass | :warning: Flaky | :large_orange_diamond: Partial | :x: Fail | :heavy_minus_sign: n/a | Pass rate |") - [void]$md.AppendLine("|---|---|---:|---:|---:|---:|---:|---:|") + [void]$md.AppendLine("| _NT_TARGET_VERSION | :white_check_mark: Pass | :warning: Flaky | :large_orange_diamond: Partial | :x: Fail | :heavy_minus_sign: n/a | Pass rate |") + [void]$md.AppendLine("|---|---:|---:|---:|---:|---:|---:|") foreach ($t in $tags) { $x = $totals[$t]; $tot = $x.pass + $x.flaky + $x.partial + $x.fail + $x.na; $elig = $tot - $x.na $rate = if ($elig -gt 0) { '{0:N0}%' -f (100.0 * ($x.pass + $x.flaky) / $elig) } else { 'n/a' } - $rel = $ntLabel[$t]; if (-not $rel) { $rel = '' } - [void]$md.AppendLine("| ``$t`` | $rel | $($x.pass) | $($x.flaky) | $($x.partial) | $($x.fail) | $($x.na) | **$rate** |") + [void]$md.AppendLine("| ``$t`` | $($x.pass) | $($x.flaky) | $($x.partial) | $($x.fail) | $($x.na) | **$rate** |") } [void]$md.AppendLine() -- cgit v1.3.1