@@ -27,102 +27,6 @@ jobs:
2727 - name : Setup MSBuild
2828 uses : microsoft/setup-msbuild@v2
2929
30- - name : Ensure UMDF headers (wudfwdm.h) are available
31- shell : pwsh
32- run : |
33- $ErrorActionPreference = "Stop"
34-
35- function Get-KitsRoot10 {
36- try {
37- return (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots" -Name "KitsRoot10" -ErrorAction Stop).KitsRoot10
38- } catch {
39- return (Join-Path ${env:ProgramFiles(x86)} "Windows Kits\10\")
40- }
41- }
42-
43- function Find-UmdfHeader([string]$kitsRoot) {
44- $includeRoot = Join-Path $kitsRoot "Include"
45- if (-not (Test-Path $includeRoot)) { return $null }
46-
47- # Some runners lay WDK headers out as:
48- # Include\wdf\umdf\wudfwdm.h
49- # Others as:
50- # Include\<version>\wdf\umdf\wudfwdm.h
51- $flatHeader = Join-Path $includeRoot "wdf\umdf\wudfwdm.h"
52-
53- $versionDirs =
54- Get-ChildItem -Path $includeRoot -Directory -ErrorAction SilentlyContinue |
55- Where-Object { $_.Name -match '^\d+\.\d+\.\d+\.\d+$' } |
56- Sort-Object -Property Name -Descending
57-
58- $bestVersion = $versionDirs | Select-Object -First 1
59- $bestWithHeader =
60- $versionDirs |
61- Where-Object { Test-Path (Join-Path $_.FullName "wdf\umdf\wudfwdm.h") } |
62- Select-Object -First 1
63-
64- if (Test-Path $flatHeader) {
65- return [PSCustomObject]@{
66- WindowsSdkDir = $kitsRoot
67- WindowsTargetPlatformVersion = $bestVersion.Name
68- HeaderPath = $flatHeader
69- }
70- }
71-
72- if (-not $bestWithHeader) { return $null }
73-
74- return [PSCustomObject]@{
75- WindowsSdkDir = $kitsRoot
76- WindowsTargetPlatformVersion = $bestWithHeader.Name
77- HeaderPath = (Join-Path $bestWithHeader.FullName "wdf\umdf\wudfwdm.h")
78- }
79- }
80-
81- $kitsRoot = Get-KitsRoot10
82- Write-Output "KitsRoot10: $kitsRoot"
83-
84- $found = Find-UmdfHeader -kitsRoot $kitsRoot
85- if (-not $found) {
86- Write-Output "UMDF header not found; installing SDK + WDK via winget..."
87-
88- if (-not (Get-Command winget -ErrorAction SilentlyContinue)) {
89- throw "winget is not available on this runner, and UMDF headers are missing."
90- }
91-
92- winget --version
93-
94- $ids = @(
95- "Microsoft.WindowsSDK.10.0.26100",
96- "Microsoft.WindowsWDK.10.0.26100"
97- )
98-
99- foreach ($id in $ids) {
100- Write-Output "Installing $id ..."
101- winget install --source winget --exact --id $id --accept-package-agreements --accept-source-agreements --silent --disable-interactivity
102- if ($LASTEXITCODE -ne 0) {
103- throw "winget install failed for $id (exit code $LASTEXITCODE)"
104- }
105- }
106-
107- $found = Find-UmdfHeader -kitsRoot $kitsRoot
108- }
109-
110- if (-not $found) {
111- $includeRoot = Join-Path $kitsRoot "Include"
112- Write-Output "Still missing UMDF header. Include root contents:"
113- if (Test-Path $includeRoot) {
114- Get-ChildItem -Path $includeRoot -Directory -ErrorAction SilentlyContinue | ForEach-Object { Write-Output ("- " + $_.Name) }
115- }
116- throw "Could not find wdf\\umdf\\wudfwdm.h under: $includeRoot"
117- }
118-
119- Write-Output "Found UMDF header at: $($found.HeaderPath)"
120- Write-Output "Using WindowsTargetPlatformVersion: $($found.WindowsTargetPlatformVersion)"
121- Write-Output "Using WindowsSdkDir: $($found.WindowsSdkDir)"
122-
123- "WINDOWS_TARGET_PLATFORM_VERSION=$($found.WindowsTargetPlatformVersion)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
124- "WINDOWS_SDK_DIR=$($found.WindowsSdkDir)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
125-
12630 - name : Setup Node.js
12731 uses : actions/setup-node@v4
12832 with :
14044 Write-Output "Performing quick VDD compilation check..."
14145 $vddSln = "Virtual Display Driver (HDR)/MTTVDD.sln"
14246 if (-not (Test-Path $vddSln)) { throw "VDD solution file not found at: $vddSln" }
143- msbuild $vddSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=x64 /p:WindowsSdkDir=$env:WINDOWS_SDK_DIR /p:WindowsTargetPlatformVersion=$env:WINDOWS_TARGET_PLATFORM_VERSION / verbosity:minimal /target:Build
47+ msbuild $vddSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=x64 /verbosity:minimal /target:Build
14448
14549 - name : Quick VAD Compilation Check
14650 shell : pwsh
@@ -149,51 +53,5 @@ jobs:
14953 Write-Output "Performing quick VAD compilation check..."
15054 $vadSln = "Virtual-Audio-Driver (Latest Stable)/VirtualAudioDriver.sln"
15155 if (-not (Test-Path $vadSln)) { throw "VAD solution file not found at: $vadSln" }
152- msbuild $vadSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=x64 /p:WindowsSdkDir=$env:WINDOWS_SDK_DIR /p:WindowsTargetPlatformVersion=$env:WINDOWS_TARGET_PLATFORM_VERSION /verbosity:minimal /target:Build
153-
154- - name : Checkout Virtual Driver Control Repository
155- uses : actions/checkout@v4
156- with :
157- repository : ' VirtualDrivers/Virtual-Driver-Control'
158- path : ' control-app-repo'
159- token : ${{ secrets.GITHUB_TOKEN }}
160- continue-on-error : true
161-
162- - name : Control App Dependencies and Lint Check
163- shell : pwsh
164- run : |
165- $ErrorActionPreference = "Stop"
166- $controlAppPath = ""
167-
168- if (Test-Path "control-app-repo/VirtualDriverControl/package.json") {
169- $controlAppPath = "control-app-repo/VirtualDriverControl"
170- Write-Output "Found control app in separate repository"
171- }
172-
173- if ($controlAppPath -eq "") {
174- Write-Output "⚠️ Control App not found - skipping validation"
175- exit 0
176- }
177-
178- Push-Location $controlAppPath
179- npm ci
180-
181- $packageJson = Get-Content "package.json" | ConvertFrom-Json
182- if ($packageJson.scripts.lint) {
183- npm run lint
184- } else {
185- Write-Output "No lint script found, skipping lint check"
186- }
187-
188- Pop-Location
189-
190- - name : CI Validation Summary
191- if : always()
192- shell : pwsh
193- run : |
194- Write-Output "=== Fast CI Validation Summary ==="
195- Write-Output "Configuration: $env:BUILD_CONFIGURATION"
196- Write-Output "Event: ${{ github.event_name }}"
197- Write-Output "Branch: ${{ github.ref }}"
198- Write-Output "Commit: ${{ github.sha }}"
56+ msbuild $vadSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=x64 /verbosity:minimal /target:Build
19957
0 commit comments