@@ -148,26 +148,39 @@ jobs:
148
148
artifact_name : github-pages
149
149
150
150
build :
151
- name : Build wheels-${{ matrix.wheels }}-${{ matrix.target }} on ${{ matrix.runner }}
152
- runs-on : ${{ matrix.runner }}
151
+ # ref: https://github.com/pydantic/pydantic-core/blob/ba8eab4acba8ad04c45f27a58a5d001c8f212361/.github/workflows/ci.yml#L395-L499
152
+ env :
153
+ INTERPRETER_DEFAULT : 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10
154
+
155
+ name : ${{ matrix.os || 'linux' }} ${{ matrix.target }}
156
+ runs-on : ${{ (matrix.os == 'macos' || matrix.os == 'windows') && matrix.os || 'ubuntu' }}-latest
153
157
strategy :
154
158
matrix :
155
- runner : [ubuntu-latest]
156
- manylinux : [auto, musllinux_1_2]
157
- target : [x86_64, x86, aarch64, armv7, s390x, ppc64le]
159
+ os : [macos, linux, windows] # default: linux
160
+ manylinux : [auto, musllinux_1_1, musllinux_1_2] # default: 'auto' if linux, or 'null' otherwise
161
+ python-architecture : [x64] # default: 'x64'
162
+ target : [x86_64, aarch64]
158
163
164
+ # prettier-ignore
159
165
exclude :
160
- - { manylinux: musllinux_1_2, target: s390x }
161
- - { manylinux: musllinux_1_2, target: ppc64le }
166
+ - { os: macos, manylinux: musllinux_1_1 }
167
+ - { os: macos, manylinux: musllinux_1_2 }
168
+ - { os: windows, manylinux: musllinux_1_1 }
169
+ - { os: windows, manylinux: musllinux_1_2 }
162
170
163
171
# prettier-ignore
164
172
include :
165
- - { manylinux: auto, wheels: linux }
166
- - { manylinux: musllinux_1_2, wheels: musllinux }
167
- - { runner: macos-12, target: x86_64, wheels: macos }
168
- - { runner: macos-14, target: aarch64, wheels: macos }
169
- - { runner: windows-latest, target: x86, wheels: windows }
170
- - { runner: windows-latest, target: x64, wheels: windows }
173
+ # manylinux for various platforms
174
+ - { os: linux, target: i686 }
175
+ - { os: linux, target: armv7, interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 }
176
+ - { os: linux, target: ppc64le, interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 }
177
+ - { os: linux, target: s390x, interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 }
178
+
179
+ # windows
180
+ - { os: windows, target: x86, interpreter: 3.8 3.9 3.10 3.11 3.12 3.13, python-architecture: x86 }
181
+ - { os: windows, target: i686, interpreter: 3.8 3.9 3.10 3.11 3.12 3.13, python-architecture: x86 }
182
+ - { os: windows, target: aarch64, interpreter: 3.11 3.12 3.13 }
183
+ - { os: windows, target: x64 }
171
184
172
185
steps :
173
186
- uses : actions/checkout@v4
@@ -177,7 +190,7 @@ jobs:
177
190
178
191
- uses : actions/setup-python@v5
179
192
with :
180
- architecture : ${{ matrix.runner == 'windows-latest' && matrix.target || null }}
193
+ architecture : ${{ matrix.python-architecture || 'x64' }}
181
194
python-version : 3.x
182
195
183
196
- uses : ./.github/actions/poetry
@@ -188,14 +201,15 @@ jobs:
188
201
189
202
- uses : PyO3/maturin-action@v1
190
203
with :
191
- target : ${{ matrix.target }}
192
- args : --release --out dist --find-interpreter
204
+ args : --release --out dist --interpreter ${{ matrix.interpreter || env.INTERPRETER_DEFAULT }}
205
+ manylinux : ${{ ( matrix.os == 'macos' || matrix.os == 'macos' ) && null || ( matrix.manylinux || 'auto' ) }}
206
+ rust-toolchain : stable
193
207
sccache : " true"
194
- manylinux : ${{ matrix.manylinux }}
208
+ target : ${{ matrix.target }}
195
209
196
210
- uses : actions/upload-artifact@v4
197
211
with :
198
- name : wheels -${{ matrix.wheels }}-${{ matrix.target }}
212
+ name : build -${{ contains( matrix.manylinux, 'musllinux' ) && 'musl' || '' }}${{ matrix.os || 'linux' }}-${{ matrix.target }}
199
213
path : dist
200
214
201
215
sdist :
@@ -209,7 +223,7 @@ jobs:
209
223
210
224
- uses : actions/upload-artifact@v4
211
225
with :
212
- name : wheels- sdist
226
+ name : sdist
213
227
path : dist
214
228
215
229
test-pypi :
0 commit comments