Skip to content

Commit dfb64be

Browse files
committed
ci(release-readiness): static abi3 audit on every wheel
## Purpose The wheel is built `cp310-abi3`, promising it uses only CPython's stable ABI (PEP 384) and works on any CPython 3.10+. If a Rust dependency or PyO3 macro accidentally pulls in a non-stable-ABI symbol, the wheel imports fine on the Python it was built against but breaks at runtime on other 3.x versions. This catches that before a release. ## Solution Added an `abi3audit` step to every leg of `cross-platform-build`, running immediately after `Validate wheel built`. Uses `python -m abi3audit --strict --report dist/*.whl` with the `--strict` flag so any non-stable- ABI symbol is a hard failure. Uses `python` (not `python3`) for Windows compatibility. Runs unconditionally on all 7 build targets since abi3audit reads any wheel format (ELF/Mach-O/PE) regardless of the host OS. ## Follow-ups Manual trigger required to verify all 7 legs pass (CI-0025 step 6): `gh workflow run "Release Readiness" --ref main --field skip_integration=true`
1 parent 703b688 commit dfb64be

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/release-readiness.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,19 @@ jobs:
399399
exit 1
400400
fi
401401
402+
# abi3audit parses the compiled extension inside the wheel and flags any CPython
403+
# symbols that aren't part of the stable ABI (PEP 384). A cp310-abi3-tagged wheel
404+
# that pulls in a non-stable-ABI symbol imports fine on the build Python but breaks
405+
# at runtime on other 3.x versions. This is the static complement to multi-python
406+
# smoke tests: the smoke tests exercise the wheel; abi3audit proves it is valid by
407+
# inspection. Runs on every OS and reads any wheel format (ELF/Mach-O/PE).
408+
- name: abi3audit
409+
shell: bash
410+
run: |
411+
set -euo pipefail
412+
python -m pip install --quiet abi3audit
413+
python -m abi3audit --strict --report dist/*.whl
414+
402415
# auditwheel show inspects ELF binaries inside each manylinux wheel and reports
403416
# the actual minimum glibc version. A wheel tagged manylinux_2_17 but linking
404417
# newer symbols would silently break users on older systems; this catches that

0 commit comments

Comments
 (0)