13
13
branches :
14
14
- master
15
15
- r*
16
+ schedule :
17
+ - cron : ' 0 0 * * *'
16
18
17
19
env :
18
20
BAZEL_VERSION : 1.1.0
31
33
name : Build release wheels for manylinux2010
32
34
runs-on : ubuntu-18.04
33
35
steps :
36
+ - if : github.event_name == 'schedule'
37
+ run : echo "::set-env name=NIGHTLY_FLAG::--nightly"
34
38
- uses : actions/checkout@v2
35
39
- uses : actions/setup-python@v1
36
40
with :
39
43
run : |
40
44
docker run -e TF_NEED_CUDA=1 -v ${PWD}:/addons -w /addons \
41
45
tensorflow/tensorflow:2.1.0-custom-op-gpu-ubuntu16 \
42
- tools/ci_build/builds/release_linux.sh
46
+ tools/ci_build/builds/release_linux.sh $NIGHTLY_FLAG
43
47
44
48
sudo apt-get install patchelf
45
49
python3 -m pip install -U auditwheel==2.0.0
@@ -61,12 +65,14 @@ jobs:
61
65
matrix :
62
66
python-version : ['3.5', '3.6', '3.7']
63
67
steps :
68
+ - if : github.event_name == 'schedule'
69
+ run : echo "::set-env name=NIGHTLY_FLAG::--nightly"
64
70
- uses : actions/checkout@v2
65
71
- uses : actions/setup-python@v1
66
72
with :
67
73
python-version : ${{ matrix.python-version }}
68
74
- name : Build macOS wheels
69
- if : github.event_name == 'release' || matrix.python-version == '3.5'
75
+ if : github.event_name == 'schedule' || github.event_name == ' release' || matrix.python-version == '3.5'
70
76
run : |
71
77
python3 --version
72
78
python3 -m pip install delocate wheel setuptools
@@ -84,12 +90,12 @@ jobs:
84
90
--test_output=errors \
85
91
build_pip_pkg
86
92
87
- bazel-bin/build_pip_pkg artifacts
93
+ bazel-bin/build_pip_pkg artifacts $NIGHTLY_FLAG
88
94
for f in artifacts/*.whl; do
89
95
delocate-wheel -w wheelhouse $f
90
96
done
91
97
- uses : actions/upload-artifact@v1
92
- if : github.event_name == 'release' || matrix.python-version == '3.5'
98
+ if : github.event_name == 'schedule' || github.event_name == ' release' || matrix.python-version == '3.5'
93
99
with :
94
100
name : ${{ runner.os }}-wheels
95
101
path : wheelhouse
@@ -101,6 +107,8 @@ jobs:
101
107
matrix :
102
108
python-version : ['3.5', '3.6', '3.7']
103
109
steps :
110
+ - if : github.event_name == 'schedule'
111
+ run : echo "::set-env name=NIGHTLY_FLAG::--nightly"
104
112
- uses : actions/checkout@v2
105
113
- uses : actions/setup-python@v1
106
114
with :
@@ -110,7 +118,7 @@ jobs:
110
118
TF_NEED_CUDA : 0
111
119
BAZEL_VC : " C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/"
112
120
shell : bash
113
- if : github.event_name == 'release' || matrix.python-version == '3.5'
121
+ if : github.event_name == 'schedule' || github.event_name == ' release' || matrix.python-version == '3.5'
114
122
run : |
115
123
python -m pip install wheel setuptools
116
124
curl -sSOL https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-windows-x86_64.exe
@@ -125,16 +133,16 @@ jobs:
125
133
--verbose_failures \
126
134
--test_output=errors \
127
135
build_pip_pkg
128
- bazel-bin/build_pip_pkg artifacts
136
+ bazel-bin/build_pip_pkg artifacts $NIGHTLY_FLAG
129
137
- uses : actions/upload-artifact@v1
130
- if : github.event_name == 'release' || matrix.python-version == '3.5'
138
+ if : github.event_name == 'schedule' || github.event_name == ' release' || matrix.python-version == '3.5'
131
139
with :
132
140
name : ${{ runner.os }}-wheels
133
141
path : artifacts
134
142
135
143
upload-wheels :
136
144
name : Publish wheels to PyPi
137
- needs : [manylinux-release-wheel, macos-release-wheel, windows-release-wheel]
145
+ needs : [manylinux-release-wheel, macos-release-wheel, windows-release-wheel, manylinux-cpu-release-test ]
138
146
runs-on : ubuntu-18.04
139
147
steps :
140
148
- uses : actions/download-artifact@v1
@@ -158,7 +166,7 @@ jobs:
158
166
ls -la dist/
159
167
sha256sum dist/*.whl
160
168
- uses : pypa/gh-action-pypi-publish@master
161
- if : github.event_name == 'release'
169
+ if : github.event_name == 'schedule' || github.event_name == ' release'
162
170
with :
163
171
user : __token__
164
- password : ${{ secrets.pypi_token }}
172
+ password : ${{ secrets.pypi_token }}
0 commit comments