Skip to content

ci: publish macOS x86_64 wheel#661

Merged
qing-ant merged 2 commits intomainfrom
qing/macos-x86-wheel
Mar 9, 2026
Merged

ci: publish macOS x86_64 wheel#661
qing-ant merged 2 commits intomainfrom
qing/macos-x86-wheel

Conversation

@qing-ant
Copy link
Copy Markdown
Contributor

@qing-ant qing-ant commented Mar 9, 2026

Summary

Adds macos-15-intel to the wheel build matrix so a macosx_11_0_x86_64 wheel is published alongside the existing macosx_11_0_arm64 wheel.

Why

Users running x86_64 Python on macOS (Intel Macs or arm64 via Rosetta) currently fall back to the sdist, which does not include the bundled CLI binary — causing version skew between dev and prod.

Change

One line — the rest of the pipeline already handles x86_64 macOS:

  • scripts/build_wheel.py already returns macosx_11_0_x86_64 for Darwin/x86_64
  • scripts/download_cli.py uses the install script which detects arch via uname -m
  • The CLI distribution already ships a darwin-x64 binary

Notes

  • Uses macos-15-intel (not macos-13 as originally suggested — that runner was retired Dec 2025). macos-15-intel is GitHub's last x86_64 macOS image, available through Aug 2027.
  • After Aug 2027, universal2 wheels (via lipo) would be the only option, but by then x86_64 macOS usage should be negligible.

Fixes #645

qing-ant added 2 commits March 9, 2026 15:19
Publishes a macosx_11_0_x86_64 wheel so users running x86_64 Python
on macOS (including via Rosetta) get the bundled CLI binary instead
of falling back to the sdist.

Uses macos-15-intel (GitHub's last x86_64 macOS runner, available
through Aug 2027). The build script and install script already
handle the x86_64 path correctly — no other changes needed.

Fixes #645
- Unit tests for get_platform_tag() covering all (system, machine)
  combinations we publish wheels for
- PR-triggered workflow (build-wheel-check.yml) that dry-runs the full
  build matrix whenever build scripts or pyproject.toml change:
  verifies wheel filename, wheel contains bundled CLI, and the
  installed package can locate it
- verify-matrix-sync job guards against check/publish matrix drift
- Pre-upload assertion in build-and-publish.yml that all 5 expected
  platform wheels are present before twine upload
- RELEASING.md updated with explicit wheel-target table
@qing-ant qing-ant enabled auto-merge (squash) March 9, 2026 22:38
@qing-ant qing-ant merged commit 9ee7c9a into main Mar 9, 2026
15 checks passed
@qing-ant qing-ant deleted the qing/macos-x86-wheel branch March 9, 2026 22:39
qing-ant added a commit that referenced this pull request Mar 12, 2026
Follow-up to #661 — makes the wheels built by the PR check downloadable
for local inspection. 7-day retention.
qing-ant added a commit that referenced this pull request Mar 24, 2026
## Context

The v0.1.50 publish hit 429s on `curl claude.ai/install.sh` across
multiple matrix jobs. The 5-target wheel matrix (since #661 added
`macos-15-intel`) fetches install.sh in parallel, and curl's 429 was
silently swallowed by `| bash` without `pipefail` — subprocess.run
reported success but the CLI was never installed, surfacing later as
"Could not find installed Claude CLI binary".

This has never completed a real publish since #661 — v0.1.48 (last
green, 3/07) predates the 5th matrix target. Today's run required manual
re-runs to get through.

## Changes

- `curl --retry 5 --retry-delay 2 --retry-all-errors` handles 429/5xx on
the outer install.sh fetch
- `set -o pipefail` propagates curl's exit through the pipe so
`check=True` catches it
- 0–5s random jitter staggers parallel matrix job starts
- 3-attempt outer retry with 2^n backoff as a final safety net (covers
failures inside install.sh too)

## Not in this PR

- Windows (`irm | iex`) has the same latent issue but hasn't bitten yet;
can follow up if needed
- `test-examples` `streaming_mode.py all` 120s timeout flake — separate
issue

---------

Co-authored-by: Claude <noreply@anthropic.com>
@mdjahid11978-design
Copy link
Copy Markdown

do all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish macOS x86_64 wheel (or universal2)

3 participants