From e30fb34322c02200d1152b687c3af643d9efc4a9 Mon Sep 17 00:00:00 2001 From: gambletan Date: Wed, 24 Jun 2026 12:15:30 +0800 Subject: [PATCH] ci(python): pin MACOSX_DEPLOYMENT_TARGET so the cross-built x86 wheel is installable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #13 restored the x86_64-apple-darwin wheel by cross-building it on the Apple-silicon macos-latest runner. But the wheel's platform tag is derived from the macOS deployment target, which was unpinned — so a cross-build on a macOS 14/15 runner risks tagging the wheel macosx_14_*_x86_64. pip on an older Intel Mac would then reject that wheel and silently fall back to the sdist (compile from source), defeating the whole point of shipping the wheel. Pin an explicit floor per arch via env on the maturin step: - x86_64-apple-darwin -> 10.12 (broad Intel-Mac compatibility) - aarch64-apple-darwin -> 11.0 (Apple-silicon minimum; explicit, not host-derived) - Linux leg: matrix field absent -> env expands empty -> ignored off-macOS Follow-up to #13. Verify with the release-python workflow_dispatch dry-run before the next version tag. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/release-python.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 1356d82..8a14ea2 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -26,8 +26,15 @@ jobs: target: x86_64-unknown-linux-gnu - os: macos-latest target: aarch64-apple-darwin + # Apple-silicon minimum; pin so the wheel tag is explicit, not host-SDK-derived. + macos_deployment_target: "11.0" - os: macos-latest target: x86_64-apple-darwin + # CRITICAL: this x86_64 wheel is CROSS-built on an Apple-silicon runner. Without an + # explicit floor the wheel can inherit the host's macOS-14/15 SDK and be tagged + # macosx_14_*_x86_64 — which pip on older Intel Macs rejects, silently falling back + # to the sdist and defeating the point of shipping the wheel at all. Pin to 10.12. + macos_deployment_target: "10.12" steps: - uses: actions/checkout@v4 @@ -37,6 +44,9 @@ jobs: - name: Build wheels uses: PyO3/maturin-action@v1 + env: + # Empty on the Linux leg (matrix field absent) — harmless, ignored off-macOS. + MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_deployment_target }} with: target: ${{ matrix.target }} args: --release --out dist -m cortex-python/Cargo.toml