@@ -64,14 +64,24 @@ jobs:
64
64
matrix :
65
65
python-version : ["3.8", "3.9", "3.10", "3.11", "3.12", pypy-3.8, pypy-3.9, pypy-3.10]
66
66
platform : [
67
- { os: "macos-latest", python-architecture: "x64 ", rust-target: "x86_64 -apple-darwin" },
67
+ { os: "macos-latest", python-architecture: "arm64 ", rust-target: "aarch64 -apple-darwin" },
68
68
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" },
69
69
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
70
70
]
71
71
include :
72
72
# Just test one x86 Windows Python for simplicity
73
73
- python-version : 3.12
74
74
platform : { os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" }
75
+ # Just test one x64 macOS Python for simplicity
76
+ - python-version : 3.12
77
+ platform : { os: "macos-13", python-architecture: "x64", rust-target: "x86_64-apple-darwin" }
78
+ # Just test one x64 macOS Python for simplicity
79
+ exclude :
80
+ # macOS arm doesn't have Python builds before 3.10
81
+ - python-version : 3.9
82
+ platform : { os: "macos-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" }
83
+ - python-version : 3.8
84
+ platform : { os: "macos-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" }
75
85
76
86
steps :
77
87
- uses : actions/checkout@v4
87
97
with :
88
98
targets : ${{ matrix.platform.rust-target }}
89
99
90
- - name : Install Rust aarch64-apple-darwin target
91
- if : matrix.platform.os == 'macos-latest'
92
- run : rustup target add aarch64-apple-darwin
93
-
94
100
- name : Install test dependencies
95
101
run : pip install --upgrade nox
96
102
@@ -104,14 +110,14 @@ jobs:
104
110
run : nox -s test-examples
105
111
106
112
- name : Test macOS universal2
107
- if : matrix.platform.os == 'macos-latest' && !startsWith(matrix.python-version, 'pypy')
113
+ if : ${{ startsWith( matrix.platform.os, 'macos') && !startsWith(matrix.python-version, 'pypy') }}
108
114
shell : bash
109
115
env :
110
- DEVELOPER_DIR : /Applications/Xcode.app/Contents/Developer
111
116
MACOSX_DEPLOYMENT_TARGET : ' 10.9'
112
117
ARCHFLAGS : -arch x86_64 -arch arm64
113
- PYO3_CROSS_LIB_DIR : /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib
114
118
run : |
119
+ rustup target add aarch64-apple-darwin
120
+ rustup target add x86_64-apple-darwin
115
121
cd examples/namespace_package
116
122
pip install build wheel
117
123
python -m build --no-isolation
@@ -143,10 +149,6 @@ jobs:
143
149
144
150
- uses : dtolnay/rust-toolchain@stable
145
151
146
- - name : Install Rust aarch64-apple-darwin target
147
- if : matrix.os == 'macos-latest'
148
- run : rustup target add aarch64-apple-darwin
149
-
150
152
- name : Build package
151
153
run : pip install -e .
152
154
@@ -307,7 +309,7 @@ jobs:
307
309
- uses : actions/checkout@v4
308
310
- uses : dtolnay/rust-toolchain@stable
309
311
with :
310
- targets : aarch64-apple-darwin
312
+ targets : aarch64-apple-darwin,x86_64-apple-darwin
311
313
312
314
env :
313
315
CIBW_BUILD : cp39-*
0 commit comments