fix: publish ARM64 local-mode wheels - #359
Open
abhinavkr26104 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Pub as publish-pypi.yml
participant GH as GitHub Actions Matrix
participant DL as download-binary.py
participant PKG as Packaging (wheel build)
participant PYPI as PyPI
participant CLI as Client Install/Resolve
participant SEA as stagehand/_sea/binary resolution
Note over Pub,PYPI: NEW: ARM64 Wheel Build & Publish Pipeline
Pub->>GH: Define wheel targets (x64 + NEW: ARM64)
GH->>GH: Iterate matrix entries (linux-x64, linux-arm64, macos, win-x64, win-arm64)
loop Each matrix entry
GH->>GH: runs-on hosted x64 runner (any OS)
GH->>DL: download binary (binary_name)
alt NEW: ARM64 targets
DL-->>GH: stagehand-linux-arm64 OR stagehand-win32-arm64.exe
else Existing x64
DL-->>GH: stagehand-linux-x64 OR stagehand-win32-x64.exe
end
GH->>PKG: Place binary in src/stagehand/_sea/
PKG->>PKG: Set wheel_platform_tag (manylinux2014_aarch64 / win_arm64)
PKG->>PKG: Build pure-Python wheel (binary not executed)
PKG->>PYPI: Publish platform-tagged wheel
end
Note over CLI,SEA: Runtime Resolution (unchanged logic, NEW: filenames)
CLI->>SEA: Resolve binary for current platform
SEA->>SEA: Determine sys.platform + machine
alt linux + aarch64
SEA->>SEA: default_binary_filename() = stagehand-linux-arm64
else linux + x86_64
SEA->>SEA: default_binary_filename() = stagehand-linux-x64
else win32 + ARM64
SEA->>SEA: default_binary_filename() = stagehand-win32-arm64.exe
else win32 + AMD64
SEA->>SEA: default_binary_filename() = stagehand-win32-x64.exe
end
SEA->>PYPI: Fetch matching platform-tagged wheel
PYPI-->>SEA: Wheel with bundled SEA binary
SEA-->>CLI: Ready for use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The packaging jobs only download and bundle architecture-specific assets, so the existing hosted x64 runners can produce these pure-Python platform-tagged wheels without executing the bundled binary.
Testing
uv run --frozen pytest tests/test_sea_binary.py -q(8 passed)uv run --frozen ruff check .uv run --frozen pyright -p .uv run --frozen mypy --platform linux .Fixes #352
Summary by cubic
Publishes ARM64 wheels for Linux and Windows in local mode. Previously we only shipped x64 wheels; now we also build manylinux2014_aarch64 and win_arm64 to enable ARM64 installs without source builds.
Written for commit 5f95115. Summary will update on new commits.