From 33ea391a917d97e2f8a97936b110cdca9734ccf5 Mon Sep 17 00:00:00 2001 From: Mike Rodriguez Date: Mon, 14 Jul 2025 16:49:47 -0700 Subject: [PATCH] Delete .github/workflows/build-and-sign-all.yml --- .github/workflows/build-and-sign-all.yml | 340 ----------------------- 1 file changed, 340 deletions(-) delete mode 100644 .github/workflows/build-and-sign-all.yml diff --git a/.github/workflows/build-and-sign-all.yml b/.github/workflows/build-and-sign-all.yml deleted file mode 100644 index a222761..0000000 --- a/.github/workflows/build-and-sign-all.yml +++ /dev/null @@ -1,340 +0,0 @@ -name: Build and Sign Virtual Drivers and Control Panel - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - workflow_dispatch: - schedule: - - cron: '0 2 * * 0' # Weekly builds - -env: - BUILD_CONFIGURATION: Release - -jobs: - build-all-components: - runs-on: windows-latest - strategy: - matrix: - platform: [x64, ARM64] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - # Setup build environment - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1 - - - name: Install Visual Studio 2022 dependencies - run: | - choco install visualstudio2022-workload-manageddesktop -y - if ($LASTEXITCODE -ne 0) { exit 1 } - - choco install visualstudio2022-workload-nativedesktop -y - if ($LASTEXITCODE -ne 0) { exit 1 } - - choco install visualstudio2022-workload-vctools -y - if ($LASTEXITCODE -ne 0) { exit 1 } - - choco install windowsdriverkit11 -y - if ($LASTEXITCODE -ne 0) { exit 1 } - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '6.0.x' - - # Build Virtual Display Driver - - name: Build Virtual Display Driver - run: | - Write-Output "Building Virtual Display Driver (HDR) for ${{ matrix.platform }}..." - $vddSln = "Virtual Display Driver (HDR)/MTTVDD.sln" - if (Test-Path $vddSln) { - Write-Output "Found VDD solution: $vddSln" - Write-Output "Running MSBuild..." - msbuild $vddSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=${{ matrix.platform }} /verbosity:minimal - if ($LASTEXITCODE -eq 0) { - Write-Output "✅ VDD build completed successfully for ${{ matrix.platform }}" - } else { - Write-Output "❌ VDD build failed with exit code: $LASTEXITCODE" - } - - # List build directory - $buildDir = "Virtual Display Driver (HDR)\${{ matrix.platform }}\$env:BUILD_CONFIGURATION\MttVDD" - if (Test-Path $buildDir) { - Write-Output "VDD Build outputs in ${buildDir}:" - Get-ChildItem $buildDir | ForEach-Object { Write-Output " - $($_.Name)" } - } else { - Write-Output "❌ Build directory not found: ${buildDir}" - } - } else { - Write-Output "❌ VDD solution file not found at: $vddSln" - Write-Output "Directory contents:" - Get-ChildItem -Path "Virtual Display Driver (HDR)" | ForEach-Object { Write-Output " - $($_.Name)" } - } - - # Build Virtual Audio Driver - - name: Build Virtual Audio Driver - run: | - Write-Output "Building Virtual Audio Driver for ${{ matrix.platform }}..." - $vadSln = "Virtual-Audio-Driver (Latest Stable)/VirtualAudioDriver.sln" - if (Test-Path $vadSln) { - Write-Output "Found VAD solution: $vadSln" - Write-Output "Running MSBuild..." - msbuild $vadSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=${{ matrix.platform }} /verbosity:minimal - if ($LASTEXITCODE -eq 0) { - Write-Output "✅ VAD build completed successfully for ${{ matrix.platform }}" - } else { - Write-Output "❌ VAD build failed with exit code: $LASTEXITCODE" - } - - # List build outputs (search for standard driver output locations) - Write-Output "Searching for VAD build outputs..." - Get-ChildItem -Path "Virtual-Audio-Driver (Latest Stable)" -Recurse -Include "*.sys", "*.inf", "*.cat", "*.dll" -ErrorAction SilentlyContinue | ForEach-Object { - Write-Output " - $($_.FullName)" - } - } else { - Write-Output "❌ VAD solution file not found at: $vadSln" - Write-Output "Directory contents:" - Get-ChildItem -Path "Virtual-Audio-Driver (Latest Stable)" | ForEach-Object { Write-Output " - $($_.Name)" } - } - continue-on-error: true - - # Build Control Panel (handles both same repo and separate repo scenarios) - - name: Checkout Control Panel Repository - if: github.repository != 'VirtualDrivers/Virtual-Driver-Control' - uses: actions/checkout@v4 - with: - repository: 'VirtualDrivers/Virtual-Driver-Control' - path: 'control-panel-repo' - token: ${{ secrets.GITHUB_TOKEN }} - continue-on-error: true - - - name: Build Control Panel - run: | - $controlPanelPath = "" - - # Check if control panel is in current repo - if (Test-Path "VDD Control/VDD Control.sln") { - $controlPanelPath = "VDD Control/VDD Control.sln" - $projectPath = "VDD Control/VDD Control/VDD Control.csproj" - Write-Output "Found control panel in current repository" - } - # Check if control panel was checked out separately - elseif (Test-Path "control-panel-repo/VDD Control/VDD Control.sln") { - $controlPanelPath = "control-panel-repo/VDD Control/VDD Control.sln" - $projectPath = "control-panel-repo/VDD Control/VDD Control/VDD Control.csproj" - Write-Output "Found control panel in separate repository" - } - - if ($controlPanelPath -ne "") { - Write-Output "Building Control Panel..." - dotnet restore $controlPanelPath - dotnet build $controlPanelPath --configuration $env:BUILD_CONFIGURATION --no-restore - dotnet publish $projectPath --configuration $env:BUILD_CONFIGURATION --output ./control-panel-publish --no-build - Write-Output "Control Panel build completed" - } else { - Write-Output "Control Panel solution file not found, skipping..." - } - continue-on-error: true - - # Create unified package for signing - - name: Package all components for signing - id: package_components - run: | - Write-Output "Creating unified package for signing..." - $packageDir = "unified-driver-package" - $zipFile = "${packageDir}-${{ matrix.platform }}.zip" - - # Create standardized package directory structure - New-Item -ItemType Directory -Path $packageDir -Force - $vddPackageDir = "$packageDir\VDD" - $vadPackageDir = "$packageDir\VAD" - $controlPackageDir = "$packageDir\ControlPanel" - New-Item -ItemType Directory -Path $vddPackageDir -Force - New-Item -ItemType Directory -Path $vadPackageDir -Force - New-Item -ItemType Directory -Path $controlPackageDir -Force - - # Copy VDD files with standardized structure - $vddDir = "Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\MttVDD" - if (Test-Path $vddDir) { - Write-Output "Copying VDD files from: $vddDir" - Copy-Item "$vddDir\*" -Destination $vddPackageDir -Force - $vddFiles = Get-ChildItem $vddPackageDir - Write-Output "VDD files in package:" - foreach ($file in $vddFiles) { - Write-Output " - $($file.Name)" - } - } else { - Write-Output "Warning: VDD build directory not found at: $vddDir" - Write-Output "Searching for alternative VDD locations..." - $altVddDirs = Get-ChildItem -Path "Virtual Display Driver (HDR)" -Recurse -Directory -Name "*MttVDD*" -ErrorAction SilentlyContinue - foreach ($dir in $altVddDirs) { - Write-Output " Found: Virtual Display Driver (HDR)\$dir" - } - } - - # Copy VAD files with consistent structure regardless of platform - Write-Output "Searching for VAD files..." - $vadBaseDir = "Virtual-Audio-Driver (Latest Stable)" - - # Look for platform-specific VAD files first - $vadPlatformDirs = @( - "$vadBaseDir\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}", - "$vadBaseDir\${{ matrix.platform }}\Release", - "$vadBaseDir\${{ matrix.platform }}" - ) - - $vadFound = $false - foreach ($vadDir in $vadPlatformDirs) { - if (Test-Path $vadDir) { - Write-Output "Found VAD platform directory: $vadDir" - $vadFiles = Get-ChildItem -Path $vadDir -Recurse -Include "*.sys", "*.inf", "*.cat", "*.dll" -ErrorAction SilentlyContinue - if ($vadFiles.Count -gt 0) { - foreach ($file in $vadFiles) { - Copy-Item $file.FullName -Destination $vadPackageDir -Force - Write-Output "Copied VAD file: $($file.Name)" - } - $vadFound = $true - break - } - } - } - - # If no platform-specific files found, search globally - if (-not $vadFound) { - Write-Output "No platform-specific VAD files found, searching globally..." - $vadFiles = Get-ChildItem -Path $vadBaseDir -Recurse -Include "*.sys", "*.inf", "*.cat", "*.dll" -ErrorAction SilentlyContinue - if ($vadFiles.Count -gt 0) { - foreach ($file in $vadFiles) { - Copy-Item $file.FullName -Destination $vadPackageDir -Force - Write-Output "Copied VAD file: $($file.Name)" - } - $vadFound = $true - } - } - - if (-not $vadFound) { - Write-Output "Warning: No VAD files found for ${{ matrix.platform }}" - } - - # Copy Control Panel files (platform-independent) - if (Test-Path "control-panel-publish") { - Write-Output "Copying Control Panel files..." - Copy-Item "control-panel-publish\*" -Destination $controlPackageDir -Recurse -Force - $controlFiles = Get-ChildItem $controlPackageDir - Write-Output "Control Panel files in package:" - foreach ($file in $controlFiles) { - Write-Output " - $($file.Name)" - } - } else { - Write-Output "Warning: Control Panel build not found" - } - - # Create standardized folder structure summary - Write-Output "" - Write-Output "=== Final Package Structure ===" - Write-Output "Package directory: $packageDir" - if (Test-Path "$packageDir\VDD") { - Write-Output "VDD folder contents:" - Get-ChildItem "$packageDir\VDD" | ForEach-Object { Write-Output " VDD\$($_.Name)" } - } - if (Test-Path "$packageDir\VAD") { - Write-Output "VAD folder contents:" - Get-ChildItem "$packageDir\VAD" | ForEach-Object { Write-Output " VAD\$($_.Name)" } - } - if (Test-Path "$packageDir\ControlPanel") { - Write-Output "ControlPanel folder contents:" - Get-ChildItem "$packageDir\ControlPanel" | ForEach-Object { Write-Output " ControlPanel\$($_.Name)" } - } - - # Create ZIP file - Write-Output "" - Write-Output "Creating ZIP file: $zipFile" - Compress-Archive -Path $packageDir -DestinationPath $zipFile -Force - - # Verify ZIP contents - if (Test-Path $zipFile) { - $zipSize = (Get-Item $zipFile).Length - Write-Output "✅ Package created successfully: $zipFile (${zipSize} bytes)" - Write-Output "PACKAGE_PATH=$zipFile" >> $env:GITHUB_ENV - Write-Output "PACKAGE_NAME=$packageDir" >> $env:GITHUB_ENV - } else { - Write-Output "❌ Failed to create package" - exit 1 - } - continue-on-error: false - - # Upload unified package - - name: Upload unified package - id: upload_unified_package - uses: actions/upload-artifact@v4 - with: - name: Unified-Driver-Package-${{ env.BUILD_CONFIGURATION }}-${{ matrix.platform }} - path: ${{ env.PACKAGE_PATH }} - continue-on-error: false - # Generate release tag - - name: Generate release tag - id: generate_tag - run: | - $releaseTag = (Get-Date).ToString('yy.MM.dd') - Write-Output "Generated release tag: $releaseTag" - echo "RELEASE_TAG=$releaseTag" >> $env:GITHUB_ENV - - # Submit unified package to SignPath (only for main branch and tags) - - name: Submit unified package to SignPath for signing - if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && steps.upload_unified_package.outputs.artifact-id != '' - id: signpath_unified_request - uses: signpath/github-action-submit-signing-request@v1 - with: - api-token: '${{ secrets.SIGNPATH_API_TOKEN }}' - organization-id: '${{ vars.SIGNPATH_ORG_ID }}' - project-slug: '${{ vars.SIGNPATH_PROJECT_SLUG }}' - signing-policy-slug: '${{ vars.SIGNPATH_POLICY_SLUG }}' - github-artifact-id: '${{ steps.upload_unified_package.outputs.artifact-id }}' - wait-for-completion: true - output-artifact-directory: '${{ vars.SIGNPATH_OUTPUT_DIR }}' - parameters: | - Version: ${{ toJSON(env.BUILD_CONFIGURATION) }} - Release_Tag: "${{ env.RELEASE_TAG }}" - Platform: "${{ matrix.platform }}" - continue-on-error: true - - # Upload signed unified package - - name: Upload signed unified package - if: steps.signpath_unified_request.outcome == 'success' - uses: actions/upload-artifact@v4 - with: - name: Signed-Unified-Package-${{ env.BUILD_CONFIGURATION }}-${{ matrix.platform }} - path: '${{ vars.SIGNPATH_OUTPUT_DIR }}\*' - continue-on-error: true - - # Build Summary - - name: Build and SignPath Summary - if: always() - run: | - Write-Output "=== Virtual Drivers Build & Sign Summary ===" - Write-Output "Configuration: $env:BUILD_CONFIGURATION" - Write-Output "Platform: ${{ matrix.platform }}" - Write-Output "Release Tag: ${{ env.RELEASE_TAG }}" - Write-Output "Commit: ${{ github.sha }}" - Write-Output "Branch/Tag: ${{ github.ref }}" - Write-Output "" - Write-Output "This workflow successfully:" - Write-Output "✅ Built Virtual Display Driver (VDD) with proper Windows Driver Kit dependencies" - Write-Output "✅ Built Virtual Audio Driver (VAD) for ${{ matrix.platform }} architecture" - Write-Output "✅ Built Control Panel application" - Write-Output "✅ Created unified package containing all components" - Write-Output "✅ Uploaded unified package to GitHub Actions" - Write-Output "✅ Submitted unified package to SignPath for code signing with origin verification" - Write-Output "✅ Generated automatic release tags for version tracking" - Write-Output "✅ Supports both x64 and ARM64 architectures via matrix builds" - Write-Output "" - Write-Output "SignPath Integration Status:" - if ('${{ steps.signpath_unified_request.outcome }}' -eq 'success') { - Write-Output "✅ Unified package submitted and signed successfully" - } else { - Write-Output "❌ Unified package signing failed or skipped" - }