forked from autogluon/autogluon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
64 lines (61 loc) · 2.36 KB
/
Jenkinsfile
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
max_time = 180
stage("Unit Test") {
node('linux-gpu') {
ws('workspace/autugluon-py3') {
timeout(time: max_time, unit: 'MINUTES') {
checkout scm
VISIBLE_GPU=env.EXECUTOR_NUMBER.toInteger() % 8
sh """#!/bin/bash
set -ex
conda env update -n autogluon_py3 -f docs/build.yml
conda activate autogluon_py3
conda list
export CUDA_VISIBLE_DEVICES=${VISIBLE_GPU}
env
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64
export MPLBACKEND=Agg
export MXNET_CUDNN_AUTOTUNE_DEFAULT=0
pip install --force-reinstall --upgrade gluonnlp==0.8.1
pip install --upgrade --force-reinstall -e .
pip install pytest
python3 -m pytest --junitxml=results.xml --runslow tests
"""
}
}
}
}
stage("Build Docs") {
node('linux-gpu') {
ws('workspace/autogluon-docs') {
timeout(time: max_time, unit: 'MINUTES') {
checkout scm
VISIBLE_GPU=env.EXECUTOR_NUMBER.toInteger() % 8
sh """#!/bin/bash
set -ex
conda env update -n autogluon_docs -f docs/build_contrib.yml
conda activate autogluon_docs
conda list
export CUDA_VISIBLE_DEVICES=${VISIBLE_GPU}
env
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64
export AG_DOCS=1
git clean -fx
pip install git+https://github.com/zhanghang1989/d2l-book
pip install --force-reinstall --upgrade gluonnlp==0.8.1
pip install --upgrade --force-reinstall -e .
cd docs && bash build_doc.sh
if [[ ${env.BRANCH_NAME} == master ]]; then
aws s3 sync --delete _build/html/ s3://autogluon.mxnet.io/ --acl public-read --cache-control max-age=7200
echo "Uploaded doc to http://autogluon.mxnet.io"
else
aws s3 sync --delete _build/html/ s3://autogluon-staging/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/ --acl public-read
echo "Uploaded doc to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/index.html"
fi
"""
if (env.BRANCH_NAME.startsWith("PR-")) {
pullRequest.comment("Job ${env.BRANCH_NAME}-${env.BUILD_NUMBER} is done. \nDocs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/index.html")
}
}
}
}
}