Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/publish-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,17 @@ jobs:
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"

- name: Clean previous builds
if: runner.os == 'Linux' || runner.os == 'macOS'
run: rm -rf target/wheels

- name: Build wheels (maturin)
uses: PyO3/maturin-action@v1
with:
command: build
manylinux: "2_28"
target: ${{ runner.os == 'macOS' && 'universal2-apple-darwin' || '' }}
args: >-
--release
-i python3.12
--strip
args: --release --strip -o target/wheels
manylinux: auto
env:
MACOSX_DEPLOYMENT_TARGET: ${{ runner.os == 'macOS' && '11.0' || '' }}

Expand All @@ -78,20 +79,21 @@ jobs:
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out target/sdist

- name: Upload Python package artifacts (wheels)
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: target/wheels/*
path: target/wheels/
if-no-files-found: error

- name: Upload sdist (Linux only)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
path: target/sdist/*.tar.gz
if-no-files-found: error

publish:
Expand All @@ -117,6 +119,9 @@ jobs:
- name: "Preflight: reject plain linux wheels & verify set"
run: |
set -euo pipefail
echo "Files in upload directory:"
ls -l upload

bad=$(ls upload/*.whl | grep -E '/[^/]+-linux_(x86_64|i686|aarch64|armv7l)\.whl$' || true)
if [ -n "$bad" ]; then
echo "ERROR: Found non-manylinux wheels:"
Expand All @@ -141,4 +146,4 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install "maturin>=1.4"
maturin upload --repository-url https://test.pypi.org/legacy/ upload/*|
maturin upload --repository-url https://test.pypi.org/legacy/ upload/*