ci: add riscv64 manylinux/musllinux wheels (#106)

* ci: add riscv64 manylinux/musllinux wheels

Now that cibuildwheel and PyPI support riscv64, we can start building
riscv64 wheels.

Because there is no native riscv64 runner available, this PR adds a
QEMU-based riscv64 job to the cibuildwheel workflow.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>

* Pin action

---------

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Co-authored-by: Hynek Schlawack <hs@ox.cx>
This commit is contained in:
Julien Stephan 2026-02-21 13:13:28 +01:00 committed by GitHub
parent ab43d00fa6
commit fa8ea7c587
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,12 +15,20 @@ permissions: {}
jobs:
wheels:
name: Building for ${{ matrix.os }}
name: Building for ${{ matrix.os }}${{ matrix.name_suffix || '' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, windows-11-arm, macOS-14]
include:
- os: ubuntu-22.04
- os: ubuntu-22.04-arm
- os: windows-2022
- os: windows-11-arm
- os: macOS-14
- os: ubuntu-22.04
cibw_archs: "riscv64"
name_suffix: "-riscv64"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@ -30,11 +38,19 @@ jobs:
fetch-tags: true
persist-credentials: false
- name: Set up QEMU for RISC-V emulation
if: matrix.cibw_archs == 'riscv64'
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
with:
platforms: riscv64
# See pyproject.toml for config.
- uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
env:
CIBW_ARCHS: ${{ matrix.cibw_archs || 'auto' }}
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: wheels-${{ matrix.os }}-${{ strategy.job-index }}
name: wheels-${{ matrix.os }}${{ matrix.name_suffix || '' }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
...