Skip to content

Commit f81eea6

Browse files
committed
ci: updates based on pydantic-core
Signed-off-by: Bryant Finney <[email protected]>
1 parent 6b49183 commit f81eea6

File tree

1 file changed

+33
-19
lines changed

1 file changed

+33
-19
lines changed

.github/workflows/push-poetry.yaml

+33-19
Original file line numberDiff line numberDiff line change
@@ -148,26 +148,39 @@ jobs:
148148
artifact_name: github-pages
149149

150150
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
153157
strategy:
154158
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]
158163

164+
# prettier-ignore
159165
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 }
162170

163171
# prettier-ignore
164172
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 }
171184

172185
steps:
173186
- uses: actions/checkout@v4
@@ -177,7 +190,7 @@ jobs:
177190

178191
- uses: actions/setup-python@v5
179192
with:
180-
architecture: ${{ matrix.runner == 'windows-latest' && matrix.target || null }}
193+
architecture: ${{ matrix.python-architecture || 'x64' }}
181194
python-version: 3.x
182195

183196
- uses: ./.github/actions/poetry
@@ -188,14 +201,15 @@ jobs:
188201

189202
- uses: PyO3/maturin-action@v1
190203
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
193207
sccache: "true"
194-
manylinux: ${{ matrix.manylinux}}
208+
target: ${{ matrix.target }}
195209

196210
- uses: actions/upload-artifact@v4
197211
with:
198-
name: wheels-${{ matrix.wheels }}-${{ matrix.target }}
212+
name: build-${{ contains( matrix.manylinux, 'musllinux' ) && 'musl' || '' }}${{ matrix.os || 'linux' }}-${{ matrix.target }}
199213
path: dist
200214

201215
sdist:
@@ -209,7 +223,7 @@ jobs:
209223

210224
- uses: actions/upload-artifact@v4
211225
with:
212-
name: wheels-sdist
226+
name: sdist
213227
path: dist
214228

215229
test-pypi:

0 commit comments

Comments
 (0)