Skip to content

Commit 294b035

Browse files
committed
ci: fix Windows surrogate build consistency with rust-cache
When Swatinem/rust-cache restores cached fingerprints but not the surrogate exe, Cargo skips the build script and RustEmbed fails. Clear hyperlight-host fingerprints when the surrogate is missing so the build script re-runs. Signed-off-by: danbugs <danilochiarlone@gmail.com>
1 parent 3725644 commit 294b035

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/benchmarks.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,16 @@ jobs:
329329
with:
330330
workspaces: host -> target
331331

332+
- name: Ensure surrogate build consistency
333+
shell: pwsh
334+
run: |
335+
$hlsExe = "host\target\release\build\hyperlight-host-*\out\..\..\hls\x86_64-pc-windows-msvc\release\hyperlight_surrogate.exe"
336+
if (-not (Resolve-Path $hlsExe -ErrorAction SilentlyContinue)) {
337+
Write-Host "Surrogate missing — clearing hyperlight-host fingerprints to force rebuild"
338+
Get-ChildItem "host\target\release\.fingerprint" -Filter "hyperlight-host-*" -Directory -ErrorAction SilentlyContinue |
339+
Remove-Item -Recurse -Force
340+
}
341+
332342
- name: Install pyhl
333343
shell: pwsh
334344
run: |

.github/workflows/test-examples.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,16 @@ jobs:
556556
with:
557557
workspaces: host -> target
558558

559+
- name: Ensure surrogate build consistency
560+
shell: pwsh
561+
run: |
562+
$hlsExe = "host\target\release\build\hyperlight-host-*\out\..\..\hls\x86_64-pc-windows-msvc\release\hyperlight_surrogate.exe"
563+
if (-not (Resolve-Path $hlsExe -ErrorAction SilentlyContinue)) {
564+
Write-Host "Surrogate missing — clearing hyperlight-host fingerprints to force rebuild"
565+
Get-ChildItem "host\target\release\.fingerprint" -Filter "hyperlight-host-*" -Directory -ErrorAction SilentlyContinue |
566+
Remove-Item -Recurse -Force
567+
}
568+
559569
- name: Build host binaries
560570
shell: pwsh
561571
run: |

0 commit comments

Comments
 (0)