ci: add riscv64 manylinux wheels - #227
Merged
Merged
Conversation
Now that cibuildwheel and PyPI support riscv64, we can start building riscv64 wheels. Integrated in the same way as the s390x platform. Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Contributor
Author
|
Hi, just checking in on this issue. Are you open to add riscv64 architecture? Is there anything I can help with to move it forward? |
38 tasks
|
+1 for this. I've verified that cffi 2.0.0 builds successfully on native riscv64 hardware (BananaPi F3, SpacemiT K1, rv64gc, GCC 14.2.0). One suggestion: the current PR runs riscv64 on Thanks @justeph for getting this started! |
gounthar
added a commit
to gounthar/cffi
that referenced
this pull request
Mar 19, 2026
Add riscv64 matrix entries (cp39-cp314t) following the s390x pattern, with native RISE riscv64 runners instead of QEMU emulation. Based on the work by @justeph in python-cffi#227, with the addition of: - Native runner support (ubuntu-24.04-riscv) for faster builds - Skip QEMU setup for riscv64 (not needed on native hardware) Verified on native riscv64 hardware (BananaPi F3, SpacemiT K1). Native RISE runners provided by the RISE project. Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Contributor
|
Why didn't CI run here, or did it run and the results are no longer around? |
Contributor
|
Close open to trigger CI |
gounthar
added a commit
to gounthar/cffi
that referenced
this pull request
Sep 8, 2026
riscv64 is the last mainstream Linux architecture without cffi wheels on
PyPI, so anything downstream of it has to compile from sdist. That bites
hardest in the maturin/Rust-to-Python toolchain, where cffi and patchelf
are the two remaining source builds.
The matrix entries follow the x86_64/aarch64 shape rather than the
s390x/ppc64le one: no test_args trimming and gated on
skip_ci_redundant_jobs instead of skip_slow_jobs, because these run on
real hardware and are not slow. Note that anything gated on
skip_slow_jobs never runs on a pull_request or push at all, since
ci.yaml sets that variable true for both events and dynamatrix drops the
entry.
Two riscv64-specific wrinkles in the linux job:
- docker/setup-qemu-action is skipped, since the host is already
riscv64 and there is nothing to emulate.
- actions/setup-python publishes no riscv64 builds, so cibuildwheel is
driven by an interpreter that uv fetches instead. The alternative,
apt-installing a system python, ties the tool interpreter to
whatever the runner image ships.
manylinux_2_39 is the first manylinux spec with riscv64 images, hence
the differing default for CIBW_MANYLINUX_RISCV64_IMAGE.
The runner label ubuntu-24.04-riscv comes from the RISE runners GitHub
App (https://github.com/apps/rise-risc-v-runners), which the
organisation would need installed before these jobs can pick up a
machine. Builds on the riscv64 matrix entries proposed by @justeph in
python-cffi#227.
Signed-off-by: Bruno Verachten <gounthar@gmail.com>
gounthar
added a commit
to gounthar/cffi
that referenced
this pull request
Sep 8, 2026
riscv64 is the last mainstream Linux architecture without cffi wheels on
PyPI, so anything downstream of it has to compile from sdist. That bites
hardest in the maturin/Rust-to-Python toolchain, where cffi and patchelf
are the two remaining source builds.
The matrix entries follow the x86_64/aarch64 shape rather than the
s390x/ppc64le one: no test_args trimming and gated on
skip_ci_redundant_jobs instead of skip_slow_jobs, because these run on
real hardware and are not slow. Note that anything gated on
skip_slow_jobs never runs on a pull_request or push at all, since
ci.yaml sets that variable true for both events and dynamatrix drops the
entry.
Two riscv64-specific wrinkles in the linux job:
- docker/setup-qemu-action is skipped, since the host is already
riscv64 and there is nothing to emulate.
- actions/setup-python publishes no riscv64 builds, so cibuildwheel is
driven by an interpreter that uv fetches instead. The alternative,
apt-installing a system python, ties the tool interpreter to
whatever the runner image ships.
manylinux_2_39 is the first manylinux spec with riscv64 images, hence
the differing default for CIBW_MANYLINUX_RISCV64_IMAGE.
The runner label ubuntu-24.04-riscv comes from the RISE runners GitHub
App (https://github.com/apps/rise-risc-v-runners), which the
organisation would need installed before these jobs can pick up a
machine. Builds on the riscv64 matrix entries proposed by @justeph in
python-cffi#227.
Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Closed
Contributor
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.
Now that cibuildwheel and PyPI support riscv64, we can start building riscv64 wheels.
Integrated in the same way as the s390x platform.