| Age | Commit message (Collapse) | Author |
|
- 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 <[email protected]>
|
|
- 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.<build>' or the short '<build>' 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 <[email protected]>
|
|
Exclusions:
- Add MinNtTargetVersion/MaxNtTargetVersion columns to exclusions.csv so a row can apply
only within an _NT_TARGET_VERSION build-number range (parsed from -NtTargetVersion, e.g.
22000 from 10.0.22000). Import-SampleExclusions filters this range at load time alongside
the existing build-number range; blank = unbounded.
- Exclude the samples that fail only when linking against older library sets, with the
reason taken from the build logs: audio.sysvad (<=22000, KSJACK_DESCRIPTION3);
network.netadaptercx.netvadapter and network.wlan.wificx (<=22621, NDIS/DDI version);
powerlimit.plclient/plpolicy (<=22621, POWER_LIMIT_ATTRIBUTES); storage classpnp/storahci
(<=22621, STOR_ADDRESS_TYPE_NVME, Debug-only) and storage.msdsm (Debug|x64). usb.usbview is
intentionally NOT excluded: it fails on every version for a known host reason (missing
.NET 4.7.2/4.8.1 targeting packs).
CI:
- ci.yml and ci-pr.yml: add _NT_TARGET_VERSION as a manual matrix axis (4 newest versions,
latest-first) so each version x configuration x platform runs on its own parallel runner.
- Build-Samples.ps1 and Join-CsvReports.ps1 now write an easy-to-scan Markdown summary to
GITHUB_STEP_SUMMARY: each build job shows counts and a failures table with the first error;
the report job shows per-version totals and a consolidated failures list, plus the
colour-coded sample x version HTML/CSV overview.
Co-authored-by: Copilot <[email protected]>
|
|
Expose the WDK '_NT_TARGET_VERSION' property (the OS version of the libraries
the driver links against) as -NtTargetVersion / WDS_NtTargetVersion. Unlike
-TargetVersion (Target OS Version), this does not change the platform model, so
Universal/Windows Driver samples keep building on Windows 10 while linking
against an older library set.
The parameter accepts the Windows build number (e.g. 10.0.22000), maps it to the
NTDDI code from the WDK DriverGeneral.xml rule, and passes -p:_NT_TARGET_VERSION
to msbuild (threaded through Build-SingleSample and the parallel runspace). It
defaults to the latest (10.0.28000) and is surfaced in the build plan, summary,
and HTML report title. Documented in Building-Locally.md.
Co-authored-by: Copilot <[email protected]>
|
|
Add an optional TargetVersions column to exclusions.csv so an exclusion can
be limited to specific target OS versions (e.g. exclude ARM only when
building Windows8). The column holds a ';'-separated list of -like patterns
matched against -TargetVersion; blank or '*' means all versions, so every
existing row stays applicable to all targets.
Import-SampleExclusions now takes -TargetVersion and filters rows by it at
load time (alongside the existing MinBuild/MaxBuild range); a missing column
is treated as '*' for backward compatibility. Document the new column and an
example in Building-Locally.md.
Co-authored-by: Copilot <[email protected]>
|
|
Add a validated -TargetVersion parameter (also settable via the
WDS_TargetVersion environment variable) so samples can be built for older
target OS versions. Valid values come from the WDK DriverGeneral.xml rule
and default to the latest, Windows10:
Windows10 (Windows 10 or higher), WindowsV6.3 (Windows 8.1),
Windows8 (Windows 8), Windows7 (Windows 7).
The value is threaded through Build-SingleSample into the msbuild
invocation (replacing the hard-coded TargetVersion=Windows10) and across
the parallel runspace, and is surfaced in the build plan, final summary,
and HTML report title. Document the new parameter in the script help and
Building-Locally.md.
Co-authored-by: Copilot <[email protected]>
|
|
- Remove Initialize-DevShell as a separate step; VS Dev Shell setup is
now fully owned by Resolve-BuildEnvironment alongside mode detection.
This eliminates the ordering problem where vswhere ran unconditionally
before knowing whether the environment was EWDK (which needs no VS).
- Fix EWDK regression: EWDK mode now returns early before any vswhere
or Dev Shell logic is invoked.
- Fix Auto+WDK from plain terminal: the old isWdk guard required
UCRTVersion to be set before the Dev Shell was opened, making Auto
detection fail on a clean terminal. Removed the guard; the code now
falls through to Dev Shell setup and validates UCRTVersion afterward.
- Fix VSINSTALLDIR trailing-backslash mismatch: when the Dev Shell is
already active, VSINSTALLDIR ends with '\' while vswhere installationPath
does not. Added TrimEnd('\') on both sides before comparing.
- Renumber Build-Samples.ps1 step comments (old Step 5 'Detect Build
Environment' merged into Step 1; remaining steps renumbered).
Co-authored-by: Copilot <[email protected]>
|
|
NuGet mode works correctly for GitHub Actions (the HTML open is already
guarded by [Environment]::UserInteractive which is false on CI runners).
The Github mode was redundant and is removed to keep the interface clean.
Co-authored-by: Copilot <[email protected]>
|
|
Previously, WdkVsComponentVersion was read from the global ProgramData
package cache, which is shared across all VS installations and could
return the wrong version when multiple installs are present.
- Add -include packages to the vswhere call in Get-VsInstallationsWithWdk
so each returned installation includes its WdkVsComponentVersion
- Initialize-DevShell now returns the selected installation object
- Resolve-BuildEnvironment accepts an optional -VsInstallation parameter;
when provided it reuses the already-selected install (no second prompt);
when absent (Dev Shell was pre-active) it calls Select-VsInstallation once
- Build-Samples.ps1 threads the result of Initialize-DevShell through to
Resolve-BuildEnvironment
Co-authored-by: Copilot <[email protected]>
|
|
Move Get-VsInstallationsWithWdk, Select-VsInstallation, Initialize-DevShell,
Assert-MsBuildAvailable, and Resolve-BuildEnvironment out of Build-Samples.ps1
into a new BuildEnvironment.ps1 helper file. Build-Samples.ps1 dot-sources it
via PSScriptRoot, consistent with the existing ListAllSamples.ps1 pattern.
Reduces Build-Samples.ps1 from 733 to 565 lines with no behaviour change.
Co-authored-by: Copilot <[email protected]>
|
|
- Add -RunMode parameter (Auto/WDK/NuGet/EWDK/Github) defaulting to Auto
- Auto-detection priority order: NuGet -> EWDK -> WDK
- Github mode: same as NuGet but suppresses opening the HTML report
- Add Get-VsInstallationsWithWdk: uses vswhere.exe from its fixed ProgramFiles
path to find VS installs with the Microsoft.Windows.DriverKit component
- Add Select-VsInstallation: errors if none found, verbose-logs if one found,
presents a numbered interactive menu if multiple found
- Replace Initialize-DevShell glob-based blind pick with the new helpers
- Remove GITHUB_REPOSITORY auto-detect branch; replace HTML open guard with
buildEnv.IsGithubMode
- Update comment-based help with -RunMode parameter docs and examples
Co-authored-by: Copilot <[email protected]>
|
|
- When -Samples contains wildcards (* or ?), discover all samples first
then filter with -like (same pattern style as exclusions.csv)
- Exact sample names still work as before without discovery overhead
- Update parameter docs, examples, and Building-Locally.md
|
|
- Inline Build-Sample.ps1 logic as Build-SingleSample function in Build-Samples.ps1
- Pass function definition into parallel runspaces via $using: pattern
- Replace exit codes with return values for in-process execution
- Delete Build-Sample.ps1 (no longer needed as a separate script)
- Update Build-ChangedSamples.ps1 trigger file list
|
|
- ListAllSamples.ps1: output sorted sample names to stdout instead of
writing Samples.txt. The file output is replaced with Write-Output
so callers can capture results via pipeline or command substitution.
- Build-Samples.ps1: remove SampleListPath parameter. Default discovery
now calls ListAllSamples.ps1 at runtime and consumes its stdout.
Explicit -Samples array still works and is sorted alphabetically.
Both paths guarantee a consistent alphabetical sample ordering.
- Samples.txt: deleted. No longer needed as a pre-generated artifact.
WDS_TestPass.cs is unaffected - it only passes -LogFilesDirectory and
-InfOptions, neither of which changed.
Co-authored-by: Copilot <[email protected]>
|
|
Build-Samples.ps1:
- Extract helper functions for readability (Resolve-BuildEnvironment,
Import-SampleExclusions, Initialize-DevShell, Assert-MsBuildAvailable,
Get-DiskFreeGB)
- Add #Requires -Version 7.0
- Fix build_number to explicit [int] cast (was string from regex)
- Fix multi-socket CPU handling (sum LogicalProcessors)
- Fix NuGet path detection to use absolute repo root path
- Support wildcard patterns in exclusion paths (-like vs ContainsKey)
- Guard Invoke-Item for CI/automation (skip in non-interactive sessions)
- Validate sample directories exist before building
- Wrap Get-Volume in try/catch for UNC/network drives
- Use Write-Host with carriage return for progress (Write-Progress
unreliable in -Parallel runspaces)
- Clean up variable names and add section comments
- Use switch instead of if/elseif for exit codes
ListAllSamples.ps1:
- Fix NuGet packages filter regex to catch packages anywhere in path
(was only matching paths starting with packages)
Samples.txt:
- Regenerated with fixed filter, remove BOM
Co-authored-by: Copilot <[email protected]>
|
|
- ListAllSamples.ps1: Enumerates .sln files and writes Samples.txt
- Build-Samples.ps1: Unified build script reading Samples.txt with
exclusion support, parallel execution, and report generation
- Build-Sample.ps1: Fix retry bug where all-fail exits 0 instead of 1
Co-authored-by: Copilot <[email protected]>
|