diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 28b6179..fa45209 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -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' || '' }} @@ -78,12 +79,13 @@ 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) @@ -91,7 +93,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: sdist - path: dist/*.tar.gz + path: target/sdist/*.tar.gz if-no-files-found: error publish: @@ -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:" @@ -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/*