Skip to content

Commit b0d21e0

Browse files
committed
Move macos python wheels from build-rust into build-python on blacksmith
The wheels were merged into build-rust/macos to dodge github-hosted macos concurrency limits; on blacksmith that constraint is gone. One job builds both arches (arm64 host cross-builds x86_64) into a single wheels-macos artifact. build-packages already needs build-python, so consumption is unchanged, and build-rust/macos no longer blocks the test jobs on wheel builds.
1 parent 6de45a5 commit b0d21e0

2 files changed

Lines changed: 33 additions & 71 deletions

File tree

‎.github/workflows/build-python.yml‎

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -150,46 +150,39 @@ jobs:
150150
path: src/lib-python/dist
151151
retention-days: 1
152152

153-
## This is removed here, and merged with the build-rust/macos job due to macos concurrency limits in github actions
154-
# macos:
155-
# runs-on: ${{ matrix.platform.runner }}
156-
# strategy:
157-
# fail-fast: false
158-
# matrix:
159-
# platform:
160-
# - runner: macos-15-intel
161-
# target: x86_64
162-
# - runner: macos-15
163-
# target: aarch64
164-
# steps:
165-
# - uses: actions/checkout@v6
166-
# with:
167-
# fetch-depth: 0
168-
# - name: Setup Job Environment
169-
# uses: ./.github/actions/job-setup
170-
# - uses: actions/setup-python@v6
171-
# with:
172-
# python-version: 3.x
173-
# - name: Build wheels
174-
# uses: PyO3/maturin-action@v1
175-
# with:
176-
# working-directory: src/lib-python
177-
# target: ${{ matrix.platform.target }}
178-
# args: --release --out dist
179-
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
180-
# # - name: Build free-threaded wheels
181-
# # uses: PyO3/maturin-action@v1
182-
# # with:
183-
# # working-directory: src/lib-python
184-
# # target: ${{ matrix.platform.target }}
185-
# # args: --release --out dist -i python3.13t
186-
# # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
187-
# - name: Upload wheels
188-
# uses: actions/upload-artifact@v7
189-
# with:
190-
# name: wheels-macos-${{ matrix.platform.target }}
191-
# path: src/lib-python/dist
192-
# retention-days: 1
153+
# Single blacksmith job cross-building both arches (the arm64 runner compiles x86_64 fine),
154+
# so this does not consume the limited github-hosted macos runner pool.
155+
macos:
156+
runs-on: blacksmith-6vcpu-macos-latest
157+
steps:
158+
- uses: actions/checkout@v6
159+
with:
160+
fetch-depth: 0
161+
- name: Setup Job Environment
162+
uses: ./.github/actions/job-setup
163+
- uses: actions/setup-python@v6
164+
with:
165+
python-version: 3.x
166+
- name: Build wheels (aarch64)
167+
uses: PyO3/maturin-action@v1
168+
with:
169+
working-directory: src/lib-python
170+
target: aarch64
171+
args: --release --out dist
172+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
173+
- name: Build wheels (x86_64)
174+
uses: PyO3/maturin-action@v1
175+
with:
176+
working-directory: src/lib-python
177+
target: x86_64
178+
args: --release --out dist
179+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
180+
- name: Upload wheels
181+
uses: actions/upload-artifact@v7
182+
with:
183+
name: wheels-macos
184+
path: src/lib-python/dist
185+
retention-days: 1
193186

194187
sdist:
195188
runs-on: ubuntu-latest

‎.github/workflows/build-rust.yml‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -244,37 +244,6 @@ jobs:
244244
name: rust-macos
245245
path: artifacts/*
246246
retention-days: 1
247-
## PYTHON WHEELS (historically merged here due to github-hosted macos concurrency limits;
248-
## could be split into a parallel job now that this runs on blacksmith)
249-
- uses: actions/setup-python@v6
250-
with:
251-
python-version: 3.x
252-
- name: Build Python wheels (aarch64)
253-
uses: PyO3/maturin-action@v1
254-
with:
255-
working-directory: src/lib-python
256-
target: aarch64
257-
args: --release --out dist-aarch64
258-
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
259-
- name: Build Python wheels (x86_64)
260-
uses: PyO3/maturin-action@v1
261-
with:
262-
working-directory: src/lib-python
263-
target: x86_64
264-
args: --release --out dist-x86_64
265-
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
266-
- name: Upload Python wheels (aarch64)
267-
uses: actions/upload-artifact@v7
268-
with:
269-
name: wheels-macos-aarch64
270-
path: src/lib-python/dist-aarch64
271-
retention-days: 1
272-
- name: Upload Python wheels (x86_64)
273-
uses: actions/upload-artifact@v7
274-
with:
275-
name: wheels-macos-x86_64
276-
path: src/lib-python/dist-x86_64
277-
retention-days: 1
278247
- name: Cancel workflow if failed
279248
if: ${{ failure() }}
280249
uses: ./.github/actions/cancel-workflow

0 commit comments

Comments
 (0)