Skip to content

ci: add riscv64-linux build#619

Closed
gounthar wants to merge 1 commit intoWebAssembly:mainfrom
gounthar:ci/riscv64-linux
Closed

ci: add riscv64-linux build#619
gounthar wants to merge 1 commit intoWebAssembly:mainfrom
gounthar:ci/riscv64-linux

Conversation

@gounthar
Copy link
Copy Markdown
Contributor

@gounthar gounthar commented Mar 31, 2026

Add a riscv64-linux matrix entry using a native RISE riscv64 runner (ubuntu-24.04-riscv), mirroring the arm64-linux pattern which uses ubuntu-22.04-arm.

What changed

  • .github/workflows/main.yml: new riscv64-linux entry with os: ubuntu-24.04-riscv, WASI_SDK_CI_SKIP_SYSROOT: 1, and -DWASI_SDK_LLDB=OFF. No cross-compilation flags needed — the runner is native riscv64.
  • ci/docker/Dockerfile.riscv64-linux: Ubuntu 24.04 base (AlmaLinux 8 has no riscv64 image). Standard build-essential and build tools; no cross-compiler packages or env vars.
  • ci/docker-build.sh: wasmtime volume mount is now conditional on WASI_SDK_CI_SKIP_SYSROOT being unset. wasmtime is not yet available on riscv64 runners, and it is not needed when sysroot tests are skipped.

Why WASI_SDK_CI_SKIP_SYSROOT

Running the sysroot tests requires executing wasm binaries via wasmtime, and wasmtime does not yet publish riscv64 binaries. Skipping sysroot tests is the same approach used by x86_64-macos (cross-architecture wasm execution). The toolchain build itself still completes and produces the riscv64 clang/lld binaries.

RISE runners

RISE (RISC-V Software Ecosystem) provides native riscv64 GitHub Actions runners free for open source projects. Access via the GitHub App: https://github.com/apps/rise-risc-v-runners

Closes #607

Add riscv64gc-unknown-linux-musl to the build matrix using a native
ubuntu-24.04-riscv runner (RISE Project), mirroring the arm64-linux
pattern which uses ubuntu-22.04-arm.

Changes:
- Use ubuntu-24.04-riscv runner instead of cross-compilation on x86_64
- Dockerfile.riscv64-linux: Ubuntu 24.04 base (AlmaLinux 8 has no
  riscv64 image); native build-essential, no cross-compiler env vars
- docker-build.sh: skip wasmtime volume mount when WASI_SDK_CI_SKIP_SYSROOT
  is set (wasmtime is not available on riscv64 runners yet)
- WASI_SDK_CI_SKIP_SYSROOT: 1 and WASI_SDK_LLDB=OFF kept as before;
  sysroot tests require running wasm binaries which needs wasmtime

RISE runners are GitHub Actions runners for riscv64, free for open
source projects: https://github.com/apps/rise-risc-v-runners

Closes WebAssembly#607

Signed-off-by: Bruno Verachten <gounthar@gmail.com>
@gounthar gounthar closed this Apr 5, 2026
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.

Add riscv64 host platform support

1 participant