build(python): Add build for riscv64 wheels#27149
build(python): Add build for riscv64 wheels#27149threexc wants to merge 4 commits intopola-rs:mainfrom
Conversation
a08456f to
f47f9a7
Compare
|
I've added a setup step to account for riscv64 Python, but it seems there are no Pythons available at any version yet in the GitHub manifests - I'll have to look further into it... |
39af252 to
63b31c8
Compare
|
This is blocked on upstream actions/setup-python#1288 right? |
Right. As soon as I have word there I'll update it again. |
|
I've converted this PR to a draft for the moment. |
| - job_config: linux-riscv64 | ||
| os: ubuntu-24.04-riscv | ||
| architecture: riscv64 | ||
| target: riscv64gc-unknown-linux-gnu |
There was a problem hiding this comment.
Is there any reason to be this pessimistic when it comes to extensions? These are Linux only anyway, and I would guess that for high-performance applications you would want to, definitely, have B (Bit Manipulation) and V (Vector). In general, I would just follow RVA23 for now since that is what most Linux-capable SBCs are targeting.
There was a problem hiding this comment.
I'm not opposed to advancing the spec that we build wheels against, but for now I think this is the right place to start - it's consistent with most other projects building for riscv64, including uv and maturin itself.
I think it would be better to start with riscv64gc and follow up with another change to riscv64a23 once more RVA23-based platforms are actually available to users.
63b31c8 to
735cbe9
Compare
.github/workflows/release-python.yml
Outdated
|
|
||
| - name: Set up Python (RISCV64 Linux) | ||
| if: matrix.os == 'ubuntu-24.04-riscv' | ||
| uses: actions/setup-python@v6 |
There was a problem hiding this comment.
If you feel so inclined, you can use riseproject-dev/setup-python@8b57351c0f828145e2ac14bd328c731503361b7a, it will work on riscv64. I would NOT recommend to ship that as the expectation is that actions/setup-python#1302 gets merged and actions/setup-python can work OOTB.
You would use it like the following:
- name: Set up Python (RISCV64 Linux)
if: matrix.os == 'ubuntu-24.04-riscv'
uses: riseproject-dev/setup-python@8b57351c0f828145e2ac14bd328c731503361b7a
with:
python-version: ${{ env.PYTHON_VERSION_LINUX_RISCV64 }}
mirror: https://raw.githubusercontent.com/riseproject-dev/python-versions/main
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Build polars Python modules for riscv64 platforms by using the riscv64gc-unknown-linux-gnu target. Use a RISE riscv native runner as the 'os'. See: https://riseproject-dev.github.io/riscv-runner/ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Build polars Python modules for riscv64 platforms with musl by using the riscv64gc-unknown-linux-musl target. Use a RISE riscv native runner as the 'os'. See: https://riseproject-dev.github.io/riscv-runner/ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
735cbe9 to
3c4c4bf
Compare
As part of the RISE Project, we are helping to build riscv64 binary wheels for a variety Python modules. Add support for both standard and musl-based builds by using official RISE RISC-V GitHub Actions Runners. Note that they have to be enabled for the project to use them - instructions for doing so are here.
I've tried testing the CI ahead of time on my fork, but only the linter and PR checks ran. I also didn't see
make testavailable locally, so I ranmake checkaftermake build. Here's the end of that output: