Skip to content

Commit b425eb4

Browse files
neutrinocerosmeeseeksmachine
authored andcommitted
Backport PR yt-project#5229: WHL: cross compile macos x86_64 wheels
1 parent f5e485c commit b425eb4

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

.github/workflows/wheels.yaml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,32 @@ on:
1616

1717
jobs:
1818
build_wheels:
19-
name: Build wheels on ${{ matrix.os }}
19+
name: Build ${{ matrix.archs }} wheels on ${{ matrix.os }}
2020
runs-on: ${{ matrix.os }}
2121
strategy:
22-
matrix:
23-
os: [
24-
ubuntu-22.04,
25-
windows-2022,
26-
macos-13, # x86_64
27-
macos-14, # arm64
28-
]
2922
fail-fast: false
23+
matrix:
24+
include:
25+
- os: ubuntu-latest
26+
archs: x86_64
27+
select: '*manylinux*'
28+
id: manylinux_x86_64
29+
- os: ubuntu-latest
30+
archs: x86_64
31+
select: '*musllinux*'
32+
id: musllinux_x86_64
33+
- os: macos-latest
34+
archs: x86_64
35+
select: '*'
36+
id: macos_x86_64
37+
- os: macos-latest
38+
archs: arm64
39+
select: '*'
40+
id: macos_arm64
41+
- os: windows-latest
42+
archs: AMD64
43+
select: '*'
44+
id: windows_AMD64
3045

3146
steps:
3247
- name: Checkout repo
@@ -36,10 +51,13 @@ jobs:
3651
uses: pypa/cibuildwheel@v3.0.0
3752
with:
3853
output-dir: dist
54+
env:
55+
CIBW_ARCHS: ${{ matrix.archs }}
56+
CIBW_BUILD: ${{ matrix.select }}
3957

4058
- uses: actions/upload-artifact@v4
4159
with:
42-
name: wheels-${{ matrix.os }}
60+
name: wheels-${{ matrix.os }}-${{ matrix.id }}
4361
path: ./dist/*.whl
4462

4563
build_sdist:

pyproject.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -468,12 +468,3 @@ test-extras = "test"
468468
test-command = [
469469
"python -m pytest -c {project}/pyproject.toml --rootdir . --color=yes --pyargs yt -ra",
470470
]
471-
472-
[tool.cibuildwheel.linux]
473-
archs = "x86_64"
474-
475-
[tool.cibuildwheel.macos]
476-
archs = "auto"
477-
478-
[tool.cibuildwheel.windows]
479-
archs = "auto64"

0 commit comments

Comments
 (0)