Skip to content

Commit 56bcebd

Browse files
committed
Add macOS back to the workflow
1 parent 567a929 commit 56bcebd

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

.github/workflows/CI.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,32 @@ jobs:
5353
name: wheels-linux-${{ matrix.platform.target }}
5454
path: dist
5555

56+
macos:
57+
runs-on: ${{ matrix.platform.runner }}
58+
strategy:
59+
matrix:
60+
platform:
61+
- runner: macos-latest
62+
target: x86_64
63+
- runner: macos-latest
64+
target: aarch64
65+
steps:
66+
- uses: actions/checkout@v4
67+
- uses: actions/setup-python@v5
68+
with:
69+
python-version: '3.10'
70+
- name: Build wheels
71+
uses: PyO3/maturin-action@v1
72+
with:
73+
target: ${{ matrix.platform.target }}
74+
args: --release --out dist --find-interpreter
75+
sccache: 'true'
76+
- name: Upload wheels
77+
uses: actions/upload-artifact@v4
78+
with:
79+
name: wheels-macos-${{ matrix.platform.target }}
80+
path: dist
81+
5682
sdist:
5783
runs-on: ubuntu-latest
5884
steps:
@@ -71,12 +97,15 @@ jobs:
7197
release:
7298
name: Release
7399
runs-on: ubuntu-latest
74-
if: "startsWith(github.ref, 'refs/tags/')"
75-
needs: [linux, sdist]
100+
needs: [linux, macos, sdist]
101+
if: startsWith(github.ref, 'refs/tags/')
76102
steps:
77103
- uses: actions/download-artifact@v4
78104
with:
79105
name: wheels-linux-x86_64
106+
- uses: actions/download-artifact@v4
107+
with:
108+
name: wheels-macos-x86_64
80109
- name: Publish to PyPI
81110
uses: PyO3/maturin-action@v1
82111
env:

0 commit comments

Comments
 (0)