forked from intel-analytics/ipex-llm
-
Notifications
You must be signed in to change notification settings - Fork 0
365 lines (312 loc) · 17.3 KB
/
nightly_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
name: Nightly Build
on:
schedule:
- cron: '0 12 * * *' # GMT time, 12:00 GMT == 20:00 China
workflow_dispatch:
inputs:
artifact:
description: 'select which job to run("all" will make all jobs run)'
required: true
default: 'all'
type: choice
options:
- all
- scala-build
- python-build
- python-sourceforge-build
- docker-bigdl-build
tag:
description: 'docker image tag (e.g. 2.1.0-SNAPSHOT)'
required: true
default: 'latest'
type: string
permissions:
contents: read
packages: write
jobs:
scala-build:
if: ${{ github.event.schedule || github.event.inputs.artifact == 'scala-build' || github.event.inputs.artifact == 'docker-bigdl-build' || github.event.inputs.artifact == 'all' }}
runs-on: [self-hosted, Linux, Bree]
steps:
- uses: actions/checkout@v3
- name: Set up JDK8
uses: ./.github/actions/jdk-setup-action
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: maven-
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.8.2
- name: Set up Maven Settings
uses: s4u/[email protected]
with:
sonatypeSnapshots: true
apacheSnapshots: true
servers: |
[{
"id": "central",
"configuration": {
"httpConfiguration": {
"all": {
"connectionTimeout": "3600000",
"readTimeout": "3600000"
}
}
}
},{
"id": "ossrh",
"username": "${{ secrets.OSSRH_USERNAME }}",
"password": "${{ secrets.OSSRH_PASSWORD }}",
"configuration": {
"timeout": "3600000"
}
}]
- name: Build with Maven
run: |
ls
#spark3.1.2
cp scala/pom.xml scala/pom.xml.origin
cp scala/common/spark-version/pom.xml scala/common/spark-version/pom.xml.origin
cp scala/common/spark-version/3.0/pom.xml scala/common/spark-version/3.0/pom.xml.origin
cp scala/dllib/pom.xml scala/dllib/pom.xml.origin
cp scala/orca/pom.xml scala/orca/pom.xml.origin
cp scala/friesian/pom.xml scala/friesian/pom.xml.origin
cp scala/grpc/pom.xml scala/grpc/pom.xml.origin
cp scala/serving/pom.xml scala/serving/pom.xml.origin
cp scala/ppml/pom.xml scala/ppml/pom.xml.origin
cp scala/assembly/pom.xml scala/assembly/pom.xml.origin
sed -i 's/<artifactId>${spark-version.project}<\/artifactId>/<artifactId>${spark-version.project}-${SPARK_PLATFORM}<\/artifactId>/' scala/dllib/pom.xml
sed -i 's/<artifactId>3.0<\/artifactId>/<artifactId>3.0-${SPARK_PLATFORM}<\/artifactId>/' scala/common/spark-version/3.0/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.2<\/artifactId>/' scala/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.2<\/artifactId>/' scala/common/spark-version/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.2<\/artifactId>/' scala/common/spark-version/3.0/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.2<\/artifactId>/' scala/dllib/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.2<\/artifactId>/' scala/orca/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.2<\/artifactId>/' scala/friesian/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.2<\/artifactId>/' scala/grpc/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.2<\/artifactId>/' scala/serving/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.2<\/artifactId>/' scala/ppml/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_3.1.2<\/artifactId>/' scala/assembly/pom.xml
mvn -Dhttp.proxyHost=${{ secrets.HTTP_PROXY_HOST_2 }} -Dhttp.proxyPort=${{ secrets.HTTP_PROXY_PORT_2 }} -Dhttps.proxyHost=${{ secrets.HTTP_PROXY_HOST_2 }} -Dhttps.proxyPort=${{ secrets.HTTP_PROXY_PORT_3 }} clean deploy -DskipTests -Dspark.version=3.1.2 -DSPARK_PLATFORM=SPARK_3.1 -P spark_3.x --file scala/pom.xml
mv scala/pom.xml.origin scala/pom.xml
mv scala/common/spark-version/pom.xml.origin scala/common/spark-version/pom.xml
mv scala/common/spark-version/3.0/pom.xml.origin scala/common/spark-version/3.0/pom.xml
mv scala/dllib/pom.xml.origin scala/dllib/pom.xml
mv scala/orca/pom.xml.origin scala/orca/pom.xml
mv scala/friesian/pom.xml.origin scala/friesian/pom.xml
mv scala/grpc/pom.xml.origin scala/grpc/pom.xml
mv scala/serving/pom.xml.origin scala/serving/pom.xml
mv scala/ppml/pom.xml.origin scala/ppml/pom.xml
mv scala/assembly/pom.xml.origin scala/assembly/pom.xml
#spark2.4.6
cp scala/pom.xml scala/pom.xml.origin
cp scala/common/spark-version/pom.xml scala/common/spark-version/pom.xml.origin
cp scala/common/spark-version/2.0/pom.xml scala/common/spark-version/2.0/pom.xml.origin
cp scala/dllib/pom.xml scala/dllib/pom.xml.origin
cp scala/orca/pom.xml scala/orca/pom.xml.origin
cp scala/friesian/pom.xml scala/friesian/pom.xml.origin
cp scala/grpc/pom.xml scala/grpc/pom.xml.origin
cp scala/serving/pom.xml scala/serving/pom.xml.origin
cp scala/ppml/pom.xml scala/ppml/pom.xml.origin
cp scala/assembly/pom.xml scala/assembly/pom.xml.origin
sed -i 's/<artifactId>${spark-version.project}<\/artifactId>/<artifactId>${spark-version.project}-${SPARK_PLATFORM}<\/artifactId>/' scala/dllib/pom.xml
sed -i 's/<artifactId>2.0<\/artifactId>/<artifactId>2.0-${SPARK_PLATFORM}<\/artifactId>/' scala/common/spark-version/2.0/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/common/spark-version/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/common/spark-version/2.0/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/dllib/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/orca/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/friesian/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/grpc/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/serving/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/ppml/pom.xml
sed -i 's/<artifactId>bigdl-parent-spark_${spark.version}<\/artifactId>/<artifactId>bigdl-parent-spark_2.4.6<\/artifactId>/' scala/assembly/pom.xml
mvn -Dhttp.proxyHost=${{ secrets.HTTP_PROXY_HOST_2 }} -Dhttp.proxyPort=${{ secrets.HTTP_PROXY_PORT_2 }} -Dhttps.proxyHost=${{ secrets.HTTP_PROXY_HOST_2 }} -Dhttps.proxyPort=${{ secrets.HTTP_PROXY_PORT_3 }} clean deploy -DskipTests -Dspark.version=2.4.6 -DSPARK_PLATFORM=SPARK_2.4 -P spark_2.x --file scala/pom.xml
mv scala/pom.xml.origin scala/pom.xml
mv scala/common/spark-version/pom.xml.origin scala/common/spark-version/pom.xml
mv scala/common/spark-version/2.0/pom.xml.origin scala/common/spark-version/2.0/pom.xml
mv scala/dllib/pom.xml.origin scala/dllib/pom.xml
mv scala/orca/pom.xml.origin scala/orca/pom.xml
mv scala/friesian/pom.xml.origin scala/friesian/pom.xml
mv scala/grpc/pom.xml.origin scala/grpc/pom.xml
mv scala/serving/pom.xml.origin scala/serving/pom.xml
mv scala/ppml/pom.xml.origin scala/ppml/pom.xml
mv scala/assembly/pom.xml.origin scala/assembly/pom.xml
docker-build-bigdl:
needs: scala-build
if: ${{ github.event.schedule || github.event.inputs.artifact == 'docker-bigdl-build' || github.event.inputs.artifact == 'all' }}
runs-on: [self-hosted, Shire]
steps:
- uses: actions/checkout@v3
- name: set env
env:
DEFAULT_TAG: 'latest'
run: |
echo "TAG=${{ github.event.inputs.bigdlTag || env.DEFAULT_TAG }} " >> $GITHUB_ENV
- name: docker login
run: |
docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD}
- name: docker deploy bigdl
run: |
export IMAGE=intelanalytics/bigdl
cd docker/bigdl
echo "########################################"
echo "################# bigdl 3.1.2 #######"
echo "########################################"
docker build \
--build-arg http_proxy=${HTTP_PROXY} \
--build-arg https_proxy=${HTTPS_PROXY} \
--build-arg SPARK_VERSION=3.1.2 \
--build-arg JDK_VERSION=8u192 \
--build-arg JDK_URL=${JDK_URL} \
--build-arg no_proxy=${NO_PROXY} \
--rm --no-cache -t $IMAGE-spark-3.1.2:${TAG} .
docker push ${IMAGE}-spark-3.1.2:${TAG}
docker tag ${IMAGE}-spark-3.1.2:${TAG} 10.239.45.10/arda/${IMAGE}-spark-3.1.2:${TAG}
docker push 10.239.45.10/arda/${IMAGE}-spark-3.1.2:${TAG}
docker rmi -f ${IMAGE}-spark-3.1.2:${TAG} 10.239.45.10/arda/${IMAGE}-spark-3.1.2:${TAG}
- name: docker deploy bigdl-k8s
run: |
cd docker/bigdl-k8s
export IMAGE=intelanalytics/bigdl-k8s
echo "########################################"
echo "################# bigdl-k8s 3.1.2 #######"
echo "########################################"
docker build \
--build-arg http_proxy=${HTTP_PROXY} \
--build-arg https_proxy=${HTTPS_PROXY} \
--build-arg SPARK_VERSION=3.1.2 \
--build-arg JDK_VERSION=8u192 \
--build-arg JDK_URL=${JDK_URL} \
--build-arg no_proxy=${NO_PROXY} \
--rm --no-cache -t ${IMAGE}-spark-3.1.2:${TAG} .
docker push ${IMAGE}-spark-3.1.2:${TAG}
docker tag ${IMAGE}-spark-3.1.2:${TAG} 10.239.45.10/arda/${IMAGE}-spark-3.1.2:${TAG}
docker push 10.239.45.10/arda/${IMAGE}-spark-3.1.2:${TAG}
docker rmi -f ${IMAGE}-spark-3.1.2:${TAG}
python-build:
if: ${{ github.event.schedule || github.event.inputs.artifact == 'python-build' || github.event.inputs.artifact == 'all' }}
runs-on: [self-hosted, ubuntu-20.04-lts, Bree]
steps:
- uses: actions/checkout@v3
- name: Set up JDK8
uses: ./.github/actions/jdk-setup-action
- name: Set up maven
uses: ./.github/actions/maven-setup-action
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install wheel
pip install twine
- name: Build package
run: |
export TIMESTAMP=`date '+%Y%m%d'`
export PYPI_VERSION=2.1.0
nb_version=${PYPI_VERSION}b${TIMESTAMP}
echo ${nb_version}
## windows ##
bash python/dev/release_default_windows.sh ${nb_version} false true
## linux ##
bash python/dev/release_default_linux.sh ${nb_version} true
## mac ##
bash python/dev/release_default_mac.sh ${nb_version} true
python-sourceforge-build:
if: ${{ github.event.schedule || github.event.inputs.artifact == 'python-sourceforge-build' || github.event.inputs.artifact == 'all' }}
runs-on: [self-hosted,alpha,Bree,ubuntu-20.04-lts]
steps:
- uses: actions/checkout@v3
- name: Set up JDK8
uses: ./.github/actions/jdk-setup-action
- name: Set up maven
uses: ./.github/actions/maven-setup-action
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install wheel
pip install twine
- name: Build package
run: |
export TIMESTAMP=`date '+%Y%m%d'`
export PYPI_VERSION=2.1.0
nb_version=${PYPI_VERSION}b${TIMESTAMP}
echo ${nb_version}
apt-get update
apt-get install sshpass
#spark2
## linux ##
bash python/dev/release_default_linux_spark246.sh ${nb_version} false false
# upload
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/dllib/src/dist/bigdl_dllib*-py3-none-manylinux1_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/dllib-py
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/orca/src/dist/bigdl_orca*-py3-none-manylinux1_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/orca-py
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/friesian/src/dist/bigdl_friesian*-py3-none-manylinux1_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/friesian-py
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/chronos/src/dist/bigdl_chronos*-py3-none-manylinux1_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/chronos-py
#sshpass -p 'abcd1234!@#$QWER' \
#scp ./python/serving/src/dist/bigdl_serving*-py2.py3-none-any.whl \
#[email protected]:/home/frs/project/analytics-zoo/cluster-serving-py
## mac ##
bash python/dev/release_default_mac_spark246.sh ${nb_version} false false
# upload
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/dllib/src/dist/bigdl_dllib*-py3-none-macosx_10_11_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/dllib-py
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/orca/src/dist/bigdl_orca*-py3-none-macosx_10_11_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/orca-py
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/friesian/src/dist/bigdl_friesian*-py3-none-macosx_10_11_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/friesian-py
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/chronos/src/dist/bigdl_chronos*-py3-none-macosx_10_11_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/chronos-py
#spark3
## linux ##
bash python/dev/release_default_linux_spark312.sh ${nb_version} false false
# upload
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/dllib/src/dist/bigdl_dllib*-py3-none-manylinux1_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/dllib-py-spark3
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/orca/src/dist/bigdl_orca*-py3-none-manylinux1_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/orca-py-spark3
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/friesian/src/dist/bigdl_friesian*-py3-none-manylinux1_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/friesian-py-spark3
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/chronos/src/dist/bigdl_chronos*-py3-none-manylinux1_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/chronos-py-spark3
## mac ##
bash python/dev/release_default_mac_spark312.sh ${nb_version} false false
# upload
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/dllib/src/dist/bigdl_dllib*-py3-none-macosx_10_11_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/dllib-py-spark3
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/orca/src/dist/bigdl_orca*-py3-none-macosx_10_11_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/orca-py-spark3
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/friesian/src/dist/bigdl_friesian*-py3-none-macosx_10_11_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/friesian-py-spark3
sshpass -p 'abcd1234!@#$QWER' \
scp ./python/chronos/src/dist/bigdl_chronos*-py3-none-macosx_10_11_x86_64.whl \
[email protected]:/home/frs/project/analytics-zoo/chronos-py-spark3