ci(release): wire wasi-sdk into build-test-evidence#274
Open
avrabe wants to merge 1 commit into
Open
Conversation
…-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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores the
build-test-evidencejob's wasm build so it stops failing (it's beencontinue-on-errorsince #272 — v0.9.0 shipped 8/9 assets, missing onlyrivet-v0.9.0-test-evidence.tar.gz).The spar
wasm32-wasip2build pulls inhighs-sys(a C++ solver). Building C/C++ for that target needs a full WASI toolchain:wasm-component-ld— cargo's wasm32-wasip2 linker (ci(release): install wasm-component-ld in build-test-evidence #269)wasm-ld— what it shells out to (lld, ci(release): install lld (wasm-ld) for build-test-evidence #271)libc/libc++/libc++abi+libclang_rt.builtins-wasm32.a— the runner image no longer ships these, sowasm-lderrored oncrt1.o/-lc/-lc++.Fix: install wasi-sdk 25.0 to
/opt/wasi-sdk, put itsbin/onPATH, and pinCC_/CXX_/AR_wasm32_wasip2+CFLAGS_/CXXFLAGS_wasm32_wasip2(with--sysroot=.../share/wasi-sysroot) so thecc/cmakebuild scripts resolve everything.lldstays as a fallbackwasm-ld. Removescontinue-on-error.Caveats
build-test-evidencestill fails, the error log will show what (e.g. wrong sysroot path, missing--targetform, version mismatch).rules_wasm_componentwould be cleaner, but that's a change in the spar repo (where the actual wasm build lives), not here.Test plan
build-test-evidenceno longer fails; on the next tag, the v-X.Y.Z release page gets all 9 assets (incl.test-evidence.tar.gz)🤖 Generated with Claude Code