Skip to content

Commit dff2a38

Browse files
committed
ci: macOS wheel = single universal2 build off macos-14
The macos-13 (Intel-only) GitHub-hosted runner has unreliable capacity in 2026; jobs routinely sit in 'Queued' indefinitely while the other matrix entries finish. Replace the two-runner Intel + ARM split with one cross-built universal2 dylib on macos-14 (CMAKE_OSX_ARCHITECTURES, ARCHFLAGS, _PYTHON_HOST_PLATFORM=macosx-11.0-universal2). One wheel, both architectures, one runner, no queue. Matches the 0.2.2 wheel shape: slothdb-X.Y.Z-py3-none-macosx_11_0_universal2.whl.
1 parent 54ceec4 commit dff2a38

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

.github/workflows/python-wheels.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ jobs:
2424
include:
2525
- { os: windows-latest, name: win_amd64 }
2626
- { os: ubuntu-24.04, name: manylinux2014_x86_64 }
27-
- { os: macos-13, name: macosx_x86_64 }
28-
- { os: macos-14, name: macosx_arm64 }
27+
# Single universal2 wheel covers both Intel and Apple Silicon
28+
# in one artifact. The macos-13 (Intel-only) GitHub-hosted
29+
# runners have unreliable capacity and routinely queue
30+
# indefinitely, so we cross-build on macos-14 instead.
31+
- { os: macos-14, name: macosx_universal2 }
2932
runs-on: ${{ matrix.os }}
3033
steps:
3134
- uses: actions/checkout@v4
@@ -56,14 +59,27 @@ jobs:
5659
cmake --build build --config Release -j --target slothdb_shared
5760
cp build/src/Release/slothdb.dll python/slothdb/
5861
59-
- name: Build shared lib (macOS)
62+
- name: Build shared lib (macOS, universal2)
6063
if: runner.os == 'macOS'
6164
run: |
62-
cmake -B build -DSLOTHDB_BUILD_SHARED=ON -DSLOTHDB_BUILD_SHELL=OFF -DSLOTHDB_BUILD_TESTS=OFF -DSLOTHDB_ASK_MODEL=OFF -DCMAKE_BUILD_TYPE=Release
65+
cmake -B build \
66+
-DSLOTHDB_BUILD_SHARED=ON -DSLOTHDB_BUILD_SHELL=OFF \
67+
-DSLOTHDB_BUILD_TESTS=OFF -DSLOTHDB_ASK_MODEL=OFF \
68+
-DCMAKE_BUILD_TYPE=Release \
69+
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
70+
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
6371
cmake --build build -j$(sysctl -n hw.ncpu) --target slothdb_shared
72+
# Confirm the dylib has both slices.
73+
lipo -info build/src/libslothdb.dylib
6474
cp build/src/libslothdb.dylib python/slothdb/
6575
6676
- name: Build wheel
77+
shell: bash
78+
env:
79+
# Tag the macOS wheel as macosx_11_0_universal2 so pip serves
80+
# it to both Intel and Apple Silicon users from one file.
81+
_PYTHON_HOST_PLATFORM: ${{ runner.os == 'macOS' && 'macosx-11.0-universal2' || '' }}
82+
ARCHFLAGS: ${{ runner.os == 'macOS' && '-arch x86_64 -arch arm64' || '' }}
6783
run: |
6884
python -m pip install --upgrade pip build
6985
python -m build --wheel python/

0 commit comments

Comments
 (0)