diff --git a/.github/workflows/ValidatePullRequest.yml b/.github/workflows/ValidatePullRequest.yml index 278bf1dca..048cafdd6 100644 --- a/.github/workflows/ValidatePullRequest.yml +++ b/.github/workflows/ValidatePullRequest.yml @@ -89,17 +89,15 @@ jobs: # See: https://github.com/actions/runner/issues/2205 if: ${{ !cancelled() && !failure() }} strategy: - fail-fast: true + fail-fast: false matrix: - hypervisor: [hyperv, 'hyperv-ws2025', mshv3, kvm] - cpu: [amd, intel] + pool: ['hld-win2022-intel', 'hld-win2025-intel', 'windows-2025-test-intel'] config: [debug, release] uses: ./.github/workflows/dep_build_test.yml secrets: inherit with: docs_only: ${{ needs.docs-pr.outputs.docs-only }} - hypervisor: ${{ matrix.hypervisor }} - cpu: ${{ matrix.cpu }} + pool: ${{ matrix.pool }} config: ${{ matrix.config }} # Run examples - needs guest artifacts, runs in parallel with build-test @@ -112,19 +110,36 @@ jobs: # See: https://github.com/actions/runner/issues/2205 if: ${{ !cancelled() && !failure() }} strategy: - fail-fast: true + fail-fast: false matrix: - hypervisor: [hyperv, 'hyperv-ws2025', mshv3, kvm] - cpu: [amd, intel] + pool: ['hld-win2022-intel', 'hld-win2025-intel', 'windows-2025-test-intel'] config: [debug, release] uses: ./.github/workflows/dep_run_examples.yml secrets: inherit with: docs_only: ${{ needs.docs-pr.outputs.docs-only }} - hypervisor: ${{ matrix.hypervisor }} - cpu: ${{ matrix.cpu }} + pool: ${{ matrix.pool }} config: ${{ matrix.config }} + # Run benchmarks on existing and new win2025 pools to compare + benchmarks: + needs: + - docs-pr + - build-guests + if: ${{ !cancelled() && !failure() }} + strategy: + fail-fast: false + matrix: + pool: ['hld-win2022-intel', 'hld-win2025-intel', 'windows-2025-test-intel'] + uses: ./.github/workflows/dep_benchmarks.yml + secrets: inherit + with: + docs_only: ${{ needs.docs-pr.outputs.docs-only }} + hypervisor: hyperv-ws2025 + cpu: intel + pool: ${{ matrix.pool }} + retention_days: 5 + fuzzing: needs: - docs-pr @@ -166,6 +181,7 @@ jobs: - code-checks - build-test - run-examples + - benchmarks - fuzzing - spelling - license-headers diff --git a/.github/workflows/dep_benchmarks.yml b/.github/workflows/dep_benchmarks.yml index 2579c7dae..4271dc563 100644 --- a/.github/workflows/dep_benchmarks.yml +++ b/.github/workflows/dep_benchmarks.yml @@ -56,6 +56,11 @@ on: required: false type: number default: 5 + pool: + description: Override 1ES pool name (bypasses hypervisor/cpu pool logic) + required: false + type: string + default: "" env: CARGO_TERM_COLOR: always @@ -72,7 +77,7 @@ jobs: run-benchmarks: if: ${{ inputs.docs_only == 'false' }} timeout-minutes: 30 - runs-on: ${{ fromJson( + runs-on: ${{ inputs.pool != '' && fromJson(format('["self-hosted", "1ES.Pool={0}"]', inputs.pool)) || fromJson( format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}"]', (inputs.hypervisor == 'hyperv' || inputs.hypervisor == 'hyperv-ws2025') && 'Windows' || 'Linux', inputs.hypervisor == 'hyperv' && 'win2022' || inputs.hypervisor == 'hyperv-ws2025' && 'win2025' || inputs.hypervisor == 'mshv3' && 'azlinux3-mshv' || inputs.hypervisor, @@ -134,7 +139,7 @@ jobs: - uses: actions/upload-artifact@v7 with: - name: benchmarks_${{ runner.os }}_${{ inputs.hypervisor }}_${{ inputs.cpu }} + name: benchmarks_${{ runner.os }}_${{ inputs.pool != '' && inputs.pool || format('{0}_{1}', inputs.hypervisor, inputs.cpu) }} path: ./target/criterion/ if-no-files-found: error retention-days: ${{ inputs.retention_days }} diff --git a/.github/workflows/dep_build_test.yml b/.github/workflows/dep_build_test.yml index 0c72baa66..680a9d537 100644 --- a/.github/workflows/dep_build_test.yml +++ b/.github/workflows/dep_build_test.yml @@ -10,18 +10,14 @@ on: required: false type: string default: "false" - hypervisor: - description: Hypervisor for this run (passed from caller matrix) + pool: + description: 1ES pool name for this run required: true type: string config: description: Build configuration for this run (passed from caller matrix) required: true type: string - cpu: - description: CPU architecture for the build (passed from caller matrix) - required: true - type: string env: CARGO_TERM_COLOR: always @@ -38,14 +34,28 @@ jobs: build-and-test: if: ${{ inputs.docs_only == 'false' }} timeout-minutes: 45 - runs-on: ${{ fromJson( - format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}"]', - (inputs.hypervisor == 'hyperv' || inputs.hypervisor == 'hyperv-ws2025') && 'Windows' || 'Linux', - inputs.hypervisor == 'hyperv' && 'win2022' || inputs.hypervisor == 'hyperv-ws2025' && 'win2025' || inputs.hypervisor == 'mshv3' && 'azlinux3-mshv' || inputs.hypervisor, - inputs.cpu)) }} + runs-on: ["self-hosted", "Windows", "X64", "1ES.Pool=${{ inputs.pool }}"] steps: - uses: actions/checkout@v6 + - name: Diagnose Hyper-V status + if: runner.os == 'Windows' + shell: powershell + run: | + Write-Host "=== Windows Version ===" + cmd /c ver + Write-Host "`n=== Hyper-V Features ===" + Get-WindowsOptionalFeature -Online | Where-Object {$_.FeatureName -match 'Hyper-V|HypervisorPlatform|VirtualMachinePlatform'} | Format-Table + Write-Host "`n=== Hyper-V Services ===" + Get-Service -Name vmcompute,vmms -ErrorAction SilentlyContinue | Format-Table Name,Status,StartType + Write-Host "`n=== WHP API Check ===" + $whpDll = "$env:SystemRoot\System32\WinHvPlatform.dll" + if (Test-Path $whpDll) { Write-Host "WinHvPlatform.dll found: $((Get-Item $whpDll).VersionInfo.FileVersion)" } else { Write-Host "WinHvPlatform.dll NOT FOUND" } + Write-Host "`n=== Hypervisor Present (firmware) ===" + (Get-WmiObject Win32_ComputerSystem).HypervisorPresent + Write-Host "`n=== BCDEdit hypervisor launch type ===" + bcdedit /enum '{current}' | Select-String -Pattern 'hypervisor' + - uses: hyperlight-dev/ci-setup-workflow@v1.8.0 with: rust-toolchain: "1.89" @@ -103,7 +113,7 @@ jobs: if: runner.os == 'Linux' run: | # with only one driver enabled (kvm/mshv3 features are unix-only, no-op on Windows) - just test ${{ inputs.config }} ${{ inputs.hypervisor == 'mshv3' && 'mshv3' || 'kvm' }} + just test ${{ inputs.config }} - name: Run Rust Gdb tests env: diff --git a/.github/workflows/dep_run_examples.yml b/.github/workflows/dep_run_examples.yml index 9645d8b8e..6c8049c2e 100644 --- a/.github/workflows/dep_run_examples.yml +++ b/.github/workflows/dep_run_examples.yml @@ -10,18 +10,14 @@ on: required: false type: string default: "false" - hypervisor: - description: Hypervisor for this run (passed from caller matrix) + pool: + description: 1ES pool name for this run required: true type: string config: description: Build configuration for this run (passed from caller matrix) required: true type: string - cpu: - description: CPU architecture for the build (passed from caller matrix) - required: true - type: string env: CARGO_TERM_COLOR: always @@ -38,14 +34,28 @@ jobs: run-examples: if: ${{ inputs.docs_only == 'false' }} timeout-minutes: 15 - runs-on: ${{ fromJson( - format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}"]', - (inputs.hypervisor == 'hyperv' || inputs.hypervisor == 'hyperv-ws2025') && 'Windows' || 'Linux', - inputs.hypervisor == 'hyperv' && 'win2022' || inputs.hypervisor == 'hyperv-ws2025' && 'win2025' || inputs.hypervisor == 'mshv3' && 'azlinux3-mshv' || inputs.hypervisor, - inputs.cpu)) }} + runs-on: ["self-hosted", "Windows", "X64", "1ES.Pool=${{ inputs.pool }}"] steps: - uses: actions/checkout@v6 + - name: Diagnose Hyper-V status + if: runner.os == 'Windows' + shell: powershell + run: | + Write-Host "=== Windows Version ===" + cmd /c ver + Write-Host "`n=== Hyper-V Features ===" + Get-WindowsOptionalFeature -Online | Where-Object {$_.FeatureName -match 'Hyper-V|HypervisorPlatform|VirtualMachinePlatform'} | Format-Table + Write-Host "`n=== Hyper-V Services ===" + Get-Service -Name vmcompute,vmms -ErrorAction SilentlyContinue | Format-Table Name,Status,StartType + Write-Host "`n=== WHP API Check ===" + $whpDll = "$env:SystemRoot\System32\WinHvPlatform.dll" + if (Test-Path $whpDll) { Write-Host "WinHvPlatform.dll found: $((Get-Item $whpDll).VersionInfo.FileVersion)" } else { Write-Host "WinHvPlatform.dll NOT FOUND" } + Write-Host "`n=== Hypervisor Present (firmware) ===" + (Get-WmiObject Win32_ComputerSystem).HypervisorPresent + Write-Host "`n=== BCDEdit hypervisor launch type ===" + bcdedit /enum '{current}' | Select-String -Pattern 'hypervisor' + - uses: hyperlight-dev/ci-setup-workflow@v1.8.0 with: rust-toolchain: "1.89"