Skip to content

Commit d85feca

Browse files
authored
really ensure that required version of cargo hyperlight is installed (#1535)
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent 1d5a9e3 commit d85feca

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Justfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ set dotenv-load := true
66
set-env-command := if os() == "windows" { "$env:" } else { "export " }
77
bin-suffix := if os() == "windows" { ".bat" } else { ".sh" }
88
nightly-toolchain := "nightly-2026-02-27"
9+
# Pinned cargo-hyperlight version used to build the guest sysroot. Keep this in
10+
# lockstep with the version pinned in flake.nix.
11+
cargo-hyperlight-version := "0.1.11"
912

1013
################
1114
### cross-rs ###
@@ -47,8 +50,14 @@ build target=default-target:
4750
# build testing guest binaries
4851
guests: build-and-move-rust-guests build-and-move-c-guests
4952

53+
# Ensure the pinned cargo-hyperlight is installed. We compare the *actual*
54+
# installed binary's reported version instead of relying on `cargo install`
55+
# alone: on persistent/self-hosted CI runners a stale binary can survive while
56+
# cargo's metadata still claims the pinned version is present, silently skipping
57+
# the upgrade (this is how the broken 0.1.5 `--build-plan` binary kept running).
58+
# When the version doesn't match we force a reinstall to the pinned version.
5059
ensure-cargo-hyperlight:
51-
cargo install --locked --version 0.1.11 cargo-hyperlight
60+
{{ if os() == "windows" { "if (-not ((cargo hyperlight --version 2>$null) -like '*" + cargo-hyperlight-version + "*')) { cargo install --locked --force --version " + cargo-hyperlight-version + " cargo-hyperlight }" } else { "cargo hyperlight --version 2>/dev/null | grep -qF '" + cargo-hyperlight-version + "' || cargo install --locked --force --version " + cargo-hyperlight-version + " cargo-hyperlight" } }}
5261

5362
witguest-wit:
5463
cargo install --locked wasm-tools

0 commit comments

Comments
 (0)