ci: add PyPI nightly wheel publish to nightly workflow#327
Merged
Conversation
Build two sets of wheels in build-wheel: - gh-pages wheel: amd_mori with version+sha, linux_x86_64 tag - PyPI wheel: amd_mori_nightly without +sha, auditwheel-repaired to manylinux tag New stages after promote-latest: - test-pypi-wheel: install PyPI wheel, verify import works - publish-pypi: upload to PyPI using PYPI_API_TOKEN secret Same-day re-runs gracefully skip PyPI upload (version already exists).
mori.ops loads GPU libraries that require /dev/kfd and /dev/dri. Without GPU device access the HIP runtime aborts on import.
auditwheel was running on the host (Ubuntu 22.04), bundling 22.04 system libs into the py3.12 wheel that was compiled on Ubuntu 24.04. This caused libpci version mismatch at import time. Run auditwheel inside the same $IMAGE container used for building, so bundled libs match the compilation environment.
auditwheel repair fails because mori's internal .so files reference each other and it can't locate them as external libraries. Since mori depends on ROCm system libraries anyway, just retag the platform from linux_x86_64 to manylinux_2_XX using wheel unpack/pack.
- twine 6.x rejects license-expression/license-file metadata from
older setuptools; pin to twine<6 until metadata is updated
- Use --skip-existing instead of || echo for cleaner error handling
- Keep PyPI version as dev${DATE} (no run number suffix)
wheel pack with old setuptools drops METADATA fields, causing twine to reject the wheel. Replace with direct zip manipulation that only modifies the WHEEL file's platform tag, preserving all other metadata.
Inline Python code broke YAML parsing (import at column 0 was parsed as a mapping key). Write the retag script to a temp file and mount it into the Docker container instead.
Re-enable test-wheel and test-wheel-internode (were disabled for PyPI publish flow validation). Restore promote-latest to gate on all tests passing.
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
amd_mori_nightly) alongside gh-pages wheels in build-wheel joblinux_x86_64tomanylinuxplatform tag (no bundled system libs)PYPI_API_TOKENsecret--skip-existingUser install: