Skip to content

ci: add PyPI nightly wheel publish to nightly workflow#327

Merged
jhchouuu merged 19 commits into
mainfrom
jiahzhou/nightly-pypi
May 20, 2026
Merged

ci: add PyPI nightly wheel publish to nightly workflow#327
jhchouuu merged 19 commits into
mainfrom
jiahzhou/nightly-pypi

Conversation

@jhchouuu
Copy link
Copy Markdown
Collaborator

@jhchouuu jhchouuu commented May 20, 2026

Summary

  • Build PyPI nightly wheels (amd_mori_nightly) alongside gh-pages wheels in build-wheel job
  • Retag wheels from linux_x86_64 to manylinux platform tag (no bundled system libs)
  • Add test-pypi-wheel stage: install and verify PyPI wheel after gh-pages tests pass
  • Add publish-pypi stage: upload to PyPI using PYPI_API_TOKEN secret
  • Same-day re-runs skip upload via --skip-existing

User install:

pip install --pre amd-mori-nightly

jhchouuu added 19 commits May 20, 2026 03:45
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.
@jhchouuu jhchouuu merged commit ef6c37f into main May 20, 2026
11 checks passed
@jhchouuu jhchouuu deleted the jiahzhou/nightly-pypi branch May 20, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant