From 33ea93b12b31a816f5a3fb6751d86e1c9c41e02f Mon Sep 17 00:00:00 2001 From: theGreatHerrLebert Date: Fri, 11 Sep 2026 10:32:37 +0200 Subject: [PATCH] ci: stop one duplicate wheel from cancelling every other platform MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v0.4.2 release published Linux wheels for 3.11-3.13 and macOS arm64 for 3.12/3.13, then stopped: all three Windows jobs and macOS 3.11 were cancelled, so those platforms have no 0.4.2 wheel at all. Since every imspy package in this release requires imspy-connector>=0.4.2, installing the stack on Windows currently fails to resolve. Two workflow bugs combined: macos-14 and macos-15 are both arm64, and both built with --target aarch64-apple-darwin, so they produce byte-identical wheel names (macosx_11_0_arm64). The second one to upload is always rejected: Failed to upload "imspy_connector-0.4.2-cp312-cp312-macosx_11_0_arm64.whl" Caused by: File already exists The matrix then ran with the default fail-fast, so that guaranteed-duplicate job cancelled every platform still building — Windows among them. The same signature appears on the models-v0.6.0 release, so this has been failing for a while rather than being new. Fixes: drop the duplicate macOS runner, set fail-fast: false so platforms publish independently, and pass --skip-existing so an already-uploaded wheel is skipped rather than failing the job. Also adds workflow_dispatch, so a partially-published version can be completed by re-running against the same ref instead of cutting a new release — --skip-existing makes that safe to repeat. Note: no Intel macOS (x86_64) wheels are produced, before or after this change; the matrix is arm64-only. Worth a separate decision. Claude-Session: https://claude.ai/code/session_01532ckxwR1fUorKF7CN66uA --- .github/workflows/imspy-connector-publish.yml | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/imspy-connector-publish.yml b/.github/workflows/imspy-connector-publish.yml index 9b0f734bc..a6d38d3cb 100644 --- a/.github/workflows/imspy-connector-publish.yml +++ b/.github/workflows/imspy-connector-publish.yml @@ -3,6 +3,10 @@ name: Build and Publish Rust Binding on: release: types: [published] + # Lets a partially-published version be completed without cutting a new + # release: re-run against the same ref and --skip-existing uploads only the + # wheels PyPI is still missing. + workflow_dispatch: permissions: contents: read @@ -11,8 +15,16 @@ jobs: build-and-publish: runs-on: ${{ matrix.os }} strategy: + # One platform failing must not cancel the others: they publish + # independent wheels, and a cancelled job means that platform gets no + # wheel at all for this version. + fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-14, macos-15] + # macos-14 and macos-15 are both arm64 and were both built with + # --target aarch64-apple-darwin, producing byte-identical wheel names + # (macosx_11_0_arm64). Whichever uploaded second failed with "File + # already exists" and, under the default fail-fast, cancelled the rest. + os: [ubuntu-latest, windows-latest, macos-14] python-version: ['3.11', '3.12', '3.13'] steps: @@ -31,7 +43,7 @@ jobs: - name: Set up Rust uses: dtolnay/rust-toolchain@stable with: - targets: ${{ (matrix.os == 'macos-14' || matrix.os == 'macos-15') && 'aarch64-apple-darwin' || '' }} + targets: ${{ matrix.os == 'macos-14' && 'aarch64-apple-darwin' || '' }} - name: Clean Cargo Artifacts run: | @@ -42,7 +54,7 @@ jobs: shell: bash run: | cd imspy_connector - if [ "${{ matrix.os }}" = "macos-14" ] || [ "${{ matrix.os }}" = "macos-15" ]; then + if [ "${{ matrix.os }}" = "macos-14" ]; then maturin build --release --target aarch64-apple-darwin else maturin build --release @@ -53,4 +65,6 @@ jobs: MATURIN_PYPI_TOKEN: ${{ secrets.IMSPY_CONNECTOR_PYPI_API_TOKEN }} run: | cd imspy_connector - maturin publish --no-sdist + # Idempotent: a wheel this version already has on PyPI is skipped rather + # than failing the job, so a dispatch can fill in missing platforms. + maturin publish --no-sdist --skip-existing