Skip to content

ci(release): wire wasi-sdk into build-test-evidence#274

Open
avrabe wants to merge 1 commit into
mainfrom
ci/wasi-sdk-test-evidence
Open

ci(release): wire wasi-sdk into build-test-evidence#274
avrabe wants to merge 1 commit into
mainfrom
ci/wasi-sdk-test-evidence

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 12, 2026

Summary

Restores the build-test-evidence job's wasm build so it stops failing (it's been continue-on-error since #272 — v0.9.0 shipped 8/9 assets, missing only rivet-v0.9.0-test-evidence.tar.gz).

The spar wasm32-wasip2 build pulls in highs-sys (a C++ solver). Building C/C++ for that target needs a full WASI toolchain:

Fix: install wasi-sdk 25.0 to /opt/wasi-sdk, put its bin/ on PATH, and pin CC_/CXX_/AR_wasm32_wasip2 + CFLAGS_/CXXFLAGS_wasm32_wasip2 (with --sysroot=.../share/wasi-sysroot) so the cc/cmake build scripts resolve everything. lld stays as a fallback wasm-ld. Removes continue-on-error.

Caveats

  • Not verified locally — spar isn't checked out in this repo, so the spar wasm build can't be reproduced here. The wasip2 sysroot flag form or the wasi-sdk version (25.0) may need a tweak after the first CI run; if build-test-evidence still fails, the error log will show what (e.g. wrong sysroot path, missing --target form, version mismatch).
  • Alternative (out of scope): a hermetic toolchain via Bazel rules_wasm_component would be cleaner, but that's a change in the spar repo (where the actual wasm build lives), not here.

Test plan

  • CI green
  • build-test-evidence no longer fails; on the next tag, the v-X.Y.Z release page gets all 9 assets (incl. test-evidence.tar.gz)
  • If it fails, iterate on the wasi-sdk env/sysroot flags from the error log

🤖 Generated with Claude Code

…-error

Follow-up to #269/#271/#272. The spar wasm32-wasip2 build pulls in
highs-sys (a C++ solver); building C/C++ for that target needs a full
WASI toolchain — a sysroot with libc/libc++/libc++abi plus
libclang_rt.builtins-wasm32.a, and a wasm linker. The runner image no
longer ships any of it, so even with `lld` (wasm-ld) and
wasm-component-ld installed, wasm-ld errored on `crt1.o` / `-lc` /
`-lc++`. #272 made the job continue-on-error so the release wasn't
blocked (v0.9.0 shipped 8/9 assets, missing only test-evidence.tar.gz).

This installs wasi-sdk 25.0 to /opt/wasi-sdk, puts its bin/ on PATH (so
wasm-component-ld finds wasm-ld and the cc/cmake build scripts pick up
the right clang), and pins CC_/CXX_/AR_wasm32_wasip2 + the wasip2
sysroot via CFLAGS_/CXXFLAGS_wasm32_wasip2 — so both the CMake CXX-ABI
probe and the highs-sys compile resolve their headers/libs. `lld` stays
as a belt-and-braces wasm-ld source. Drops `continue-on-error` — if
test-evidence breaks again it should block the release until fixed.

Not verified locally (spar isn't checked out here); the wasip2 sysroot
flags or the wasi-sdk version may need a tweak after the first CI run.
Alternative for a hermetic toolchain (out of scope here): migrate the
spar-wasm build to Bazel rules_wasm_component — a change in the spar repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant