12
12
options :
13
13
- nightly
14
14
- release
15
- ref :
16
- description : ' Branch or tag name'
17
- required : false
18
- default : ' main'
19
15
20
16
jobs :
21
17
build-and-publish :
22
- runs-on : ubuntu-latest
18
+ runs-on : linux.g5.12xlarge.nvidia.gpu
23
19
steps :
24
20
- uses : actions/checkout@v3
25
- with :
26
- ref : ${{ github.event.inputs.ref }}
27
21
- name : Set up Python
28
22
uses : actions/setup-python@v4
29
23
with :
@@ -33,14 +27,32 @@ jobs:
33
27
python -m pip install --upgrade pip
34
28
pip install setuptools wheel twine
35
29
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
+
36
47
- name : Build package
37
48
run : |
38
49
if [ "${{ github.event_name }}" = "schedule" ]; then
39
50
export TORCHAO_NIGHTLY=1
40
51
elif [ "${{ github.event.inputs['build-type'] }}" = "nightly" ]; then
41
52
export TORCHAO_NIGHTLY=1
42
53
fi
43
- pip install .
54
+ python setup.py sdist bdist_wheel
55
+ pytest test --verbose -s
44
56
- name : Publish package to PyPI
45
57
uses : pypa/gh-action-pypi-publish@release/v1
46
58
with :
@@ -49,11 +61,11 @@ jobs:
49
61
repository_url : https://upload.pypi.org/legacy/
50
62
packages_dir : dist/
51
63
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