4
4
types : [opened, synchronize, reopened]
5
5
push :
6
6
branches :
7
- - release/0.2
7
+ - main
8
8
9
9
jobs :
10
10
@@ -13,43 +13,31 @@ jobs:
13
13
container : pytorch/manylinux-cpu
14
14
strategy :
15
15
matrix :
16
- python_version : [["3.7", "cp37-cp37m"], ["3.8", " cp38-cp38"], ["3.9", " cp39-cp39"], ["3.10", "cp310-cp310"] ]
16
+ python_abi : [ "cp37-cp37m", " cp38-cp38", " cp39-cp39" ]
17
17
steps :
18
18
- name : Checkout functorch
19
19
uses : actions/checkout@v2
20
- - name : Install PyTorch 1.12 RC
20
+ - name : Install PyTorch Nightly
21
21
run : |
22
- export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH"
23
- python3 -mpip install --pre torch~ =1.12 -f https://download.pytorch.org/whl/test /cpu/torch_test .html
22
+ export PATH="/opt/python/${{ matrix.python_abi }}/bin:$PATH"
23
+ python3 -mpip install --pre torch> =1.12.0.dev -f https://download.pytorch.org/whl/nightly /cpu/torch_nightly .html
24
24
- name : Build wheel
25
25
run : |
26
- export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH"
26
+ export PATH="/opt/python/${{ matrix.python_abi }}/bin:$PATH"
27
27
python3 -mpip install wheel
28
28
python3 setup.py bdist_wheel
29
- # NB: wheels have the linux_x86_64 tag so we rename to manylinux1
30
- find . -name 'dist/*whl' -exec bash -c ' mv $0 ${0/linux/manylinux1}' {} \;
31
- # pytorch/pytorch binaries are also manylinux_2_17 compliant but they
32
- # pretend that they're manylinux1 compliant so we do the same.
33
- - name : Show auditwheel output; confirm 2-17
34
- run : |
35
- python3 -mpip install auditwheel
36
- auditwheel show dist/*
37
- - name : Upload wheel for the test-wheel job
38
- uses : actions/upload-artifact@v2
39
- with :
40
- name : functorch-linux-${{ matrix.python_version[0] }}.whl
41
- path : dist/*.whl
42
- - name : Upload wheel for download
29
+ # NB: wheels have the linux_x86_64 prefix, need to be manually renamed
30
+ - name : Upload wheel as GHA artifact
43
31
uses : actions/upload-artifact@v2
44
32
with :
45
- name : functorch-batch .whl
33
+ name : functorch-linux .whl
46
34
path : dist/*.whl
47
35
48
36
build-wheel-mac :
49
37
runs-on : macos-latest
50
38
strategy :
51
39
matrix :
52
- python_version : [ "3.7", "3.8", "3.9", "3.10" ]
40
+ python_version : [ "3.7", "3.8", "3.9" ]
53
41
steps :
54
42
- name : Setup Python
55
43
uses : actions/setup-python@v2
@@ -58,69 +46,16 @@ jobs:
58
46
architecture : x64
59
47
- name : Checkout functorch
60
48
uses : actions/checkout@v2
61
- - name : Install PyTorch 1.12 RC
49
+ - name : Install PyTorch Nightly
62
50
run : |
63
- python3 -mpip install --pre torch~ =1.12 -f https://download.pytorch.org/whl/test /cpu/torch_test .html
51
+ python3 -mpip install --pre torch> =1.12.0.dev -f https://download.pytorch.org/whl/nightly /cpu/torch_nightly .html
64
52
- name : Build wheel
65
53
run : |
66
54
export CC=clang CXX=clang++
67
55
python3 -mpip install wheel
68
56
python3 setup.py bdist_wheel
69
- - name : Upload wheel for the test-wheel job
70
- uses : actions/upload-artifact@v2
71
- with :
72
- name : functorch-mac-${{ matrix.python_version }}.whl
73
- path : dist/*.whl
74
- - name : Upload wheel for download
57
+ - name : Upload wheel as GHA artifact
75
58
uses : actions/upload-artifact@v2
76
59
with :
77
- name : functorch-batch .whl
60
+ name : functorch-mac .whl
78
61
path : dist/*.whl
79
-
80
- test-wheel :
81
- needs : [build-wheel-linux, build-wheel-mac]
82
- strategy :
83
- matrix :
84
- os : [["linux", "ubuntu-18.04"], ["mac", "macos-latest"]]
85
- python_version : [ "3.7", "3.8", "3.9", "3.10" ]
86
- runs-on : ${{ matrix.os[1] }}
87
- steps :
88
- - name : Setup Python
89
- uses : actions/setup-python@v2
90
- with :
91
- python-version : ${{ matrix.python_version }}
92
- architecture : x64
93
- - name : Checkout functorch
94
- uses : actions/checkout@v2
95
- - name : Install PyTorch 1.12 RC
96
- run : |
97
- python3 -mpip install --pre torch~=1.12 -f https://download.pytorch.org/whl/test/cpu/torch_test.html
98
- - name : Upgrade pip
99
- run : |
100
- python3 -mpip install --upgrade pip
101
- - name : Install test dependencies
102
- run : |
103
- python3 -mpip install numpy pytest pytest-cov codecov unittest-xml-reporting pillow>=4.1.1 scipy av networkx expecttest pyyaml
104
- - name : Download built wheels
105
- uses : actions/download-artifact@v2
106
- with :
107
- name : functorch-${{ matrix.os[0] }}-${{ matrix.python_version }}.whl
108
- path : /tmp/wheels
109
- - name : Install built wheels
110
- run : |
111
- python3 -mpip install /tmp/wheels/*
112
- - name : Log version string
113
- run : |
114
- # Avoid ambiguity of "import functorch" by deleting the source files.
115
- rm -rf functorch/
116
- python -c "import functorch; print(functorch.__version__)"
117
- - name : Run tests
118
- run : |
119
- set -e
120
- export IN_CI=1
121
- mkdir test-reports
122
- python -m torch.utils.collect_env
123
- python -c "import functorch; print(functorch.__version__)"
124
- EXIT_STATUS=0
125
- find test \( -name test\*.py ! -name test_functorch_lagging_op_db.py \) | xargs -I {} -n 1 python {} -v || EXIT_STATUS=$?
126
- exit $EXIT_STATUS
0 commit comments