Skip to content

Commit 08e4ebc

Browse files
dan-blanchardclaude
andcommitted
ci: parallelize riscv64 builds across 5 RISE runners
Split riscv64 into one job per Python version (cp310-cp314) so each gets its own RISE runner. Should drop riscv64 wall-clock from ~15 min (sequential) to ~3 min (parallel). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 2f6e1e9 commit 08e4ebc

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,16 @@ jobs:
4545
fail-fast: false
4646
matrix:
4747
include:
48-
- { os: ubuntu-latest, name: linux-x86_64, cibw_archs_linux: x86_64 }
49-
- { os: ubuntu-24.04-arm, name: linux-aarch64, cibw_archs_linux: aarch64 }
50-
- { os: ubuntu-24.04-riscv, name: linux-riscv64, cibw_archs_linux: riscv64 }
51-
- { os: macos-latest, name: macos, cibw_archs_linux: auto }
48+
- { os: ubuntu-latest, name: linux-x86_64, cibw_archs_linux: x86_64 }
49+
- { os: ubuntu-24.04-arm, name: linux-aarch64, cibw_archs_linux: aarch64 }
50+
# riscv64 is split per Python version so each gets its own RISE
51+
# runner and they build in parallel (~3 min each vs ~15 min serial).
52+
- { os: ubuntu-24.04-riscv, name: linux-riscv64-310, cibw_archs_linux: riscv64, cibw_build: "cp310-*" }
53+
- { os: ubuntu-24.04-riscv, name: linux-riscv64-311, cibw_archs_linux: riscv64, cibw_build: "cp311-*" }
54+
- { os: ubuntu-24.04-riscv, name: linux-riscv64-312, cibw_archs_linux: riscv64, cibw_build: "cp312-*" }
55+
- { os: ubuntu-24.04-riscv, name: linux-riscv64-313, cibw_archs_linux: riscv64, cibw_build: "cp313-*" }
56+
- { os: ubuntu-24.04-riscv, name: linux-riscv64-314, cibw_archs_linux: riscv64, cibw_build: "cp314-*" }
57+
- { os: macos-latest, name: macos, cibw_archs_linux: auto }
5258
steps:
5359
- uses: actions/checkout@v4
5460
with:
@@ -57,18 +63,20 @@ jobs:
5763
# The pypa/cibuildwheel action internally calls actions/setup-python,
5864
# which has no riscv64 binaries. On native riscv64 runners, invoke
5965
# cibuildwheel directly with the system Python instead.
60-
- if: matrix.name != 'linux-riscv64'
66+
- if: "!startsWith(matrix.name, 'linux-riscv64')"
6167
uses: pypa/[email protected]
6268
env:
6369
CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }}
70+
CIBW_BUILD: ${{ matrix.cibw_build || '*' }}
6471
CIBW_ENVIRONMENT_PASS_LINUX: HATCH_BUILD_HOOK_ENABLE_MYPYC
6572
HATCH_BUILD_HOOK_ENABLE_MYPYC: "true"
66-
- if: matrix.name == 'linux-riscv64'
73+
- if: startsWith(matrix.name, 'linux-riscv64')
6774
run: |
6875
python3 -m pip install cibuildwheel
6976
python3 -m cibuildwheel --output-dir wheelhouse
7077
env:
7178
CIBW_ARCHS_LINUX: riscv64
79+
CIBW_BUILD: ${{ matrix.cibw_build }}
7280
CIBW_ENVIRONMENT_PASS_LINUX: HATCH_BUILD_HOOK_ENABLE_MYPYC
7381
HATCH_BUILD_HOOK_ENABLE_MYPYC: "true"
7482
- uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)