Skip to content

Remove legacy build workflows and update CI #13

Remove legacy build workflows and update CI

Remove legacy build workflows and update CI #13

Workflow file for this run

name: Build Virtual Display Driver
on:
pull_request:
branches: [ main, master ]
push:
branches: [ main, master ]
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE*'
workflow_dispatch:
env:
BUILD_CONFIGURATION: Release
VDD_SOLUTION: Virtual Display Driver (HDR)/MttVDD.sln
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
platform: [x64, ARM64]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Install Windows Driver Kit (IddCx headers)
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
choco install windowsdriverkit11 -y --no-progress
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Detect Windows SDK (windows.h)
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$kitsRoot = $null
try {
$kitsRoot = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots" -Name "KitsRoot10" -ErrorAction Stop).KitsRoot10
} catch {
$kitsRoot = Join-Path ${env:ProgramFiles(x86)} "Windows Kits\10\"
}
if (-not $kitsRoot -or -not (Test-Path $kitsRoot)) {
throw "Windows Kits root not found: $kitsRoot"
}
$includeRoot = Join-Path $kitsRoot "Include"
if (-not (Test-Path $includeRoot)) {
throw "Windows Kits Include directory not found: $includeRoot"
}
$best =
Get-ChildItem -Path $includeRoot -Directory -ErrorAction SilentlyContinue |
Where-Object { $_.Name -match '^\d+\.\d+\.\d+\.\d+$' } |
Where-Object { Test-Path (Join-Path $_.FullName "um\Windows.h") } |
Sort-Object -Property Name -Descending |
Select-Object -First 1
if (-not $best) {
throw "Could not find an SDK version directory containing um\\Windows.h under: $includeRoot"
}
$sdkVersion = $best.Name
Write-Output "Using WindowsSdkDir: $kitsRoot"
Write-Output "Using WindowsTargetPlatformVersion: $sdkVersion"
"WINDOWS_SDK_DIR=$kitsRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"WINDOWS_TARGET_PLATFORM_VERSION=$sdkVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Build VDD (${{ matrix.platform }})
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$sln = "${{ env.VDD_SOLUTION }}"
if (-not (Test-Path $sln)) { throw "VDD solution file not found at: $sln" }
msbuild $sln `
/m `
/t:Build `
/p:Configuration="${{ env.BUILD_CONFIGURATION }}" `
/p:Platform="${{ matrix.platform }}" `
/p:WindowsSdkDir="$env:WINDOWS_SDK_DIR" `
/p:WindowsTargetPlatformVersion="$env:WINDOWS_TARGET_PLATFORM_VERSION" `
/verbosity:minimal
- name: Collect outputs
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$outDir = "Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\MttVDD"
if (-not (Test-Path $outDir)) { throw "Build output directory not found: $outDir" }
$dest = "artifacts\VDD\${{ matrix.platform }}"
New-Item -ItemType Directory -Path $dest -Force | Out-Null
Copy-Item "$outDir\*" -Destination $dest -Recurse -Force
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: VDD-${{ matrix.platform }}-${{ env.BUILD_CONFIGURATION }}
path: artifacts/VDD/${{ matrix.platform }}/
if-no-files-found: error