File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,25 +35,21 @@ jobs:
3535 steps :
3636 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3737
38- - name : Check guest toolchains match
39- run : |
40- python3 - <<'PY'
41- import tomllib
42-
43- def channel(path):
44- with open(path, "rb") as source:
45- return tomllib.load(source)["toolchain"]["channel"]
46-
47- if channel("src/tests/rust_guests/rust-toolchain.toml") != channel("src/hyperlight_guest_capi/rust-toolchain.toml"):
48- raise ValueError("Guest Rust toolchains must match")
49- PY
50-
5138 - uses : hyperlight-dev/ci-setup-workflow@3935a41ca357d6acb4274edc072b75a73a19e2b3 # v2.3.0
5239 with :
5340 additional-toolchain-directory : src/tests/rust_guests
5441 env :
5542 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5643
44+ - name : Check guest toolchains match
45+ run : |
46+ guest=$(cd src/tests/rust_guests && rustup show active-toolchain)
47+ capi=$(cd src/hyperlight_guest_capi && rustup show active-toolchain)
48+ if [[ "${guest%% *}" != "${capi%% *}" ]]; then
49+ echo "::error::Guest Rust toolchains must match"
50+ exit 1
51+ fi
52+
5753 # cargo-hyperlight builds a custom sysroot for x86_64-hyperlight-none target.
5854 # rust-cache cleans "anything not a dependency" from target dirs, removing the sysroot.
5955 # We cache sysroot separately to avoid rebuilding it (~10s) on every run.
You can’t perform that action at this time.
0 commit comments