forked from tensorflow/tensorboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (100 loc) · 3.81 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
106
107
108
109
110
111
dist: xenial
language: python
python:
- "3.6"
branches:
only:
- master
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
# Update the `nvm use` stanza below when updating this.
node_js:
- "11"
env:
# Keep this Bazel version in sync with the `versions.check` directive
# near the top of our WORKSPACE file.
#
# Grab the BAZEL_SHA256SUM from the Bazel releases page; e.g.:
# bazel-0.20.0-linux-x86_64.sha256
global:
- BAZEL=2.1.0
- BAZEL_SHA256SUM=e13581d44faad6ac807dd917e682fef20359d26728166ac35dadd8ee653a580d
matrix:
- TF_VERSION_ID=tensorflow==1.15.0
- TF_VERSION_ID=tf-nightly
- TF_VERSION_ID= # Do not install TensorFlow in this case
cache:
# Don't cache the Pip directory. We pull in a new `tf-nightly` wheel
# every day, and Pip caches are never evicted, so this quickly bloats
# to many gigabytes and adds minutes to the CI time.
pip: false
# Cache directories for Bazel. See ci/bazelrc for details.
directories:
- $HOME/.cache/tb-bazel-repo
- $HOME/.cache/tb-bazel-disk
# Each bullet point is displayed in the Travis log as one collapsed line, which
# indicates how long it took. Travis will check the return code at the end. We
# can't use `set -e` in the YAML file since it might impact Travis internals.
# If inline scripts get too long, Travis surprisingly prints them twice.
before_install:
- elapsed() { TZ=UTC printf "Time %(%T)T %s\n" "$SECONDS" "$1"; }
- elapsed "before_install"
- ci/download_bazel.sh "${BAZEL}" "${BAZEL_SHA256SUM}" ~/bazel
- sudo mv ~/bazel /usr/local/bin/bazel
- cp ci/bazelrc ~/.bazelrc
- elapsed "before_install (done)"
install:
- elapsed "install"
- "PY3=\"$(python -c 'if __import__(\"sys\").version_info[0] > 2: print(1)')\""
# Older versions of Pip sometimes resolve specifiers like `tf-nightly`
# to versions other than the most recent(!).
- pip install -U pip
# Uninstall older Travis numpy to avoid upgrade-in-place issues.
- pip uninstall -y numpy
- |
pip install \
-r tensorboard/pip_package/requirements.txt \
-r tensorboard/pip_package/requirements_dev.txt \
;
# Keep the node version in sync with node_js key above.
- nvm use v11
- |
# Install TensorFlow if requested
if [ -n "${TF_VERSION_ID}" ]; then
pip install -I "${TF_VERSION_ID}"
fi
# Workaround for https://github.com/travis-ci/travis-ci/issues/7940
- sudo rm -f /etc/boto.cfg
- pip freeze # print installed distributions, for debugging purposes
- elapsed "install (done)"
before_script:
# Note: Lint checks happen on GitHub Actions; see .github/workflows/ci.yml.
- elapsed "before_script"
- |
# Specify subset of tests to run depending on TF installation config.
# We condition the value of --test_tag_filters so that we can run the
# bazel test command unconditionally which produces nicer log output.
if [ -z "${TF_VERSION_ID}" ]; then
test_tag_filters=support_notf
else
test_tag_filters=
fi
- elapsed "before_script (done)"
# Commands in this section should only fail if it's our fault. Travis will
# categorize them as 'failed', rather than 'error' for other sections.
script:
- elapsed "script"
# Note: bazel test implies fetch+build, but this gives us timing.
- elapsed && bazel fetch //tensorboard/...
- elapsed && bazel build //tensorboard/...
- elapsed && bazel test //tensorboard/... --test_tag_filters="${test_tag_filters}"
- elapsed && bazel run //tensorboard/pip_package:test_pip_package -- --tf-version "${TF_VERSION_ID}"
# Run manual S3 test
- elapsed && bazel test //tensorboard/compat/tensorflow_stub:gfile_s3_test
- elapsed && bazel test //tensorboard/summary/writer:event_file_writer_s3_test
- elapsed "script (done)"
after_script:
# Bazel launches daemons unless --batch is used.
- elapsed "after_script"
- bazel shutdown
notifications:
email: false