Skip to content

Commit 4de90a1

Browse files
benjefferymergify[bot]
authored andcommitted
Fix OSX wheels
1 parent 52d3b8d commit 4de90a1

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

.github/workflows/wheels.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ on:
1212

1313
jobs:
1414
OSX:
15-
runs-on: macos-latest
15+
name: Build ${{ matrix.os }} - ${{ matrix.python }}
16+
runs-on: ${{ matrix.os }}
1617
strategy:
1718
matrix:
19+
os: [macos-13, macos-15]
1820
python: [3.9, "3.10", 3.11, 3.12]
1921
steps:
2022
- name: Checkout
@@ -29,13 +31,21 @@ jobs:
2931
run: |
3032
brew install gsl
3133
pip install --upgrade pip build
32-
- name: Build Wheel
34+
- name: Build Wheel (arm64)
35+
if: matrix.os == 'macos-15'
3336
run: |
3437
export PLAT="arm64"
3538
export _PYTHON_HOST_PLATFORM="macosx-11.0-arm64"
36-
export OLDARCHFLAGS=$ARCHFLAGS
37-
export ARCHFLAGS+="-arch arm64"
39+
export CFLAGS+=" -arch arm64"
40+
export CXXFLAGS+=" -arch arm64"
41+
export ARCHFLAGS=$OLDARCHFLAGS
42+
export ARCHFLAGS+=" -arch arm64"
43+
export CPPFLAGS+=" -arch arm64"
44+
export LDFLAGS+=" -arch arm64"
3845
python -m build --wheel
46+
- name: Build Wheel (x86_64)
47+
if: matrix.os == 'macos-13'
48+
run: |
3949
export PLAT="x86_64"
4050
export _PYTHON_HOST_PLATFORM="macosx-11.0-x86_64"
4151
export CFLAGS+=" -arch x86_64"
@@ -48,12 +58,11 @@ jobs:
4858
- name: Delocate to bundle dynamic libs
4959
run: |
5060
pip install delocate
51-
delocate-wheel -v dist/msprime-*arm64.whl
52-
delocate-wheel -v dist/msprime-*x86_64.whl
61+
delocate-wheel -v dist/*.whl
5362
- name: Upload Wheels
5463
uses: actions/upload-artifact@v4.6.1
5564
with:
56-
name: osx-wheel-${{ matrix.python }}
65+
name: osx-wheel-${{ matrix.os }}-${{ matrix.python }}
5766
path: dist
5867

5968
manylinux:
@@ -89,16 +98,18 @@ jobs:
8998
path: dist/wheelhouse
9099

91100
OSX-test:
101+
name: Test ${{ matrix.os }} - ${{ matrix.python }}
92102
needs: ['OSX']
93-
runs-on: macos-latest
103+
runs-on: ${{ matrix.os }}
94104
strategy:
95105
matrix:
106+
os: [macos-13, macos-15]
96107
python: [3.9, "3.10", 3.11, 3.12]
97108
steps:
98109
- name: Download wheels
99110
uses: actions/download-artifact@v4.2.0
100111
with:
101-
name: osx-wheel-${{ matrix.python }}
112+
name: osx-wheel-${{ matrix.os }}-${{ matrix.python }}
102113
- name: Set up Python ${{ matrix.python }}
103114
uses: actions/setup-python@v5.4.0
104115
with:

0 commit comments

Comments
 (0)