Skip to content

YML Additions

YML Additions #1

Workflow file for this run

name: Fast CI Validation
on:
pull_request:
branches: [ main, master ]
push:
branches: [ main, master ]
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE*'
env:
BUILD_CONFIGURATION: Release
jobs:
# Quick validation - runs for all PRs and pushes
validate:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
# Quick compilation check for VDD
- name: Quick VDD Compilation Check
run: |
Write-Output "Performing quick VDD compilation check..."
$vddSln = "Virtual Display Driver (HDR)/MTTVDD.sln"
if (Test-Path $vddSln) {
Write-Output "Building VDD for syntax/compilation validation..."
msbuild $vddSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=x64 /verbosity:minimal /target:Build
if ($LASTEXITCODE -eq 0) {
Write-Output "✅ VDD compilation check passed"
} else {
Write-Output "❌ VDD compilation check failed"
exit 1
}
} else {
Write-Output "❌ VDD solution file not found"
exit 1
}
# Quick compilation check for VAD
- name: Quick VAD Compilation Check
run: |
Write-Output "Performing quick VAD compilation check..."
$vadSln = "Virtual-Audio-Driver (Latest Stable)/VirtualAudioDriver.sln"
if (Test-Path $vadSln) {
Write-Output "Building VAD for syntax/compilation validation..."
msbuild $vadSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=x64 /verbosity:minimal /target:Build
if ($LASTEXITCODE -eq 0) {
Write-Output "✅ VAD compilation check passed"
} else {
Write-Output "❌ VAD compilation check failed"
exit 1
}
} else {
Write-Output "❌ VAD solution file not found"
exit 1
}
# Checkout and validate Control App
- name: Checkout Virtual Driver Control Repository
uses: actions/checkout@v4
with:
repository: 'VirtualDrivers/Virtual-Driver-Control'
path: 'control-app-repo'
token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
- name: Control App Dependencies and Lint Check
run: |
$controlAppPath = ""
if (Test-Path "control-app-repo/VirtualDriverControl/package.json") {
$controlAppPath = "control-app-repo/VirtualDriverControl"
Write-Output "Found control app in separate repository"
}
if ($controlAppPath -ne "") {
Write-Output "Validating Control App dependencies and syntax..."
Push-Location $controlAppPath
# Install dependencies (fast check)
Write-Output "Installing npm dependencies..."
npm ci
# Run linting if available
$packageJson = Get-Content "package.json" | ConvertFrom-Json
if ($packageJson.scripts.lint) {
Write-Output "Running lint checks..."
npm run lint
} else {
Write-Output "No lint script found, skipping lint check"
}
# Basic syntax check - try to require main files
if (Test-Path "main.js") {
Write-Output "✅ Main files exist and are readable"
}
Pop-Location
Write-Output "✅ Control App validation completed"
} else {
Write-Output "⚠️ Control App not found - skipping validation"
}
# Validation Summary
- name: CI Validation Summary
if: always()
run: |
Write-Output "=== Fast CI Validation Summary ==="
Write-Output "Configuration: $env:BUILD_CONFIGURATION"
Write-Output "Event: ${{ github.event_name }}"
Write-Output "Branch: ${{ github.ref }}"
Write-Output "Commit: ${{ github.sha }}"
Write-Output ""
Write-Output "This validation workflow checks:"
Write-Output "✅ VDD compilation syntax and dependencies"
Write-Output "✅ VAD compilation syntax and dependencies"
Write-Output "✅ Control App dependencies and linting"
Write-Output "✅ Basic project structure validation"
Write-Output ""
Write-Output "⚡ Fast feedback in ~3-5 minutes vs full build ~30-45 minutes"
Write-Output "💰 Saves compute resources for quick validation"
Write-Output "🚀 Enables rapid iteration on pull requests"