Build release wheels on native ARM runner (drop QEMU); publish one GitHub release#72
Merged
Merged
Conversation
Coverage Report for CI Build 27528562816Warning No base build found for commit Coverage: 94.387%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
Speed: add a native ubuntu-22.04-arm runner (free for public repos) and set [tool.cibuildwheel.linux] archs=auto64, so each runner builds only its native arch. aarch64 wheels build natively instead of under ~10x-slower QEMU emulation (the ~1h aarch64 leg drops to ~10-15 min); the Set-up-QEMU step is removed. Same target artifacts (manylinux/musllinux aarch64/x86_64), built natively instead of under emulation rather than byte-for-byte identical. Structure: move the GitHub-release asset upload out of each matrix wheel job into a single publish-github-release job that runs after the builds. The release is published from one job (single-writer, not transactional) with the complete asset set (wheels + sdist) instead of four jobs racing, and the builders drop to contents: read. That job depends on the build jobs, NOT on publish-to-pypi, so a PyPI upload failure still leaves a downloadable GitHub release. fail_on_unmatched_files guards the upload glob. Also drop the unused id-token: write from publish-to-pypi (it uses a token, not OIDC trusted publishing) and correct the comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
676dd77 to
362a201
Compare
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.
Follow-up to #71. CI improvement — same target artifacts (built natively
instead of under emulation), just faster and with a cleaner release flow. Not
urgent (0.3.0 already shipped); benefits the next release.
Speed: native ARM instead of QEMU
The release built aarch64 Linux wheels by emulating aarch64 on the single
x86_64
ubuntu-22.04runner (theSet up QEMUstep), making that leg take~1h. This adds a native
ubuntu-22.04-armrunner (free for publicrepos) and sets
[tool.cibuildwheel.linux] archs = "auto64"so each runnerbuilds only its native arch. QEMU step removed. Expected: ~10–15 min.
Wheels are functionally equivalent for the same target tags (not asserting
byte-for-byte equality). macOS unchanged (
macos-14builds arm64 natively +cross-builds x86_64; no Intel mac runner exists anymore).
Structure: one GitHub-release job, decoupled from PyPI
Previously every matrix wheel job ran its own
action-gh-releasestep — fourjobs racing to create/update the same release, each needing
contents: write.This moves it into a single
publish-github-releasejob after the buildsthat uploads the complete asset set (wheels + sdist) in one shot; builders
drop to
contents: read. It's single-writer, not transactional — amid-upload failure can still leave a partial release (re-run to finish);
fail_on_unmatched_files: trueguards against an empty glob.Review-feedback decisions
publish-github-releasedeliberately depends on[build_wheels, build_sdist], notpublish-to-pypi, so a PyPI failurestill leaves a downloadable GitHub release (artifact fallback). If the team
prefers the invariant "a GitHub release means PyPI is live," flip it to
needs: [publish-to-pypi](or publish a draft first). Easy to change — saythe word.
id-token: writefrompublish-to-pypiand corrected the misleading "trusted publishing" comment — it's token-based
(
PYPI_TOKEN). Migrating to real OIDC trusted publishing (no long-livedtoken, more secure) is worth doing but needs PyPI-side config, so it's left
as a separate follow-up.
Validation
actions.ymlparses;fail_on_unmatched_filesconfirmed a real@v2input.Jobs = build_wheels / build_sdist / publish-to-pypi / publish-github-release;
matrix = ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-14. The native
ARM build + new release flow are only truly exercised by a
workflow_dispatchrun, so the real proof comes at the next release.
🤖 Generated with Claude Code