@@ -177,7 +177,8 @@ jobs:
177177 linux-aarch64,
178178 linux-musl-x86_64,
179179 linux-musl-aarch64,
180- macos-universal2,
180+ macos-aarch64,
181+ macos-x86_64,
181182 windows-amd64,
182183 windows-arm64,
183184 ]
@@ -198,10 +199,16 @@ jobs:
198199 os : ubuntu-latest
199200 python-interpreter : " 3.12"
200201 codex-targets : aarch64-unknown-linux-musl
201- - platform : macos-universal2
202+ - platform : macos-aarch64
202203 os : macos-14
203204 python-interpreter : 3.12
204- codex-targets : x86_64-apple-darwin,aarch64-apple-darwin
205+ codex-targets : aarch64-apple-darwin
206+ rust-target : aarch64-apple-darwin
207+ - platform : macos-x86_64
208+ os : macos-13
209+ python-interpreter : 3.12
210+ codex-targets : x86_64-apple-darwin
211+ rust-target : x86_64-apple-darwin
205212 - platform : windows-amd64
206213 os : windows-latest
207214 python-interpreter : 3.12
@@ -232,7 +239,7 @@ jobs:
232239 pip install zstandard
233240
234241 - name : Install build backend (host)
235- if : ${{ matrix.platform == 'macos-universal2' || matrix.platform == 'windows-amd64' || matrix.platform == 'windows-arm64' }}
242+ if : ${{ startsWith( matrix.platform, 'macos-') || matrix.platform == 'windows-amd64' || matrix.platform == 'windows-arm64' }}
236243 run : |
237244 pip install build maturin
238245
@@ -322,13 +329,13 @@ jobs:
322329 apk add --no-cache curl perl perl-text-template >/dev/null 2>&1 || true
323330 args : --release -i python3.12 -o dist
324331
325- - name : Build macOS universal2 wheel
326- if : ${{ matrix.platform == 'macos-universal2' }}
332+ - name : Build macOS wheel
333+ if : ${{ startsWith( matrix.platform, 'macos-') }}
327334 run : |
328335 python -m pip install --upgrade pip
329336 pip install maturin
330- rustup target add x86_64-apple-darwin aarch64-apple-darwin
331- maturin build --release -i python -o dist --target universal2-apple-darwin
337+ rustup target add "${{ matrix.rust-target }}"
338+ maturin build --release -i python -o dist --target "${{ matrix.rust-target }}"
332339
333340 - name : Build Windows wheel
334341 if : ${{ matrix.platform == 'windows-amd64' }}
@@ -417,6 +424,19 @@ jobs:
417424 fi
418425 echo "Found ${#files[@]} files:" && ls -al dist
419426
427+ - name : Verify PyPI file size limit
428+ shell : bash
429+ run : |
430+ set -euo pipefail
431+ max_bytes=$((100 * 1024 * 1024))
432+ for file in dist/*.whl dist/*.tar.gz; do
433+ size=$(wc -c < "$file")
434+ if [ "$size" -gt "$max_bytes" ]; then
435+ echo "$file is $size bytes, exceeding PyPI's 100 MB file limit" >&2
436+ exit 1
437+ fi
438+ done
439+
420440 - name : Publish to PyPI
421441 uses : pypa/gh-action-pypi-publish@release/v1
422442 with :
0 commit comments