@@ -139,9 +139,18 @@ jobs:
139139 - { spec: cp314-manylinux_s390x, arch: s390x, omit: ${{ env.skip_slow_jobs }} }
140140 - { spec: cp314t-manylinux_s390x, arch: s390x, omit: ${{ env.skip_slow_jobs }} }
141141
142+ # riscv64 manylinux
143+ - { spec: cp39-manylinux_riscv64, arch: riscv64, test_args: '{package}/src/c', omit: ${{ env.skip_slow_jobs }} }
144+ - { spec: cp310-manylinux_riscv64, arch: riscv64, test_args: '{package}/src/c', omit: ${{ env.skip_slow_jobs || env.skip_ci_redundant_jobs }} }
145+ - { spec: cp311-manylinux_riscv64, arch: riscv64, test_args: '{package}/src/c', omit: ${{ env.skip_slow_jobs || env.skip_ci_redundant_jobs }} }
146+ - { spec: cp312-manylinux_riscv64, arch: riscv64, test_args: '{package}/src/c', omit: ${{ env.skip_slow_jobs || env.skip_ci_redundant_jobs }} }
147+ - { spec: cp313-manylinux_riscv64, arch: riscv64, test_args: '{package}/src/c', omit: ${{ env.skip_slow_jobs || env.skip_ci_redundant_jobs }} }
148+ - { spec: cp314-manylinux_riscv64, arch: riscv64, omit: ${{ env.skip_slow_jobs }} }
149+ - { spec: cp314t-manylinux_riscv64, arch: riscv64, omit: ${{ env.skip_slow_jobs }} }
150+
142151 linux :
143152 needs : [python_sdist, make_linux_matrix]
144- runs-on : ${{ (matrix.arch == 'aarch64') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
153+ runs-on : ${{ (matrix.arch == 'aarch64') && 'ubuntu-24.04-arm' || (matrix.arch == 'riscv64') && 'ubuntu-24.04-riscv' || 'ubuntu-24.04' }}
145154 strategy :
146155 fail-fast : false
147156 matrix : ${{ fromJSON(needs.make_linux_matrix.outputs.matrix_json) }}
@@ -155,7 +164,11 @@ jobs:
155164
156165 - name : configure docker foreign arch support
157166 uses : docker/setup-qemu-action@v3
158- if : matrix.arch != 'x86_64' && matrix.arch != 'i686' && matrix.arch != 'aarch64'
167+ if : matrix.arch != 'x86_64' && matrix.arch != 'i686' && matrix.arch != 'aarch64' && matrix.arch != 'riscv64'
168+
169+ - name : Set up uv (riscv64)
170+ if : matrix.arch == 'riscv64'
171+ uses : astral-sh/setup-uv@v7
159172
160173 - name : build/test wheels
161174 id : build
@@ -179,6 +192,7 @@ jobs:
179192 CIBW_MANYLINUX_AARCH64_IMAGE : ${{ matrix.manylinux_img || 'manylinux2014' }}
180193 CIBW_MANYLINUX_PPC64LE_IMAGE : ${{ matrix.manylinux_img || 'manylinux2014' }}
181194 CIBW_MANYLINUX_S390X_IMAGE : ${{ matrix.manylinux_img || 'manylinux2014' }}
195+ CIBW_MANYLINUX_RISCV64_IMAGE : ${{ matrix.manylinux_img || 'manylinux_2_39' }}
182196 CIBW_MUSLLINUX_X86_64_IMAGE : ${{ matrix.musllinux_img || 'musllinux_1_2' }}
183197 CIBW_MUSLLINUX_I686_IMAGE : ${{ matrix.musllinux_img || 'musllinux_1_2' }}
184198 CIBW_MUSLLINUX_AARCH64_IMAGE : ${{ matrix.musllinux_img || 'musllinux_1_2' }}
@@ -190,10 +204,14 @@ jobs:
190204 mkdir cffi
191205
192206 tar zxf ${{ steps.fetch_sdist.outputs.download-path }}/cffi*.tar.gz --strip-components=1 -C cffi
193- python -m pip install --upgrade "${{ matrix.cibw_version || 'cibuildwheel' }}"
194207
195- # actually build libffi + wheel (using env tweaks above)
196- python -m cibuildwheel --output-dir dist ./cffi
208+ if [ "${{ matrix.arch }}" = "riscv64" ]; then
209+ # Use uvx on riscv64 RISE runners (setup-python not available)
210+ uvx --python 3.14 "${{ matrix.cibw_version || 'cibuildwheel' }}" --output-dir dist ./cffi
211+ else
212+ python -m pip install --upgrade "${{ matrix.cibw_version || 'cibuildwheel' }}"
213+ python -m cibuildwheel --output-dir dist ./cffi
214+ fi
197215
198216 echo "artifact_name=$(ls ./dist/)" >> "$GITHUB_OUTPUT"
199217
0 commit comments