-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: PyPI Nightly Build | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Runs at midnight UTC every day | ||
workflow_dispatch: | ||
|
||
### Comment this out before merge | ||
push: | ||
branches: | ||
- main | ||
### | ||
|
||
jobs: | ||
build-and-publish: | ||
- uses: pytorch/test-infra/.github/workflows/linux_job.yml@main | ||
with: | ||
runner: "linux.g5.12xlarge.nvidia.gpu" | ||
gpu-arch-type: "cuda" | ||
gpu-arch-version: "12.1" | ||
script: | | ||
conda create -n venv python=3.9 -y | ||
conda activate venv | ||
echo "::group::Install newer objcopy that supports --set-section-alignment" | ||
yum install -y devtoolset-10-binutils | ||
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
pip install torch | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
export TORCHAO_NIGHTLY=1 | ||
python setup.py sdist bdist_wheel | ||
pytest test --verbose -s | ||
REPOSITORY_URL="https://upload.pypi.org/legacy/" | ||
twine upload --repository-url $REPOSITORY_URL -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} dist/ |