Skip to content

Commit 86e4cba

Browse files
authored
Build wheels for MacOS arm64 (#738)
1 parent f772b38 commit 86e4cba

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ on:
44
push:
55
tags:
66
- '*.*.*'
7+
workflow_dispatch:
78

89
jobs:
910

10-
build:
11+
build_wheels:
1112
name: Build wheels on ${{ matrix.os }}
1213
runs-on: ${{ matrix.os }}-latest
1314
strategy:
@@ -18,8 +19,11 @@ jobs:
1819
- uses: actions/checkout@v3
1920

2021
- name: Build wheels
21-
uses: pypa/cibuildwheel@v2.10.1
22+
uses: pypa/cibuildwheel@v2.12.1
2223
env:
24+
CIBW_ARCHS_LINUX: x86_64
25+
CIBW_ARCHS_MACOS: x86_64
26+
CIBW_ARCHS_WINDOWS: AMD64
2327
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
2428
with:
2529
package-dir: .
@@ -30,8 +34,39 @@ jobs:
3034
name: dist
3135
path: ./dist/*
3236

37+
build_wheels_macos_arm:
38+
name: Build arm64 wheels on ${{ matrix.os }}
39+
runs-on: ${{ matrix.os }}
40+
strategy:
41+
matrix:
42+
os: [ macos-12 ]
43+
44+
steps:
45+
- uses: actions/checkout@v3
46+
47+
- name: Build wheels
48+
uses: pypa/cibuildwheel@v2.12.1
49+
env:
50+
CIBW_ARCHS_MACOS: arm64
51+
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
52+
with:
53+
package-dir: .
54+
output-dir: dist
55+
56+
- name: Fix wheel tags
57+
run: |
58+
pip install wheel==0.40
59+
wheel tags --platform-tag macosx_12_0_arm64 dist/*-macosx*.whl --remove
60+
61+
- uses: actions/upload-artifact@v3
62+
with:
63+
name: dist
64+
path: ./dist/*
65+
66+
3367
Release:
34-
needs: [ build ]
68+
needs: [ build_wheel, build_wheels_macos_arm ]
69+
if: success() && startsWith(github.ref, 'refs/tags/')
3570
runs-on: ubuntu-latest
3671

3772
steps:

0 commit comments

Comments
 (0)