forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
224 lines (191 loc) · 10.7 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
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
language: generic
# Use Ubuntu 16.04
dist: xenial
matrix:
include:
- os: linux
env: PYTHON=2.7 PYTHONWARNINGS=ignore
- os: linux
env: PYTHON=3.5 PYTHONWARNINGS=ignore
- os: osx
osx_image: xcode7
env: PYTHON=2.7 PYTHONWARNINGS=ignore
- os: osx
osx_image: xcode7
env: PYTHON=3.5 PYTHONWARNINGS=ignore
- os: linux
env:
- JDK='Oracle JDK 8'
- PYTHON=3.5 PYTHONWARNINGS=ignore
- RAY_INSTALL_JAVA=1
install:
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_JAVA_AFFECTED != "1" ]; then exit; fi
- ./ci/suppress_output ./ci/travis/install-bazel.sh
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
- export PATH="$HOME/miniconda/bin:$PATH"
- ./ci/suppress_output ./ci/travis/install-ray.sh
script:
- if [ $RAY_CI_JAVA_AFFECTED != "1" ]; then exit; fi
- ./java/test.sh
- os: linux
env: LINT=1 PYTHONWARNINGS=ignore
before_install:
- sudo apt-get update -qq
install: []
script:
- ./ci/travis/check-git-clang-format-output.sh
# Try generating Sphinx documentation. To do this, we need to install
# Ray first.
- ./ci/travis/install-dependencies.sh
- export PATH="$HOME/miniconda/bin:$PATH"
- cd doc
- pip install -q -r requirements-doc.txt
- pip install -q yapf==0.23.0
- sphinx-build -W -b html -d _build/doctrees source _build/html
- cd ..
# Run Python linting, ignore dict vs {} (C408), others are defaults
- flake8 --inline-quotes '"' --no-avoid-escape --exclude=python/ray/core/generated/,doc/source/conf.py,python/ray/cloudpickle/ --ignore=C408,E121,E123,E126,E226,E24,E704,W503,W504,W605
- ./ci/travis/format.sh --all
# Make sure that the README is formatted properly.
- cd python
- python setup.py check --restructuredtext --strict --metadata
- cd ..
# Run Bazel linter Buildifier.
- wget https://dl.google.com/go/go1.11.linux-amd64.tar.gz
- tar -xf go1.11.linux-amd64.tar.gz
- mkdir $HOME/go_dir
- export GOROOT=`pwd`/go
- export GOPATH="$HOME/go_dir"
- export PATH="$GOROOT/bin:$GOPATH/bin:$PATH"
- go get github.com/bazelbuild/buildtools/buildifier
- ./ci/travis/bazel-format.sh
- os: linux
env: VALGRIND=1 PYTHON=2.7 PYTHONWARNINGS=ignore
before_install:
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
# Install a newer version of valgrind, the one that comes with
# Ubuntu 16.04 is broken (Illegal instruction)
- sudo add-apt-repository -y ppa:msulikowski/valgrind
- sudo apt-get update -qq
- sudo apt-get install -qq valgrind
install:
- if [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
- ./ci/suppress_output ./ci/travis/install-bazel.sh
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
- export PATH="$HOME/miniconda/bin:$PATH"
- ./ci/suppress_output ./ci/travis/install-ray.sh
script:
- if [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
- bash src/ray/test/run_object_manager_valgrind.sh
- export RAY_PLASMA_STORE_VALGRIND=1
# - export RAY_RAYLET_VALGRIND=1
# - export RAY_RAYLET_MONITOR_VALGRIND=1
# - export RAY_REDIS_SERVER_VALGRIND=1
# # Python3.5+ only. Otherwise we will get `SyntaxError` regardless of how we set the tester.
- python -c 'import sys;exit(sys.version_info>=(3,5))' || python -m pytest -v --durations=5 python/ray/experimental/test/async_test.py
- python -m pytest -v --durations=5 --timeout=300 python/ray/tests/test_mini.py
- python -m pytest -v --durations=5 --timeout=300 python/ray/tests/test_array.py
- python -m pytest -v --durations=5 --timeout=300 python/ray/tests/test_multi_node_2.py
- python -m pytest -v --durations=5 --timeout=300 python/ray/tests/test_node_manager.py
# Build Linux wheels.
- os: linux
env: LINUX_WHEELS=1 PYTHONWARNINGS=ignore
install:
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_LINUX_WHEELS_AFFECTED != "1" ]; then exit; fi
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
# Mount bazel cache dir to the docker container.
# For the linux wheel build, we use a shared cache between all
# wheels, but not between different travis runs, because that
# caused timeouts in the past. See the "cache: false" line below.
- export MOUNT_BAZEL_CACHE="-v $HOME/ray-bazel-cache:/root/ray-bazel-cache -e TRAVIS=true"
# This command should be kept in sync with ray/python/README-building-wheels.md,
# except the `$MOUNT_BAZEL_CACHE` part.
- ./ci/suppress_output docker run --rm -w /ray -v `pwd`:/ray $MOUNT_BAZEL_CACHE -ti rayproject/arrow_linux_x86_64_base:latest /ray/python/build-wheel-manylinux1.sh
script:
- if [ $RAY_CI_LINUX_WHEELS_AFFECTED != "1" ]; then exit; fi
- ./ci/travis/test-wheels.sh
cache: false
# Build MacOS wheels.
- os: osx
osx_image: xcode7
env: MAC_WHEELS=1 PYTHONWARNINGS=ignore
install:
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_MACOS_WHEELS_AFFECTED != "1" ]; then exit; fi
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
# This command should be kept in sync with ray/python/README-building-wheels.md.
- ./ci/suppress_output ./python/build-wheel-macos.sh
script:
- if [ $RAY_CI_MACOS_WHEELS_AFFECTED != "1" ]; then exit; fi
- ./ci/travis/test-wheels.sh
install:
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_SERVE_AFFECTED != "1" ] && [ $RAY_CI_TUNE_AFFECTED != "1" ] && [ $RAY_CI_RLLIB_AFFECTED != "1" ] && [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
- ./ci/suppress_output ./ci/travis/install-bazel.sh
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
- export PATH="$HOME/miniconda/bin:$PATH"
- ./ci/suppress_output ./ci/travis/install-ray.sh
- ./ci/suppress_output ./ci/travis/install-cython-examples.sh
- ./ci/suppress_output bash src/ray/test/run_gcs_tests.sh
# core worker test.
- ./ci/suppress_output bash src/ray/test/run_core_worker_tests.sh
# Raylet tests.
- ./ci/suppress_output bash src/ray/test/run_object_manager_tests.sh
- ./ci/suppress_output bazel test --build_tests_only --test_lang_filters=cc //:all
# Shutdown bazel to release the memory held by bazel.
- bazel shutdown
script:
- export PATH="$HOME/miniconda/bin:$PATH"
# The following is needed so cloudpickle can find some of the
# class definitions: The main module of tests that are run
# with pytest have the same name as the test file -- and this
# module is only found if the test directory is in the PYTHONPATH.
# - export PYTHONPATH="$PYTHONPATH:./ci/"
# ray tune tests
- if [ $RAY_CI_TUNE_AFFECTED == "1" ]; then ./ci/suppress_output python python/ray/tune/tests/test_dependency.py; fi
# `cluster_tests.py` runs on Jenkins, not Travis.
- if [ $RAY_CI_TUNE_AFFECTED == "1" ]; then python -m pytest -v --durations=10 --timeout=300 --ignore=python/ray/tune/tests/test_cluster.py --ignore=python/ray/tune/tests/test_logger.py --ignore=python/ray/tune/tests/test_tune_restore.py --ignore=python/ray/tune/tests/test_actor_reuse.py python/ray/tune/tests; fi
# ray serve tests
- if [ $RAY_CI_SERVE_AFFECTED == "1" ]; then python -c 'import sys;exit(sys.version_info>=(3,5))' || python -m pytest -v --durations=5 --timeout=300 python/ray/experimental/serve/tests; fi
- if [ $RAY_CI_SERVE_AFFECTED == "1" ]; then python -c 'import sys;exit(sys.version_info>=(3,5))' || ./ci/suppress_output python python/ray/experimental/serve/examples/echo_full.py; fi
# ray tests
# Python3.5+ only. Otherwise we will get `SyntaxError` regardless of how we set the tester.
- if [ $RAY_CI_PYTHON_AFFECTED == "1" ]; then python -c 'import sys;exit(sys.version_info>=(3,5))' || python -m pytest -v --durations=5 --timeout=300 python/ray/experimental/test/async_test.py; fi
- if [ $RAY_CI_PYTHON_AFFECTED == "1" ]; then python -c 'import sys;exit(sys.version_info>=(3,5))' || python -m pytest -v --durations=5 --timeout=300 python/ray/tests/py3_args_test.py; fi
- if [ $RAY_CI_PYTHON_AFFECTED == "1" ]; then python -m pytest -v --durations=10 --timeout=300 python/ray/tests --ignore=python/ray/tests/perf_integration_tests --ignore=python/ray/tests/py3_args_test.py; fi
deploy:
- provider: s3
access_key_id: AKIAU6DMUCJUFL3EX3SM
secret_access_key:
secure: J1sX71fKFPQhgWzColllxfzcF877ScBZ1cIl71krZ6SO0LKnwsCScpQck5eZOyQo/Iverwye0iKtE87qNsiRi3+V2D9iulSr18T09j7+FjPKfxAmXmjfrNafoMXTDQroSJblCri5vl+DysISPqImJkWTNaYhGJ9QakoSd5djnAopLNWj6PCR3S50baS49+nB5nSIY3jMhtUzlaBdniFPFC81Cxyuafr4pv6McGRfR/dK+ZnPhdGtMnVeIJXB+ooZKQ26mDJKBPka4jm3u1Oa72b/Atu2RO3MwxTg79LTrMxXKh2OcCqhtD2Z3lz1OltvNSunCuwY8AejCJsfSLbM9mGDoz+xhNUWmYNy48YFf+61OY8PXi8S/9Q817yb3GpLbb2l/P+KMgq9eSEiELIOwuYsDxPX5TuAg6dx0wCNgDEBJoThSQjYl6MgJrLrs7p+JBxp3giedHiy0TLa5hCVKTj3euONAXDArYnnT+DvUIOkaeTk5DClRZbZ0sUXhLy//HuT5WJvjFBJJZ0u0f4RLVb5D7DI4uMZr7+yJPDR2AXCyW9YMaBEbmEYbPaKi283jlEyn7R33+AZlnXv0THHwZ4xvjKKG3/fBSXsOUmv5wmUveEqVGDj1mKPGj9NF8iA5qMm2AaZuJpEEBVBZtSlTZt6ZG7rzAJZGNL52t7xuMo=
bucket: ray-wheels
acl: public_read
region: us-west-2
local_dir: .whl
upload-dir: "$TRAVIS_BRANCH/$TRAVIS_COMMIT"
skip_cleanup: true
on:
repo: ray-project/ray
all_branches: true
condition: $LINUX_WHEELS = 1 || $MAC_WHEELS = 1
- provider: s3
access_key_id: AKIAU6DMUCJUFL3EX3SM
secret_access_key:
secure: J1sX71fKFPQhgWzColllxfzcF877ScBZ1cIl71krZ6SO0LKnwsCScpQck5eZOyQo/Iverwye0iKtE87qNsiRi3+V2D9iulSr18T09j7+FjPKfxAmXmjfrNafoMXTDQroSJblCri5vl+DysISPqImJkWTNaYhGJ9QakoSd5djnAopLNWj6PCR3S50baS49+nB5nSIY3jMhtUzlaBdniFPFC81Cxyuafr4pv6McGRfR/dK+ZnPhdGtMnVeIJXB+ooZKQ26mDJKBPka4jm3u1Oa72b/Atu2RO3MwxTg79LTrMxXKh2OcCqhtD2Z3lz1OltvNSunCuwY8AejCJsfSLbM9mGDoz+xhNUWmYNy48YFf+61OY8PXi8S/9Q817yb3GpLbb2l/P+KMgq9eSEiELIOwuYsDxPX5TuAg6dx0wCNgDEBJoThSQjYl6MgJrLrs7p+JBxp3giedHiy0TLa5hCVKTj3euONAXDArYnnT+DvUIOkaeTk5DClRZbZ0sUXhLy//HuT5WJvjFBJJZ0u0f4RLVb5D7DI4uMZr7+yJPDR2AXCyW9YMaBEbmEYbPaKi283jlEyn7R33+AZlnXv0THHwZ4xvjKKG3/fBSXsOUmv5wmUveEqVGDj1mKPGj9NF8iA5qMm2AaZuJpEEBVBZtSlTZt6ZG7rzAJZGNL52t7xuMo=
bucket: ray-wheels
acl: public_read
region: us-west-2
local_dir: .whl
upload-dir: latest
skip_cleanup: true
only:
- master
on:
repo: ray-project/ray
condition: $LINUX_WHEELS = 1 || $MAC_WHEELS = 1
cache:
directories:
- $HOME/ray-bazel-cache