ci(ffi): cross-platform Python wheels + PyPI publishing - #229
Draft
Nic-dorman wants to merge 2 commits into
Draft
Conversation
Adds the release pipeline for the ant-ffi Python bindings: reproducible per-platform wheel builds and a publish workflow using PyPI Trusted Publishing (OIDC, no stored token). Build scripts (single source of truth — CI runs the same script a developer runs locally): - build-wheel-manylinux.sh compiles the native lib inside a manylinux_2_28 container (glibc 2.28) so the wheel installs on RHEL8 / Ubuntu 20.04+ / Debian 10+; auditwheel verifies + retags. Arg: x86_64 | aarch64. - build-wheel-macos.sh builds arm64 + x86_64, lipo-fuses to a universal2 wheel (deployment target 11.0); delocate verifies self-contained. - build-wheel-windows.ps1 native x86_64 DLL; delvewheel bundles non-system DLLs. Workflow (publish-python.yml): - Matrix: linux x86_64 (ubuntu-latest), linux aarch64 (ubuntu-24.04-arm, native — no QEMU), macOS universal2 (macos-latest), windows amd64. - Triggers: push tag `python-v<ver>` -> build+publish to PyPI; or manual dispatch with publish=none|testpypi|pypi (none = matrix smoke test). - Publishes via OIDC (id-token) into a GitHub environment (pypi/testpypi). Proven locally: linux-x86_64 and macOS-universal2 wheels build, are auditwheel/delocate-honest, and install + run in clean environments (incl. debian:11 / glibc 2.31). linux-aarch64 and Windows validate on first CI dispatch (no local hardware for either). Before the first publish, a maintainer must create the GitHub environments and register the PyPI/TestPyPI pending publisher (project ant-ffi, owner WithAutonomi, repo ant-sdk, workflow publish-python.yml). The workflow is inert until then (only runs on a python-v* tag or manual dispatch). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
The release pipeline for the Python bindings added in #228: reproducible per-platform wheel builds + publishing via PyPI Trusted Publishing (OIDC, no stored token).
Build scripts
CI runs the same script a developer runs locally — one source of truth:
build-wheel-manylinux.sh— compiles the native lib inside amanylinux_2_28container (glibc 2.28) so the wheel installs on RHEL8 / Ubuntu 20.04+ / Debian 10+;auditwheelverifies + retags. Arg:x86_64|aarch64.build-wheel-macos.sh— builds arm64 + x86_64,lipo-fuses to a universal2 wheel (deployment target 11.0);delocateverifies self-contained.build-wheel-windows.ps1— native x86_64 DLL;delvewheelbundles non-system DLLs.Workflow (
publish-python.yml)ubuntu-latest), linux aarch64 (ubuntu-24.04-arm, native — no QEMU), macOS universal2 (macos-latest), windows amd64.python-v<ver>→ build + publish to PyPI; or manual dispatch withpublish = none | testpypi | pypi(none= matrix smoke test, no upload).pypi/testpypi).Proven
debian:11/ glibc 2.31).Before first publish (maintainer action)
pypiandtestpypi.ant-ffi, ownerWithAutonomi, repoant-sdk, workflowpublish-python.yml, environmentpypi/testpypi.The workflow is inert until then (only runs on a
python-v*tag or manual dispatch). Suggested first run: dispatch withpublish=testpypito exercise the full matrix end-to-end.🤖 Generated with Claude Code