ci: add riscv64gc-unknown-linux-gnu to release artifacts#2464
ci: add riscv64gc-unknown-linux-gnu to release artifacts#2464alexcrichton merged 2 commits intobytecodealliance:mainfrom
Conversation
gcc-riscv64-linux-gnu is not available in Ubuntu 16.04 (Xenial). Use 18.04 (Bionic) which ships the riscv64 cross-compiler. This is acceptable because RISC-V Linux distributions all ship glibc >= 2.27 (the 18.04 version).
|
Note on the Ubuntu 18.04 base image: The existing Dockerfiles use Ubuntu 16.04 (Xenial) to minimize the glibc version requirement for the produced binaries. However, This seems acceptable to me in practice because RISC-V Linux distributions all ship glibc >= 2.27 (the 18.04 version). The earliest mainstream RISC-V distros (Fedora 33 for riscv64, Debian sid/trixie, Ubuntu 20.04+) all use glibc 2.31+, so linking against glibc 2.27 imposes no real compatibility constraint. If maintainers prefer to keep 16.04 uniformity, an alternative would be to manually add a riscv64 cross-compiler PPA or build the cross-toolchain from source, but that adds complexity for no practical benefit given the target platform landscape. |
|
Looks OK to me but re-assigning to Alex because he has the most experience with CI and release subtleties |
|
Thanks @alexcrichton for the quick review and merge! Really appreciate the responsiveness. Looking forward to riscv64 binaries shipping with the next release. |
This adds
riscv64gc-unknown-linux-gnuto the release build matrix, so that official releases ship a pre-built Linux/RISC-V 64-bit binary.Changes
ci/docker/riscv64-linux/Dockerfile: new cross-compilation container (modeled on the existingaarch64-linuxone, usinggcc-riscv64-linux-gnu).github/workflows/main.yml: newriscv64-linuxmatrix entry in thebuildjobEvidence
A fork release built with this exact configuration is available at https://github.com/gounthar/wasm-tools/releases/tag/v1.245.1 ; the
wasm-tools-1.245.1-riscv64gc-unknown-linux-gnu.tar.gzartifact was verified on physical RISC-V hardware (BananaPi BPI-F3, SpacemiT K1).Fixes #2463