This repository has been archived by the owner on May 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
/
.travis.yml
97 lines (81 loc) · 2.67 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
dist: trusty
sudo: required
language: python
python:
- "2.7"
- "3.6"
os:
- linux
branches:
only:
- master
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
env:
# Keep the BAZEL version in sync with one in
# https://github.com/tensorflow/tensorboard/blob/master/.travis.yml
- NAME=greeter_plugin BAZEL=0.16.1 TF=NIGHTLY
- NAME=greeter_tensorboard BAZEL=0.16.1 TF=NIGHTLY
cache:
directories:
- $HOME/.bazel-output-base
before_install:
- wget -t 3 -O bazel https://mirror.bazel.build/github.com/bazelbuild/bazel/releases/download/${BAZEL}/bazel-${BAZEL}-linux-x86_64
- chmod +x bazel
- sudo mv bazel /usr/local/bin
# Storing build artifacts in this directory helps Travis cache them. This
# will sometimes cut latency in half, when we're lucky.
- echo "startup --output_base=${HOME}/.bazel-output-base" >>~/.bazelrc
# Travis Trusty Sudo GCE VMs have 2 cores and 7.5 GB RAM. These settings
# help Bazel go faster and not OOM the system.
- echo "startup --host_jvm_args=-Xms500m" >>~/.bazelrc
- echo "startup --host_jvm_args=-Xmx500m" >>~/.bazelrc
- echo "startup --host_jvm_args=-XX:-UseParallelGC" >>~/.bazelrc
- echo "build --local_resources=400,2,1.0" >>~/.bazelrc
- echo "build --worker_max_instances=2" >>~/.bazelrc
# Make Bazel as strict as possible, so TensorBoard will build correctly
# for users, regardless of their Bazel configuration.
- echo "build --worker_verbose" >>~/.bazelrc
- echo "build --worker_sandboxing" >>~/.bazelrc
- echo "build --spawn_strategy=sandboxed" >>~/.bazelrc
- echo "build --genrule_strategy=sandboxed" >>~/.bazelrc
- echo "test --test_verbose_timeout_warnings" >>~/.bazelrc
# It's helpful to see the errors on failure.
- echo "build --verbose_failures" >>~/.bazelrc
- echo "test --test_output=errors" >>~/.bazelrc
install:
- pip install futures==3.1.1
- pip install grpcio==1.6.3
- pip install mock==2.0.0
- |
# Install TensorFlow
case "${TF}" in
RELEASE)
pip install -I tensorflow
;;
NIGHTLY)
pip install -I tf-nightly
;;
*)
pip install -I tensorflow=="${TF}"
;;
esac
script:
- |
bazel build "//${NAME}/..."
# TODO(@jart): Uncomment when tests are added.
# - |
# bazel test "//${NAME}/..."
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