From fa8ea7c5872844cfd877873ae9714ba36930a2bc Mon Sep 17 00:00:00 2001 From: Julien Stephan Date: Sat, 21 Feb 2026 13:13:28 +0100 Subject: [PATCH] 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 * Pin action --------- Signed-off-by: Julien Stephan Co-authored-by: Hynek Schlawack --- .github/workflows/wheels.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 5da5f2b..204e693 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -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 ...