Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae779be

Browse files
committed
ci: Build Apple Silicon wheels natively
Now that we are running a (simple) test, we'll have to ensure the deployment target is correct. This would have been needed for a release anyway, but can be removed once meson-python 0.16.0 is out.
1 parent cba5610 commit ae779be

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,6 @@ jobs:
116116
CIBW_SKIP: "*-musllinux_aarch64"
117117
CIBW_TEST_COMMAND: >-
118118
python {package}/ci/check_version_number.py
119-
# Apple Silicon machines are not available for testing, so silence the
120-
# warning from cibuildwheel. Remove the skip when they're available.
121-
CIBW_TEST_SKIP: "*-macosx_arm64"
122-
MACOSX_DEPLOYMENT_TARGET: "10.12"
123119
MPL_DISABLE_FH4: "yes"
124120
strategy:
125121
matrix:
@@ -131,7 +127,15 @@ jobs:
131127
- os: windows-latest
132128
cibw_archs: "auto64"
133129
- os: macos-11
134-
cibw_archs: "x86_64 arm64"
130+
cibw_archs: "x86_64"
131+
# NOTE: macos_target can be moved back into global environment after
132+
# meson-python 0.16.0 is released.
133+
macos_target: "10.12"
134+
- os: macos-14
135+
cibw_archs: "arm64"
136+
# NOTE: macos_target can be moved back into global environment after
137+
# meson-python 0.16.0 is released.
138+
macos_target: "11.0"
135139

136140
steps:
137141
- name: Set up QEMU
@@ -153,6 +157,7 @@ jobs:
153157
env:
154158
CIBW_BUILD: "cp312-*"
155159
CIBW_ARCHS: ${{ matrix.cibw_archs }}
160+
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.macos_target }}"
156161

157162
- name: Build wheels for CPython 3.11
158163
uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
@@ -161,6 +166,7 @@ jobs:
161166
env:
162167
CIBW_BUILD: "cp311-*"
163168
CIBW_ARCHS: ${{ matrix.cibw_archs }}
169+
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.macos_target }}"
164170

165171
- name: Build wheels for CPython 3.10
166172
uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
@@ -169,6 +175,7 @@ jobs:
169175
env:
170176
CIBW_BUILD: "cp310-*"
171177
CIBW_ARCHS: ${{ matrix.cibw_archs }}
178+
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.macos_target }}"
172179

173180
- name: Build wheels for CPython 3.9
174181
uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
@@ -177,6 +184,7 @@ jobs:
177184
env:
178185
CIBW_BUILD: "cp39-*"
179186
CIBW_ARCHS: ${{ matrix.cibw_archs }}
187+
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.macos_target }}"
180188

181189
- name: Build wheels for PyPy
182190
uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
@@ -185,6 +193,7 @@ jobs:
185193
env:
186194
CIBW_BUILD: "pp39-*"
187195
CIBW_ARCHS: ${{ matrix.cibw_archs }}
196+
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.macos_target }}"
188197
if: matrix.cibw_archs != 'aarch64'
189198

190199
- uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)