From 98a70fda1c6a21e521bdcf5cb6e41d5d6b3c27c8 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Fri, 3 Oct 2025 19:26:11 +0100 Subject: [PATCH 01/13] Fix artifact upload path and correct maturin upload command in CI workflow --- .github/workflows/publish-test-pypi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 28b6179..5cdc3e7 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -91,7 +91,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: sdist - path: dist/*.tar.gz + path: target/sdist/*.tar.gz # Corrected path if-no-files-found: error publish: @@ -141,4 +141,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/* From 7689c08cbcc86e0c95d058da884f5c56c43e8e02 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Fri, 3 Oct 2025 19:30:52 +0100 Subject: [PATCH 02/13] Fix artifact upload path for sdist in CI workflow --- .github/workflows/publish-test-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 5cdc3e7..e83e895 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -91,7 +91,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: sdist - path: target/sdist/*.tar.gz # Corrected path + path: dist/*.tar.gz if-no-files-found: error publish: From 11aa092c8ba2a88558b701dfb5d08c2146995d1e Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Fri, 3 Oct 2025 19:35:07 +0100 Subject: [PATCH 03/13] Fix sdist artifact upload path in CI workflow --- .github/workflows/publish-test-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index e83e895..534a6df 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -91,7 +91,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: sdist - path: dist/*.tar.gz + path: target/wheels/*.tar.gz if-no-files-found: error publish: From 168a35430148c3922f36b345c409649d3bb3b466 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Fri, 3 Oct 2025 23:47:32 +0100 Subject: [PATCH 04/13] Fix artifact upload paths for wheels and sdist in CI workflow --- .github/workflows/publish-test-pypi.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 534a6df..6a0e7b1 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -68,7 +68,7 @@ jobs: target: ${{ runner.os == 'macOS' && 'universal2-apple-darwin' || '' }} args: >- --release - -i python3.12 + ${{ runner.os != 'Linux' && '-i python3.12' || '' }} --strip env: MACOSX_DEPLOYMENT_TARGET: ${{ runner.os == 'macOS' && '11.0' || '' }} @@ -83,7 +83,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: wheels-${{ matrix.os }} - path: target/wheels/* + path: target/wheels/*.whl if-no-files-found: error - name: Upload sdist (Linux only) @@ -91,6 +91,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: sdist + # This path is based on the build log you provided. path: target/wheels/*.tar.gz if-no-files-found: error From 35cdeeeca6326511778b64fad543a13167f27893 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 4 Oct 2025 05:54:35 +0100 Subject: [PATCH 05/13] Fix sdist artifact upload path and adjust macOS build arguments in CI workflow --- .github/workflows/publish-test-pypi.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 6a0e7b1..20d24c3 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -68,8 +68,8 @@ jobs: target: ${{ runner.os == 'macOS' && 'universal2-apple-darwin' || '' }} args: >- --release - ${{ runner.os != 'Linux' && '-i python3.12' || '' }} --strip + ${{ runner.os != 'Linux' && '-i python3.12' || '' }} env: MACOSX_DEPLOYMENT_TARGET: ${{ runner.os == 'macOS' && '11.0' || '' }} @@ -91,7 +91,6 @@ jobs: uses: actions/upload-artifact@v4 with: name: sdist - # This path is based on the build log you provided. path: target/wheels/*.tar.gz if-no-files-found: error From 15d86b3e79f8e57783b24aa611e5acf5566d177a Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 4 Oct 2025 13:55:10 +0100 Subject: [PATCH 06/13] Refactor maturin build arguments and update sdist upload path in CI workflow --- .github/workflows/publish-test-pypi.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 20d24c3..7b4434c 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -60,16 +60,22 @@ jobs: env: MACOSX_DEPLOYMENT_TARGET: "11.0" + - name: Set maturin build arguments + id: maturin-args + run: | + if [ "${{ runner.os }}" == "Linux" ]; then + echo "args=--release --strip" >> $GITHUB_OUTPUT + else + echo "args=--release --strip -i python3.12" >> $GITHUB_OUTPUT + fi + - name: Build wheels (maturin) uses: PyO3/maturin-action@v1 with: command: build manylinux: "2_28" target: ${{ runner.os == 'macOS' && 'universal2-apple-darwin' || '' }} - args: >- - --release - --strip - ${{ runner.os != 'Linux' && '-i python3.12' || '' }} + args: ${{ steps.maturin-args.outputs.args }} env: MACOSX_DEPLOYMENT_TARGET: ${{ runner.os == 'macOS' && '11.0' || '' }} @@ -78,6 +84,7 @@ jobs: uses: PyO3/maturin-action@v1 with: command: sdist + args: --out target/sdist - name: Upload Python package artifacts (wheels) uses: actions/upload-artifact@v4 @@ -91,7 +98,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: sdist - path: target/wheels/*.tar.gz + path: target/sdist/*.tar.gz if-no-files-found: error publish: @@ -141,4 +148,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/*``` From 915a4f8538ce5cdeb266a0d9795cdbb73813fcf0 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 4 Oct 2025 14:57:54 +0100 Subject: [PATCH 07/13] Refactor maturin build arguments and simplify artifact upload paths in CI workflow --- .github/workflows/publish-test-pypi.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 7b4434c..782d9eb 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -60,22 +60,13 @@ jobs: env: MACOSX_DEPLOYMENT_TARGET: "11.0" - - name: Set maturin build arguments - id: maturin-args - run: | - if [ "${{ runner.os }}" == "Linux" ]; then - echo "args=--release --strip" >> $GITHUB_OUTPUT - else - echo "args=--release --strip -i python3.12" >> $GITHUB_OUTPUT - fi - - name: Build wheels (maturin) uses: PyO3/maturin-action@v1 with: command: build manylinux: "2_28" target: ${{ runner.os == 'macOS' && 'universal2-apple-darwin' || '' }} - args: ${{ steps.maturin-args.outputs.args }} + args: --release --strip ${{ runner.os != 'Linux' && '-i python3.12' || '' }} env: MACOSX_DEPLOYMENT_TARGET: ${{ runner.os == 'macOS' && '11.0' || '' }} @@ -84,13 +75,14 @@ jobs: uses: PyO3/maturin-action@v1 with: command: sdist + # Explicitly set the output directory for predictability args: --out target/sdist - name: Upload Python package artifacts (wheels) uses: actions/upload-artifact@v4 with: name: wheels-${{ matrix.os }} - path: target/wheels/*.whl + path: target/wheels/ if-no-files-found: error - name: Upload sdist (Linux only) @@ -148,4 +140,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/* From 549285265ddf9655c94af015ba97f9a375d8f847 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 4 Oct 2025 19:28:52 +0100 Subject: [PATCH 08/13] Enhance CI workflow by adding Windows target and refining build arguments for maturin --- .github/workflows/publish-test-pypi.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 782d9eb..740934c 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -23,6 +23,13 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] + include: + - os: ubuntu-latest + target: x86_64 + - os: macos-latest + target: universal2-apple-darwin + - os: windows-latest + target: x64 steps: - uses: actions/checkout@v5 @@ -34,6 +41,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.12" + architecture: ${{ matrix.target }} - name: Set up uv with efficient cache id: setup-uv @@ -64,18 +72,14 @@ jobs: uses: PyO3/maturin-action@v1 with: command: build - manylinux: "2_28" - target: ${{ runner.os == 'macOS' && 'universal2-apple-darwin' || '' }} - args: --release --strip ${{ runner.os != 'Linux' && '-i python3.12' || '' }} - env: - MACOSX_DEPLOYMENT_TARGET: ${{ runner.os == 'macOS' && '11.0' || '' }} + args: --release --strip -o target/wheels + manylinux: auto - name: Build sdist (Linux only) if: runner.os == 'Linux' uses: PyO3/maturin-action@v1 with: command: sdist - # Explicitly set the output directory for predictability args: --out target/sdist - name: Upload Python package artifacts (wheels) From 8666119c616f7959c4965bf04e49a2e32abc981f Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 4 Oct 2025 19:39:40 +0100 Subject: [PATCH 09/13] Refactor CI workflow to simplify OS target configuration and enhance macOS build settings for maturin --- .github/workflows/publish-test-pypi.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 740934c..b945cc5 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -23,13 +23,6 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - include: - - os: ubuntu-latest - target: x86_64 - - os: macos-latest - target: universal2-apple-darwin - - os: windows-latest - target: x64 steps: - uses: actions/checkout@v5 @@ -41,7 +34,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.12" - architecture: ${{ matrix.target }} - name: Set up uv with efficient cache id: setup-uv @@ -72,8 +64,11 @@ jobs: uses: PyO3/maturin-action@v1 with: command: build + target: ${{ runner.os == 'macOS' && 'universal2-apple-darwin' || '' }} args: --release --strip -o target/wheels manylinux: auto + env: + MACOSX_DEPLOYMENT_TARGET: ${{ runner.os == 'macOS' && '11.0' || '' }} - name: Build sdist (Linux only) if: runner.os == 'Linux' From 43e68a363f84adb864106eb93b43a441c13213fc Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 4 Oct 2025 19:44:29 +0100 Subject: [PATCH 10/13] Add debug output for upload directory in preflight check --- .github/workflows/publish-test-pypi.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index b945cc5..6db2dd3 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -115,6 +115,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:" From 8ebb98e432462018be62735851d3cbf1d554f943 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 4 Oct 2025 20:19:15 +0100 Subject: [PATCH 11/13] Add step to clean previous builds before building wheels in CI workflow --- .github/workflows/publish-test-pypi.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 6db2dd3..76f88f3 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -60,6 +60,9 @@ jobs: env: MACOSX_DEPLOYMENT_TARGET: "11.0" + - name: Clean previous builds + run: rm -rf target/wheels + - name: Build wheels (maturin) uses: PyO3/maturin-action@v1 with: @@ -135,6 +138,9 @@ jobs: echo "No sdist found (ok if intentionally omitted)." fi + # temporary disable + exit 1 + - name: Publish to TestPyPI (fail on duplicates) env: MATURIN_USERNAME: __token__ From e1345651a9357ef97807700fdd24785c14c4383e Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 4 Oct 2025 20:30:10 +0100 Subject: [PATCH 12/13] Fix condition for cleaning previous builds in CI workflow --- .github/workflows/publish-test-pypi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 76f88f3..2a5a017 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -61,6 +61,7 @@ jobs: 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) From bed4cf2fba62274b256c79542d8b7cf44e1cd958 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 4 Oct 2025 20:33:24 +0100 Subject: [PATCH 13/13] Remove temporary exit from preflight check in TestPyPI publish workflow --- .github/workflows/publish-test-pypi.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/publish-test-pypi.yml b/.github/workflows/publish-test-pypi.yml index 2a5a017..fa45209 100644 --- a/.github/workflows/publish-test-pypi.yml +++ b/.github/workflows/publish-test-pypi.yml @@ -139,9 +139,6 @@ jobs: echo "No sdist found (ok if intentionally omitted)." fi - # temporary disable - exit 1 - - name: Publish to TestPyPI (fail on duplicates) env: MATURIN_USERNAME: __token__