diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 0252079..8445297 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -329,6 +329,16 @@ jobs: with: workspaces: host -> target + - name: Ensure surrogate build consistency + shell: pwsh + run: | + $hlsExe = "host\target\release\build\hyperlight-host-*\out\..\..\hls\x86_64-pc-windows-msvc\release\hyperlight_surrogate.exe" + if (-not (Resolve-Path $hlsExe -ErrorAction SilentlyContinue)) { + Write-Host "Surrogate missing — clearing hyperlight-host fingerprints to force rebuild" + Get-ChildItem "host\target\release\.fingerprint" -Filter "hyperlight-host-*" -Directory -ErrorAction SilentlyContinue | + Remove-Item -Recurse -Force + } + - name: Install pyhl shell: pwsh run: | @@ -516,7 +526,7 @@ jobs: comment-always: true alert-threshold: '130%' - all-checks-passed: + benchmarks-passed: if: always() needs: [build-image, bench-linux, bench-windows] runs-on: ubuntu-latest diff --git a/.github/workflows/host-checks.yml b/.github/workflows/host-checks.yml index 80f9aa8..38c17e9 100644 --- a/.github/workflows/host-checks.yml +++ b/.github/workflows/host-checks.yml @@ -78,7 +78,7 @@ jobs: RUST_BACKTRACE: '1' run: cargo test --all-targets --locked - all-checks-passed: + host-checks-passed: if: always() needs: [checks] runs-on: ubuntu-latest diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index ef921c1..6be68af 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -556,6 +556,16 @@ jobs: with: workspaces: host -> target + - name: Ensure surrogate build consistency + shell: pwsh + run: | + $hlsExe = "host\target\release\build\hyperlight-host-*\out\..\..\hls\x86_64-pc-windows-msvc\release\hyperlight_surrogate.exe" + if (-not (Resolve-Path $hlsExe -ErrorAction SilentlyContinue)) { + Write-Host "Surrogate missing — clearing hyperlight-host fingerprints to force rebuild" + Get-ChildItem "host\target\release\.fingerprint" -Filter "hyperlight-host-*" -Directory -ErrorAction SilentlyContinue | + Remove-Item -Recurse -Force + } + - name: Build host binaries shell: pwsh run: | @@ -662,6 +672,17 @@ jobs: with: workspaces: host -> target + - name: Ensure surrogate build consistency (Windows only) + if: runner.os == 'Windows' + shell: pwsh + run: | + $hlsExe = "host\target\release\build\hyperlight-host-*\out\..\..\hls\x86_64-pc-windows-msvc\release\hyperlight_surrogate.exe" + if (-not (Resolve-Path $hlsExe -ErrorAction SilentlyContinue)) { + Write-Host "Surrogate missing — clearing hyperlight-host fingerprints to force rebuild" + Get-ChildItem "host\target\release\.fingerprint" -Filter "hyperlight-host-*" -Directory -ErrorAction SilentlyContinue | + Remove-Item -Recurse -Force + } + # Linux needs /dev/kvm access to run the guest. - name: Enable KVM permissions (Linux only) if: runner.os == 'Linux' @@ -683,12 +704,20 @@ jobs: echo "::warning::/dev/kvm is not available; pyhl test skipped" fi - - name: Install pyhl + - name: Install pyhl (Linux) + if: runner.os == 'Linux' + run: | + cd host + cargo build --release --bin pyhl + sudo cp target/release/pyhl /usr/local/bin/ + + - name: Install pyhl (Windows) + if: runner.os == 'Windows' shell: pwsh run: | cd host cargo build --release --bin pyhl - Copy-Item target/release/pyhl* $env:USERPROFILE/.cargo/bin/ -Force + Copy-Item target\release\pyhl.exe $env:USERPROFILE\.cargo\bin\ -Force - name: Download prebuilt python-agent-driver image uses: actions/download-artifact@v4 @@ -768,7 +797,7 @@ jobs: exit 1 } - all-checks-passed: + test-examples-passed: if: always() needs: [build-example, runtime-test, package-images-for-windows, runtime-test-windows, pyhl-snapshot-test] runs-on: ubuntu-latest