summaryrefslogtreecommitdiff
path: root/Build-SampleSet.ps1
diff options
context:
space:
mode:
authorJakob Lichtenberg (170957) <[email protected]>2024-09-23 19:52:02 -0700
committerJakob Lichtenberg (170957) <[email protected]>2024-09-23 19:52:02 -0700
commit19e5c3a10bb16b318e9e05a00f9502fa9920cdcc (patch)
tree73d17eb268b6a6beeae4582c406fbeb4a793be20 /Build-SampleSet.ps1
parentd65f6bb4041fa74f969e78ce2cfc230a71e824b4 (diff)
parent5c4ceaef72f0af992966a7d2ac7ac7d897f091d3 (diff)
Merge branch 'develop'
Diffstat (limited to 'Build-SampleSet.ps1')
-rw-r--r--Build-SampleSet.ps139
1 files changed, 17 insertions, 22 deletions
diff --git a/Build-SampleSet.ps1 b/Build-SampleSet.ps1
index adae8bb0..f6765395 100644
--- a/Build-SampleSet.ps1
+++ b/Build-SampleSet.ps1
@@ -56,20 +56,17 @@ finally {
# Determine build environment: 'GitHub', 'NuGet', 'EWDK', or 'WDK'.
# Determine build number (used for exclusions based on build number). Five digits. Say, '22621'.
# Determine NuGet package version (if applicable).
-# Determine WDK vsix version.
#
$build_environment=""
$build_number=0
$nuget_package_version=0
-$vsix_version=""
#
-# In Github we build using NuGet and get the version from packages and vsix version from env var set from the install vsix step.
+# In Github we build using NuGet.
#
if ($env:GITHUB_REPOSITORY) {
$build_environment="GitHub"
$nuget_package_version=([regex]'(?<=x64\.)(\d+\.)(\d+\.)(\d+\.)(\d+)').Matches((Get-Childitem .\packages\*WDK.x64* -Name)).Value
$build_number=$nuget_package_version.split('.')[2]
- $vsix_version = $env:SAMPLES_VSIX_VERSION
}
#
# WDK NuGet will require presence of a folder 'packages'. The version is sourced from repo .\Env-Vars.ps1.
@@ -107,16 +104,12 @@ else {
exit 1
}
#
-# Get the vsix version from packages if not set
-if (-not $vsix_version) {
- $vsix_version = ls "${env:ProgramData}\Microsoft\VisualStudio\Packages\Microsoft.Windows.DriverKit,version=*" | Select -ExpandProperty Name
- if ($vsix_version) {
- $vsix_version = $vsix_version.split('=')[1]
- }
- else {
- Write-Error "No version of the WDK VSIX could be found. The WDK VSIX is not installed."
- exit 1
- }
+# Get the WDK extension version from installed packages
+$wdk_extension_ver = ls "${env:ProgramData}\Microsoft\VisualStudio\Packages\Microsoft.Windows.DriverKit,version=*" | Select -ExpandProperty Name
+$wdk_extension_ver = ([regex]'(\d+\.)(\d+\.)(\d+\.)(\d+)').Matches($wdk_extension_ver).Value
+if (-not $wdk_extension_ver) {
+ Write-Error "No version of the WDK Visual Studio Extension could be found. The WDK Extension is not installed."
+ exit 1
}
#
#
@@ -180,20 +173,22 @@ $jresult = @{
$SolutionsTotal = $sampleSet.Count * $Configurations.Count * $Platforms.Count
-Write-Output ("Build Environment: " + $build_environment)
-Write-Output ("Build Number: " + $build_number)
-if (($build_environment -eq "GitHub") -or ($build_environment -eq "NuGet")) { Write-Output ("Nuget Package Version: " + $nuget_package_version) }
-Write-Output ("WDK VSIX Version: " + $vsix_version)
-Write-Output ("Samples: " + $sampleSet.Count)
-Write-Output ("Configurations: " + $Configurations.Count + " (" + $Configurations + ")")
-Write-Output ("Platforms: " + $Platforms.Count + " (" + $Platforms + ")")
+Write-Output "WDK Build Environment: $build_environment"
+Write-Output "WDK Build Number: $build_number"
+if (($build_environment -eq "GitHub") -or ($build_environment -eq "NuGet")) {
+Write-Output "WDK Nuget Version: $nuget_package_version"
+}
+Write-Output "WDK Extension Version: $wdk_extension_ver"
+Write-Output "Samples: $($sampleSet.Count)"
+Write-Output "Configurations: $($Configurations.Count) ($Configurations)"
+Write-Output "Platforms: $($Platforms.Count) ($Platforms)"
Write-Output "InfVerif_AdditionalOptions: $InfVerif_AdditionalOptions"
Write-Output "Combinations: $SolutionsTotal"
Write-Output "LogicalProcessors: $LogicalProcessors"
Write-Output "ThrottleFactor: $ThrottleFactor"
Write-Output "ThrottleLimit: $ThrottleLimit"
Write-Output "WDS_WipeOutputs: $env:WDS_WipeOutputs"
-Write-Output ("Disk Remaining (GB): " + (((Get-Volume ($DriveLetter = (Get-Item ".").PSDrive.Name)).SizeRemaining / 1GB)))
+Write-Output "Disk Remaining (GB): $(((Get-Volume ((Get-Item ".").PSDrive.Name)).SizeRemaining) / 1GB)"
Write-Output ""
Write-Output "T: Combinations"
Write-Output "B: Built"