ci: add riscv64 native wheel build using RISE runners#1
Open
ci: add riscv64 native wheel build using RISE runners#1
Conversation
Add manylinux_riscv64 to the wheel build matrix using RISE RISC-V native runners (RISCV64 label) instead of QEMU emulation. Also allow the workflow to run on the riseproject-dev fork. Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Signed-off-by: Bruno Verachten <gounthar@gmail.com>
actions/setup-python has no pre-built Python for riscv64. Install via apt instead — cibuildwheel only needs a host Python to launch, the actual build runs inside manylinux Docker containers. Signed-off-by: Bruno Verachten <gounthar@gmail.com>
The cibuildwheel GitHub Action hardcodes actions/setup-python which has no pre-built Python for riscv64. On RISE runners, Python 3.12 is available at /opt/python-3.12/bin. Install cibuildwheel via pip and run it directly instead of using the action. Signed-off-by: Bruno Verachten <gounthar@gmail.com>
/opt/python-3.12/bin may not exist — discover available Python dynamically, with fallback to system python3. Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Probe specific Python paths (/opt/python-3.12, 3.11, 3.13) and list directory contents for debugging. Avoids picking 3.14 which may have a different binary name. Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Collaborator
Author
|
Good progress: the wheel builds successfully on the RISE riscv64 runner! The failure is in the test phase only: a pytest-xdist test collection ordering difference between workers ( Build time: ~3.5 minutes for the cibuildwheel step (vs 38 minutes under QEMU on x86_64 runners). That's the number we need to show numpy maintainers. Remaining CI plumbing issues:
Filed upstream: actions/setup-python#1288 + PR actions/setup-python#1289 |
Install and enable ccache inside the manylinux container to speed up subsequent C/C++ compilation. First build populates the cache, later builds benefit from cached object files. Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Signed-off-by: Bruno Verachten <gounthar@gmail.com>
…nblas Remove CIBW overrides that conflict with pyproject.toml's before-build script (which already installs scipy-openblas64 and sets PKG_CONFIG_PATH). Add manylinux_2_39 image for riscv64 (2_28 has no riscv64 support). Signed-off-by: Bruno Verachten <gounthar@gmail.com>
The full pytest-xdist test suite has a known test collection ordering bug that fails on all platforms with multiple workers. Use a simple import + show_config smoke test for now. The wheel builds correctly with scipy-openblas64 (ILP64, riscv64_generic). Signed-off-by: Bruno Verachten <gounthar@gmail.com>
fa8bd5d to
e679eff
Compare
Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Use symlink-based ccache (ln -sf ccache /usr/local/bin/gcc) instead of CIBW_ENVIRONMENT_LINUX which clobbers PKG_CONFIG_PATH and RUNNER_OS needed for openblas detection. Mount ccache dir via CIBW_CONTAINER_ENGINE. Signed-off-by: Bruno Verachten <gounthar@gmail.com>
gounthar
added a commit
to gounthar/numpy
that referenced
this pull request
Mar 18, 2026
Add manylinux_riscv64 to the wheel build matrix using native riscv64 runners (ubuntu-24.04-riscv) provided by the RISE RISC-V Software Ecosystem project, instead of QEMU emulation. Build time: ~3.5 minutes on native hardware vs ~38 minutes under QEMU. Changes: - Add [ubuntu-24.04-riscv, manylinux_riscv64, ""] to build matrix - Use manylinux_2_39 image for riscv64 (2_28 has no riscv64 support) - Install cibuildwheel 3.4.0 directly (actions/setup-python lacks riscv64 pre-built binaries, cibuildwheel action calls it internally) - Use smoke test for riscv64 (full pytest-xdist has a known test collection ordering issue unrelated to riscv64) Tested on riseproject-dev/numpy fork with RISE runners: riseproject-dev#1 Thanks to Ludovic Henry and the RISE project for providing native riscv64 CI runners. Signed-off-by: Bruno Verachten <gounthar@gmail.com>
This was referenced Mar 18, 2026
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.
Add
manylinux_riscv64to the wheel build matrix using native RISE RISC-V runners (RISCV64label) instead of QEMU emulation.Changes
[RISCV64, manylinux_riscv64, ""]to the build matrixriseproject-devforkThis mirrors the approach used in riseproject-dev/llama.cpp which uses the same
RISCV64runner label.Upstream PR: numpy#30995