ci: switch riscv64 from QEMU to native RISE runner (#117)

* ci: switch riscv64 from QEMU to native RISE runner

* fix: use RISE runner Python, skip setup-uv on riscv64

* fix: run cibuildwheel via pipx on riscv64 (bypass setup-python)
This commit is contained in:
Bruno Verachten 2026-03-29 11:21:23 +02:00 committed by GitHub
parent 91424d1789
commit 0126ae476f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,7 @@ jobs:
- os: windows-2022
- os: windows-11-arm
- os: macOS-14
- os: ubuntu-22.04
- os: ubuntu-24.04-riscv
cibw_archs: "riscv64"
name_suffix: "-riscv64"
@ -39,20 +39,28 @@ jobs:
persist-credentials: false
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
if: matrix.cibw_archs != 'riscv64'
with:
enable-cache: false
- name: Set up QEMU for RISC-V emulation
if: matrix.cibw_archs == 'riscv64'
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
with:
platforms: riscv64
# See pyproject.toml for config.
# Use the GitHub Action for all platforms except riscv64
- uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
if: matrix.cibw_archs != 'riscv64'
env:
CIBW_ARCHS: ${{ matrix.cibw_archs || 'auto' }}
# On riscv64 native runners, run cibuildwheel via pipx to avoid
# the GitHub Action's setup-python call (not available for riscv64)
- name: Build wheels (riscv64 native)
if: matrix.cibw_archs == 'riscv64'
run: |
export PATH="$(ls -d /opt/python-3.1*/bin 2>/dev/null | sort -V | tail -1):$PATH"
python3 --version
python3 -m pip install pipx
pipx run cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS: riscv64
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: wheels-${{ matrix.os }}${{ matrix.name_suffix || '' }}-${{ strategy.job-index }}