Skip to content

Commit d7dd507

Browse files
asmeurerclaude
andcommitted
Use native runners for Linux wheel builds per cibuildwheel recommendation
Following cibuildwheel best practices, configure each Linux runner to build only its native architecture instead of cross-compiling via QEMU: - ubuntu-latest builds x86_64 wheels natively - ubuntu-24.04-arm builds aarch64 wheels natively This eliminates slow QEMU emulation (which was causing multi-hour build times) and follows the recommended pattern from cibuildwheel docs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cbb50fb commit d7dd507

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

.github/workflows/publish-package.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,20 @@ jobs:
7373
needs: [build_sdist]
7474
strategy:
7575
matrix:
76-
# macos-15-intel is an intel runner, macos-14 is apple silicon
77-
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-15-intel, macos-14]
76+
include:
77+
# Build native x86_64 wheels on x86_64 runner
78+
- os: ubuntu-latest
79+
cibw_archs: "x86_64"
80+
# Build native aarch64 wheels on ARM64 runner
81+
- os: ubuntu-24.04-arm
82+
cibw_archs: "aarch64"
83+
- os: windows-latest
84+
cibw_archs: "auto"
85+
# macos-15-intel is an intel runner, macos-14 is apple silicon
86+
- os: macos-15-intel
87+
cibw_archs: "auto"
88+
- os: macos-14
89+
cibw_archs: "auto"
7890

7991
steps:
8092
- uses: actions/checkout@v5
@@ -94,6 +106,7 @@ jobs:
94106
package-dir: ${{ env.SDIST_FILE }}
95107
output-dir: dist/
96108
env:
109+
CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs }}
97110
CIBW_TEST_COMMAND: >
98111
python -c "import ndindex; assert '1.' in ndindex.__version__"
99112

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,5 @@ build-backend = "setuptools.build_meta"
1111
enable = ["cpython-freethreading"]
1212
skip = "*t*_i686"
1313

14-
[tool.cibuildwheel.linux]
15-
archs = ["x86_64", "aarch64"]
16-
1714
[tool.cibuildwheel.macos]
1815
environment = { CXXFLAGS="-std=c++11" }

0 commit comments

Comments
 (0)