Skip to content

Commit 99510e4

Browse files
ci: build only native architecture on each macOS runner
Previously cibuildwheel was configured to build both x86_64 and arm64 wheels on BOTH runners, causing unnecessary cross-compilation: - macos-14 (ARM) was cross-compiling x86_64 via Rosetta - macos-15-intel (x86) was cross-compiling arm64 This was slower, less reliable, and produced duplicate wheels. Changes: - Set CIBW_ARCHS_MACOS per-runner: arm64 on macos-14, x86_64 on macos-15-intel - Removed macos.archs from cibuildwheel.toml (now set in workflow) - Removed test-skip config (no longer needed without cross-arch builds) - Each runner now builds only its native architecture Benefits: - Faster builds (no cross-compilation overhead) - More reliable (no Rosetta issues) - Cleaner artifact naming (no duplicates) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 03c0942 commit 99510e4

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

.github/workflows/build_and_publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ jobs:
7171
CIBW_BUILD: "cp${{ matrix.python-version}}-*"
7272
# Override deployment target to 14.0 for all macOS runners
7373
MACOSX_DEPLOYMENT_TARGET: "14.0"
74-
# Skip cross-architecture testing to avoid brew/Rosetta issues
75-
CIBW_TEST_SKIP: >-
74+
# Build only native architecture on each runner (no cross-compilation)
75+
CIBW_ARCHS_MACOS: >-
7676
${{
77-
matrix.os == 'macos-14' && '*macosx_x86_64* *aarch64* *ppc64* *s390x*' ||
78-
matrix.os == 'macos-15-intel' && '*macosx_arm64* *aarch64* *ppc64* *s390x*' ||
79-
'*aarch64* *arm64* *ppc64* *s390x*'
77+
matrix.os == 'macos-14' && 'arm64' ||
78+
matrix.os == 'macos-15-intel' && 'x86_64' ||
79+
'auto'
8080
}}
8181
8282
- name: "Upload build artifacts (${{ matrix.os }}, py${{ matrix.python-version }})"

cibuildwheel.toml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ skip = [
1111
"pp*",
1212
]
1313

14-
macos.archs = ["x86_64", "arm64"]
15-
14+
# Architecture is set per-runner in the workflow file to avoid cross-compilation
1615
# GSL libraries from Homebrew require macOS 14.0 minimum
1716
macos.environment = {MACOSX_DEPLOYMENT_TARGET = "14.0"}
1817

@@ -28,14 +27,6 @@ macos.before-build = [
2827
]
2928

3029

31-
test-skip = [
32-
"*aarch64*",
33-
"*arm64*",
34-
"*ppc64*",
35-
"*s390x*",
36-
]
37-
38-
3930
linux.before-test = [
4031
"pip install 'biopython' 'matplotlib' 'numpy<2' 'pandas' 'pygments' 'scipy'"
4132
]

0 commit comments

Comments
 (0)