forked from tensorflow/tensorboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
105 lines (94 loc) · 2.73 KB
/
.travis.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
dist: trusty
sudo: required
language: python
python:
- "2.7"
- "3.4"
os:
- linux
branches:
only:
- master
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
env:
- BAZEL=0.5.1 TF=NIGHTLY
cache:
directories:
- $HOME/.bazel-output-base
before_install:
- |
set -e
BAZEL_URL="https://github.com/bazelbuild/bazel/releases/download/${BAZEL}/bazel-${BAZEL}-installer-linux-x86_64.sh"
wget -t 3 -O install.sh "${BAZEL_URL}"
chmod +x install.sh
./install.sh --user
rm -f install.sh
case "${TF}" in
RELEASE)
pip install -I tensorflow
;;
NIGHTLY)
if [[ "${TRAVIS_PYTHON_VERSION}" == 2* ]]; then
NIGHTLY_URL='https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.head-cp27-none-linux_x86_64.whl'
else
NIGHTLY_URL='https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.head-cp34-cp34m-linux_x86_64.whl'
fi
pip install -I "${NIGHTLY_URL}"
;;
*)
pip install -I tensorflow=="${TF}"
;;
esac
pip install pylint
pip install futures==3.1.1
pip install grpcio==1.4.0
script:
- |
bazel \
--output_base="${HOME}/.bazel-output-base" \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
build \
tensorboard/... \
--worker_verbose \
--verbose_failures \
--spawn_strategy=sandboxed \
--genrule_strategy=sandboxed \
--local_resources=400,2,1.0 \
--worker_max_instances=2 \
--strategy=Javac=worker \
--strategy=Closure=worker
- |
bazel \
--output_base="${HOME}/.bazel-output-base" \
--batch \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
test \
tensorboard/... \
--verbose_failures \
--test_verbose_timeout_warnings \
--test_output=errors \
--spawn_strategy=sandboxed \
--local_resources=400,2,1.0
- |
TB=$(pwd)
cd bazel-genfiles
find tensorboard -name \*.py -exec cp {} "$TB"/{} \;
cd "$TB"
pylint tensorboard
before_cache:
- |
find "${HOME}/.bazel-output-base" \
-name \*.runfiles -print0 \
-or -name \*.tar.gz -print0 \
-or -name \*-execroot.json -print0 \
-or -name \*-tsc.json -print0 \
-or -name \*-params.pbtxt -print0 \
-or -name \*-args.txt -print0 \
-or -name \*.runfiles_manifest -print0 \
-or -name \*.server_params.pbtxt -print0 \
| xargs -0 rm -rf
notifications:
email: false