1212 options :
1313 - nightly
1414 - release
15- ref :
16- description : ' Branch or tag name'
17- required : false
18- default : ' main'
1915
2016jobs :
2117 build-and-publish :
22- runs-on : ubuntu-latest
18+ runs-on : linux.g5.12xlarge.nvidia.gpu
2319 steps :
2420 - uses : actions/checkout@v3
25- with :
26- ref : ${{ github.event.inputs.ref }}
2721 - name : Set up Python
2822 uses : actions/setup-python@v4
2923 with :
@@ -33,14 +27,32 @@ jobs:
3327 python -m pip install --upgrade pip
3428 pip install setuptools wheel twine
3529 pip install -r requirements.txt
30+
31+ - uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
32+ with :
33+ runner : ${{ matrix.runs-on }}
34+ gpu-arch-type : " cuda"
35+ gpu-arch-version : " 12.1"
36+ script : |
37+ conda create -n venv python=3.9 -y
38+ conda activate venv
39+ echo "::group::Install newer objcopy that supports --set-section-alignment"
40+ yum install -y devtoolset-10-binutils
41+ export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
42+ python -m pip install --upgrade pip
43+ pip install torch
44+ pip install -r requirements.txt
45+ pip install -r dev-requirements.txt
46+
3647 - name : Build package
3748 run : |
3849 if [ "${{ github.event_name }}" = "schedule" ]; then
3950 export TORCHAO_NIGHTLY=1
4051 elif [ "${{ github.event.inputs['build-type'] }}" = "nightly" ]; then
4152 export TORCHAO_NIGHTLY=1
4253 fi
43- pip install .
54+ python setup.py sdist bdist_wheel
55+ pytest test --verbose -s
4456 - name : Publish package to PyPI
4557 uses : pypa/gh-action-pypi-publish@release/v1
4658 with :
@@ -49,11 +61,11 @@ jobs:
4961 repository_url : https://upload.pypi.org/legacy/
5062 packages_dir : dist/
5163
52- - name : Open issue on failure
53- if : ${{ failure() && github.event_name == 'schedule' }}
54- uses : dacbd/create-issue-action@v1
55- with :
56- token : ${{ secrets.GITHUB_TOKEN }}
57- title : Nightly Build failed
58- body : Commit ${{ github.sha }} daily scheduled [CI run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed, please check why
59- assignees : ' '
64+ # - name: Open issue on failure
65+ # if: ${{ failure() && github.event_name == 'schedule' }}
66+ # uses: dacbd/create-issue-action@v1
67+ # with:
68+ # token: ${{ secrets.GITHUB_TOKEN }}
69+ # title: Nightly Build failed
70+ # body: Commit ${{ github.sha }} daily scheduled [CI run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed, please check why
71+ # assignees: ''
0 commit comments