2016-06-05 20:46:54 -07:00
language : generic
2019-06-14 14:52:32 +08:00
# Use Ubuntu 16.04
dist : xenial
2016-06-05 20:46:54 -07:00
2016-06-22 11:28:01 -07:00
matrix :
include :
- os : linux
2019-11-22 13:58:50 -08:00
env : BAZEL_PYTHON_VERSION=PY2 PYTHON=2.7 PYTHONWARNINGS=ignore
2017-08-21 23:48:20 -07:00
2016-10-25 22:39:21 -07:00
- os : linux
2019-11-22 13:58:50 -08:00
env : BAZEL_PYTHON_VERSION=PY3 PYTHON=3.5 PYTHONWARNINGS=ignore
2017-08-21 23:48:20 -07:00
2016-06-22 11:28:01 -07:00
- os : osx
osx_image : xcode7
2019-11-22 13:58:50 -08:00
env : BAZEL_PYTHON_VERSION=PY2 PYTHON=2.7 PYTHONWARNINGS=ignore
2017-08-21 23:48:20 -07:00
2016-10-25 22:39:21 -07:00
- os : osx
osx_image : xcode7
2019-11-22 13:58:50 -08:00
env : BAZEL_PYTHON_VERSION=PY3 PYTHON=3.5 PYTHONWARNINGS=ignore
2017-08-21 23:48:20 -07:00
2016-10-25 22:39:21 -07:00
- os : linux
2018-05-27 05:38:50 +08:00
env :
- JDK='Oracle JDK 8'
2018-12-11 17:21:53 -08:00
- PYTHON=3.5 PYTHONWARNINGS=ignore
2019-03-07 09:59:13 +08:00
- RAY_INSTALL_JAVA=1
2018-05-27 05:38:50 +08:00
install :
2019-03-15 22:23:54 -07:00
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_JAVA_AFFECTED != "1" ]; then exit; fi
2019-03-22 14:30:05 +08:00
- ./ci/suppress_output ./ci/travis/install-bazel.sh
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
2018-05-27 05:38:50 +08:00
- export PATH="$HOME/miniconda/bin:$PATH"
2019-03-22 14:30:05 +08:00
- ./ci/suppress_output ./ci/travis/install-ray.sh
2018-05-27 05:38:50 +08:00
script :
2019-03-15 22:23:54 -07:00
- if [ $RAY_CI_JAVA_AFFECTED != "1" ]; then exit; fi
- ./java/test.sh
2018-05-27 05:38:50 +08:00
- os : linux
2019-02-24 00:00:50 -08:00
env : LINT=1 PYTHONWARNINGS=ignore
2016-10-25 22:39:21 -07:00
before_install :
- sudo apt-get update -qq
install : [ ]
script :
2019-02-21 11:09:08 -08:00
- ./ci/travis/check-git-clang-format-output.sh
2017-03-01 23:34:44 -08:00
# Try generating Sphinx documentation. To do this, we need to install
# Ray first.
2019-02-21 11:09:08 -08:00
- ./ci/travis/install-dependencies.sh
2017-02-27 21:14:31 -08:00
- export PATH="$HOME/miniconda/bin:$PATH"
- cd doc
2017-10-19 22:25:56 -07:00
- pip install -q -r requirements-doc.txt
2019-09-25 14:46:56 -07:00
- pip install -q yapf==0.23.0
2017-02-27 21:14:31 -08:00
- sphinx-build -W -b html -d _build/doctrees source _build/html
2017-03-21 12:57:54 -07:00
- cd ..
2018-08-07 12:17:44 -07:00
# Run Python linting, ignore dict vs {} (C408), others are defaults
2019-04-19 13:55:20 -07:00
- 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
2019-02-21 11:09:08 -08:00
- ./ci/travis/format.sh --all
2018-12-19 18:41:09 -08:00
# Make sure that the README is formatted properly.
- cd python
- python setup.py check --restructuredtext --strict --metadata
2019-02-14 22:16:19 +08:00
- 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
2019-02-21 11:09:08 -08:00
- ./ci/travis/bazel-format.sh
2017-08-21 23:48:20 -07:00
2016-10-25 22:39:21 -07:00
- os : linux
2019-02-24 00:00:50 -08:00
env : VALGRIND=1 PYTHON=2.7 PYTHONWARNINGS=ignore
2016-10-25 22:39:21 -07:00
before_install :
2019-03-15 22:23:54 -07:00
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
2019-06-20 22:22:37 -07:00
# 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
2016-10-25 22:39:21 -07:00
- sudo apt-get update -qq
- sudo apt-get install -qq valgrind
2019-06-20 22:22:37 -07:00
2016-12-20 14:46:25 -08:00
install :
2019-03-15 22:23:54 -07:00
- if [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
2019-03-07 12:09:03 -08:00
- ./ci/suppress_output ./ci/travis/install-bazel.sh
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
2017-07-13 09:23:04 -07:00
- export PATH="$HOME/miniconda/bin:$PATH"
2019-03-07 12:09:03 -08:00
- ./ci/suppress_output ./ci/travis/install-ray.sh
2016-12-20 14:46:25 -08:00
2017-09-30 00:11:09 -07:00
script :
2019-03-15 22:23:54 -07:00
- if [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
2019-02-24 00:00:50 -08:00
- bash src/ray/test/run_object_manager_valgrind.sh
2016-12-29 23:10:38 -08:00
2019-01-22 14:59:11 -08:00
- 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.
2019-03-22 17:45:55 +08:00
- 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
2019-01-22 14:59:11 -08:00
2017-08-21 23:48:20 -07:00
# Build Linux wheels.
- os : linux
2019-03-13 15:57:33 -07:00
env : LINUX_WHEELS=1 PYTHONWARNINGS=ignore
2017-08-21 23:48:20 -07:00
install :
2019-03-15 22:23:54 -07:00
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_LINUX_WHEELS_AFFECTED != "1" ]; then exit; fi
2019-03-13 15:57:33 -07:00
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
2019-03-15 22:23:54 -07:00
2019-07-10 22:03:45 +08:00
# Mount bazel cache dir to the docker container.
2019-10-14 15:48:23 -07:00
# 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.
2019-11-21 14:41:13 -08:00
- export MOUNT_BAZEL_CACHE="-v $HOME/ray-bazel-cache:/root/ray-bazel-cache -e TRAVIS=true -e TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST -e encrypted_1c30b31fe1ee_key=$encrypted_1c30b31fe1ee_key -e encrypted_1c30b31fe1ee_iv=$encrypted_1c30b31fe1ee_iv"
2019-10-14 15:48:23 -07:00
2019-07-10 22:03:45 +08:00
# This command should be kept in sync with ray/python/README-building-wheels.md,
# except the `$MOUNT_BAZEL_CACHE` part.
2019-10-14 15:48:23 -07:00
2019-07-10 22:03:45 +08:00
- ./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
2017-08-21 23:48:20 -07:00
script :
2019-03-15 22:23:54 -07:00
- if [ $RAY_CI_LINUX_WHEELS_AFFECTED != "1" ]; then exit; fi
2019-02-21 11:09:08 -08:00
- ./ci/travis/test-wheels.sh
2019-10-14 15:48:23 -07:00
cache : false
2017-08-21 23:48:20 -07:00
# Build MacOS wheels.
- os : osx
osx_image : xcode7
2019-03-15 10:37:57 -07:00
env : MAC_WHEELS=1 PYTHONWARNINGS=ignore
2017-08-21 23:48:20 -07:00
install :
2019-03-15 22:23:54 -07:00
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_MACOS_WHEELS_AFFECTED != "1" ]; then exit; fi
2019-03-15 10:37:57 -07:00
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
2017-08-21 23:48:20 -07:00
# This command should be kept in sync with ray/python/README-building-wheels.md.
2019-06-17 19:00:50 +08:00
- ./ci/suppress_output ./python/build-wheel-macos.sh
2017-08-21 23:48:20 -07:00
script :
2019-03-15 22:23:54 -07:00
- if [ $RAY_CI_MACOS_WHEELS_AFFECTED != "1" ]; then exit; fi
2019-02-21 11:09:08 -08:00
- ./ci/travis/test-wheels.sh
2017-08-21 23:48:20 -07:00
2016-06-05 20:46:54 -07:00
install :
2019-03-15 22:23:54 -07:00
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
2019-10-07 01:57:31 -07:00
- if [ $RAY_CI_SERVE_AFFECTED != "1" ] && [ $RAY_CI_TUNE_AFFECTED != "1" ] && [ $RAY_CI_RLLIB_AFFECTED != "1" ] && [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
2019-03-15 22:23:54 -07:00
2019-03-07 12:09:03 -08:00
- ./ci/suppress_output ./ci/travis/install-bazel.sh
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
2017-07-13 09:23:04 -07:00
- export PATH="$HOME/miniconda/bin:$PATH"
2019-03-07 12:09:03 -08:00
- ./ci/suppress_output ./ci/travis/install-ray.sh
- ./ci/suppress_output ./ci/travis/install-cython-examples.sh
2016-06-05 20:46:54 -07:00
2019-03-07 12:09:03 -08:00
- ./ci/suppress_output bash src/ray/test/run_gcs_tests.sh
2019-04-03 12:01:02 +08:00
2019-06-03 19:59:43 +08:00
# core worker test.
- ./ci/suppress_output bash src/ray/test/run_core_worker_tests.sh
2018-03-31 18:02:58 -07:00
# Raylet tests.
2019-03-07 12:09:03 -08:00
- ./ci/suppress_output bash src/ray/test/run_object_manager_tests.sh
2019-03-22 14:30:05 +08:00
- ./ci/suppress_output bazel test --build_tests_only --test_lang_filters=cc //:all
2019-04-02 17:42:18 +08:00
# Shutdown bazel to release the memory held by bazel.
- bazel shutdown
2019-02-24 00:00:50 -08:00
2016-06-05 20:46:54 -07:00
script :
2017-07-13 09:23:04 -07:00
- export PATH="$HOME/miniconda/bin:$PATH"
2018-07-30 11:04:06 -07:00
# 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.
2019-02-21 11:09:08 -08:00
# - export PYTHONPATH="$PYTHONPATH:./ci/"
2018-07-30 11:04:06 -07:00
2019-11-22 13:58:50 -08:00
# ray tune tests, except tests tagged jenkins only.
- if [ $RAY_CI_TUNE_AFFECTED == "1" ]; then bazel test --spawn_strategy=local --python_version=$BAZEL_PYTHON_VERSION --incompatible_allow_python_version_transitions=false --incompatible_py3_is_default=false --show_progress_rate_limit=120 --test_output=errors --test_tag_filters=-jenkins_only python/ray/tune/...; fi
2018-12-03 23:15:43 -08:00
2019-10-03 15:14:09 -07:00
# 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
2019-10-06 15:12:30 -07:00
- 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
2019-10-03 15:14:09 -07:00
2019-03-02 06:38:28 +08:00
# ray tests
2018-12-06 17:39:05 -08:00
# Python3.5+ only. Otherwise we will get `SyntaxError` regardless of how we set the tester.
2019-03-22 17:45:55 +08:00
- 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
2019-11-21 11:56:46 -08:00
- 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_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_test.py; fi
2019-03-15 22:23:54 -07:00
2017-10-09 23:10:58 -07:00
deploy :
2018-02-26 10:26:38 -08:00
- provider : s3
2019-06-07 23:19:10 -07:00
access_key_id : AKIAU6DMUCJUFL3EX3SM
2018-02-26 10:26:38 -08:00
secret_access_key :
2019-06-07 23:19:10 -07:00
secure : J1sX71fKFPQhgWzColllxfzcF877ScBZ1cIl71krZ6SO0LKnwsCScpQck5eZOyQo/Iverwye0iKtE87qNsiRi3+V2D9iulSr18T09j7+FjPKfxAmXmjfrNafoMXTDQroSJblCri5vl+DysISPqImJkWTNaYhGJ9QakoSd5djnAopLNWj6PCR3S50baS49+nB5nSIY3jMhtUzlaBdniFPFC81Cxyuafr4pv6McGRfR/dK+ZnPhdGtMnVeIJXB+ooZKQ26mDJKBPka4jm3u1Oa72b/Atu2RO3MwxTg79LTrMxXKh2OcCqhtD2Z3lz1OltvNSunCuwY8AejCJsfSLbM9mGDoz+xhNUWmYNy48YFf+61OY8PXi8S/9Q817yb3GpLbb2l/P+KMgq9eSEiELIOwuYsDxPX5TuAg6dx0wCNgDEBJoThSQjYl6MgJrLrs7p+JBxp3giedHiy0TLa5hCVKTj3euONAXDArYnnT+DvUIOkaeTk5DClRZbZ0sUXhLy//HuT5WJvjFBJJZ0u0f4RLVb5D7DI4uMZr7+yJPDR2AXCyW9YMaBEbmEYbPaKi283jlEyn7R33+AZlnXv0THHwZ4xvjKKG3/fBSXsOUmv5wmUveEqVGDj1mKPGj9NF8iA5qMm2AaZuJpEEBVBZtSlTZt6ZG7rzAJZGNL52t7xuMo=
2018-02-26 10:26:38 -08:00
bucket : ray-wheels
acl : public_read
region : us-west-2
local_dir : .whl
2019-06-07 23:20:29 -07:00
upload-dir : "$TRAVIS_BRANCH/$TRAVIS_COMMIT"
2018-02-26 10:26:38 -08:00
skip_cleanup : true
on :
repo : ray-project/ray
2019-04-17 16:24:55 -07:00
all_branches : true
2018-02-26 10:26:38 -08:00
condition : $LINUX_WHEELS = 1 || $MAC_WHEELS = 1
- provider : s3
2019-06-07 23:19:10 -07:00
access_key_id : AKIAU6DMUCJUFL3EX3SM
2018-02-26 10:26:38 -08:00
secret_access_key :
2019-06-07 23:19:10 -07:00
secure : J1sX71fKFPQhgWzColllxfzcF877ScBZ1cIl71krZ6SO0LKnwsCScpQck5eZOyQo/Iverwye0iKtE87qNsiRi3+V2D9iulSr18T09j7+FjPKfxAmXmjfrNafoMXTDQroSJblCri5vl+DysISPqImJkWTNaYhGJ9QakoSd5djnAopLNWj6PCR3S50baS49+nB5nSIY3jMhtUzlaBdniFPFC81Cxyuafr4pv6McGRfR/dK+ZnPhdGtMnVeIJXB+ooZKQ26mDJKBPka4jm3u1Oa72b/Atu2RO3MwxTg79LTrMxXKh2OcCqhtD2Z3lz1OltvNSunCuwY8AejCJsfSLbM9mGDoz+xhNUWmYNy48YFf+61OY8PXi8S/9Q817yb3GpLbb2l/P+KMgq9eSEiELIOwuYsDxPX5TuAg6dx0wCNgDEBJoThSQjYl6MgJrLrs7p+JBxp3giedHiy0TLa5hCVKTj3euONAXDArYnnT+DvUIOkaeTk5DClRZbZ0sUXhLy//HuT5WJvjFBJJZ0u0f4RLVb5D7DI4uMZr7+yJPDR2AXCyW9YMaBEbmEYbPaKi283jlEyn7R33+AZlnXv0THHwZ4xvjKKG3/fBSXsOUmv5wmUveEqVGDj1mKPGj9NF8iA5qMm2AaZuJpEEBVBZtSlTZt6ZG7rzAJZGNL52t7xuMo=
2018-02-26 10:26:38 -08:00
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
2019-06-30 17:57:48 -07:00
cache :
directories :
- $HOME/ray-bazel-cache