[CI] Various Improvements to Travis Scripts (#7956)

* Delete LINT section of install-ray.sh since it appears unused

* Delete install.sh since it appears unused

* Delete run_test.sh since it appears unused

* Put environment variables on separate lines in .travis.yml

* Move --jobs 50 out of install-ray.sh

* Delete upgrade-syn.sh since it appears unused

* Move CI bazel flags to .bazelrc via --config

* Make installations quieter

* Get rid of verbose Maven messages

* Install Bazel system-wide for CI so that there's no need to update PATH

* Recognize Windows as valid platform

Co-authored-by: Mehrdad <noreply@github.com>
This commit is contained in:
mehrdadn
2020-04-10 13:26:28 -07:00
committed by GitHub
co-authored by Mehrdad
parent 7be7af11ab
commit 4aa68b82fa
11 changed files with 89 additions and 185 deletions
+9
View File
@@ -55,6 +55,15 @@ build:tsan --copt -g
build:tsan --copt -fno-omit-frame-pointer
build:tsan --linkopt -fsanitize=thread
test:ci --flaky_test_attempts=3
test:ci --nocache_test_results
test:ci --progress_report_interval=100
test:ci --show_progress_rate_limit=100
test:ci --show_timestamps
test:ci --spawn_strategy=local
test:ci --test_output=errors
test:ci --test_verbose_timeout_warnings
# [Linux] Uncomment this line to print a stack trace on exit.
#test:linux --run_under="bash -c 'if command -v strace >/dev/null && strace -qq -k -e exit true 2>/dev/null; then strace -qq -k -e exit -e trace=\"!all\" -s 32768 -f -o >(awk \"/^[0-9]+ / { y = \\$3 != \\\"SIGCHLD\\\" && \\$3 != \\\"SIGTERM\\\" && \\$5 != \\\"SIGTERM\\\" && \\$5 != \\\"SIGKILL2\\\"; } y { print; }\" 1>&2 && cat 1>&2) -- \"$@\"; else \"$@\"; fi' -"
# [Linux] Uncomment this line to preload libSegFault.so if available, to print a stack trace on aborts and segfault. (Note: This doesn't always work.)
+46 -28
View File
@@ -5,11 +5,15 @@ dist: xenial
matrix:
include:
- os: linux
env: PYTHON=3.6 PYTHONWARNINGS=ignore
env:
- PYTHON=3.6
- PYTHONWARNINGS=ignore
- os: osx
osx_image: xcode7
env: PYTHON=3.6 PYTHONWARNINGS=ignore
env:
- PYTHON=3.6
- PYTHONWARNINGS=ignore
- os: linux
env:
@@ -43,7 +47,7 @@ matrix:
- ./ci/suppress_output ./ci/travis/install-ray.sh
script:
# Streaming cpp test.
- if [ $RAY_CI_STREAMING_CPP_AFFECTED == "1" ]; then bazel test --test_output=all //streaming:all && bash streaming/src/test/run_streaming_queue_test.sh; fi
- if [ $RAY_CI_STREAMING_CPP_AFFECTED == "1" ]; then bazel test --config=ci --test_output=all //streaming:all && bash streaming/src/test/run_streaming_queue_test.sh; fi
- if [ $RAY_CI_STREAMING_PYTHON_AFFECTED == "1" ]; then python -m pytest -v --durations=5 --timeout=300 streaming/python/tests/; fi
- if [ $RAY_CI_STREAMING_JAVA_AFFECTED == "1" ]; then ./streaming/java/test.sh; fi
@@ -88,10 +92,12 @@ matrix:
script:
- if [ $RAY_CI_ONLY_RLLIB_AFFECTED == "1" ]; then exit; fi
- export PATH="$HOME/miniconda/bin:$PATH"
- ./ci/keep_alive bazel test --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors --test_tag_filters=-jenkins_only python/ray/tests/...
- ./ci/keep_alive bazel test --config=ci --test_tag_filters=-jenkins_only python/ray/tests/...
- os: linux
env: LINT=1 PYTHONWARNINGS=ignore
env:
- LINT=1
- PYTHONWARNINGS=ignore
before_install:
- sudo apt-get update -qq
install: []
@@ -137,7 +143,10 @@ matrix:
# Build Linux wheels.
- os: linux
env: LINUX_WHEELS=1 PYTHONWARNINGS=ignore RAY_INSTALL_JAVA=1
env:
- LINUX_WHEELS=1
- PYTHONWARNINGS=ignore
- RAY_INSTALL_JAVA=1
install:
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_LINUX_WHEELS_AFFECTED != "1" ]; then exit; fi
@@ -163,7 +172,10 @@ matrix:
# Build MacOS wheels.
- os: osx
osx_image: xcode7
env: MAC_WHEELS=1 PYTHONWARNINGS=ignore RAY_INSTALL_JAVA=1
env:
- MAC_WHEELS=1
- PYTHONWARNINGS=ignore
- RAY_INSTALL_JAVA=1
install:
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
- if [ $RAY_CI_MACOS_WHEELS_AFFECTED != "1" ]; then exit; fi
@@ -180,7 +192,8 @@ matrix:
# RLlib: Learning tests (from rllib/tuned_examples/regression_tests/*.yaml).
- os: linux
env:
- RLLIB_TESTING=1 RLLIB_REGRESSION_TESTS=1
- RLLIB_TESTING=1
- RLLIB_REGRESSION_TESTS=1
- TF_VERSION=2.0.0b1
- TFP_VERSION=0.8
- TORCH_VERSION=1.4
@@ -195,13 +208,14 @@ matrix:
- ./ci/suppress_output ./ci/travis/install-ray.sh
script:
- if [ $RAY_CI_RLLIB_AFFECTED != "1" ]; then exit; fi
- travis_wait 90 bazel test --build_tests_only --test_tag_filters=learning_tests --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=streamed rllib/...
- travis_wait 90 bazel test --config=ci --test_output=streamed --build_tests_only --test_tag_filters=learning_tests rllib/...
# RLlib: Learning tests with tf=1.x (from rllib/tuned_examples/regression_tests/*.yaml).
# Requested by Edi (MS): Test all learning capabilities with tf1.x
- os: linux
env:
- RLLIB_TESTING=1 RLLIB_REGRESSION_TESTS_TF1X=1
- RLLIB_TESTING=1
- RLLIB_REGRESSION_TESTS_TF1X=1
- TF_VERSION=1.14.0
- TFP_VERSION=0.7
- TORCH_VERSION=1.4
@@ -216,13 +230,14 @@ matrix:
- ./ci/suppress_output ./ci/travis/install-ray.sh
script:
- if [ $RAY_CI_RLLIB_FULL_AFFECTED != "1" ]; then exit; fi
- travis_wait 90 bazel test --build_tests_only --test_tag_filters=learning_tests --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=streamed rllib/...
- travis_wait 90 bazel test --config=ci --test_output=streamed --build_tests_only --test_tag_filters=learning_tests rllib/...
# RLlib: Quick Agent train.py runs (compilation & running, no(!) learning).
# Agent single tests (compilation, loss-funcs, etc..).
- os: linux
env:
- RLLIB_TESTING=1 RLLIB_QUICK_TRAIN_AND_MISC_TESTS=1
- RLLIB_TESTING=1
- RLLIB_QUICK_TRAIN_AND_MISC_TESTS=1
- PYTHON=3.6
- TF_VERSION=2.0.0b1
- TFP_VERSION=0.8
@@ -237,15 +252,16 @@ matrix:
- ./ci/suppress_output ./ci/travis/install-ray.sh
script:
- if [ $RAY_CI_RLLIB_FULL_AFFECTED != "1" ]; then exit; fi
- travis_wait 60 bazel test --build_tests_only --test_tag_filters=quick_train --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors rllib/...
- travis_wait 60 bazel test --config=ci --build_tests_only --test_tag_filters=quick_train rllib/...
# Test everything that does not have any of the "main" labels:
# "learning_tests|quick_train|examples|tests_dir".
- ./ci/keep_alive bazel test --build_tests_only --test_tag_filters=-learning_tests,-quick_train,-examples,-tests_dir --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors rllib/...
- ./ci/keep_alive bazel test --config=ci --build_tests_only --test_tag_filters=-learning_tests,-quick_train,-examples,-tests_dir rllib/...
# RLlib: Everything in rllib/examples/ directory.
- os: linux
env:
- RLLIB_TESTING=1 RLLIB_EXAMPLE_DIR_TESTS=1
- RLLIB_TESTING=1
- RLLIB_EXAMPLE_DIR_TESTS=1
- PYTHON=3.6
- TF_VERSION=2.0.0b1
- TFP_VERSION=0.8
@@ -260,15 +276,16 @@ matrix:
- ./ci/suppress_output ./ci/travis/install-ray.sh
script:
- if [ $RAY_CI_RLLIB_FULL_AFFECTED != "1" ]; then exit; fi
- ./ci/keep_alive bazel test --build_tests_only --test_tag_filters=examples_A,examples_B --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors rllib/...
- ./ci/keep_alive bazel test --build_tests_only --test_tag_filters=examples_C --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors rllib/...
- ./ci/keep_alive bazel test --build_tests_only --test_tag_filters=examples_E,examples_L,examples_M,examples_P --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors rllib/...
- ./ci/keep_alive bazel test --build_tests_only --test_tag_filters=examples_U,examples_R,examples_S,examples_T --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors rllib/...
- ./ci/keep_alive bazel test --config=ci --build_tests_only --test_tag_filters=examples_A,examples_B rllib/...
- ./ci/keep_alive bazel test --config=ci --build_tests_only --test_tag_filters=examples_C rllib/...
- ./ci/keep_alive bazel test --config=ci --build_tests_only --test_tag_filters=examples_E,examples_L,examples_M,examples_P rllib/...
- ./ci/keep_alive bazel test --config=ci --build_tests_only --test_tag_filters=examples_U,examples_R,examples_S,examples_T rllib/...
# RLlib: tests_dir: Everything in rllib/tests/ directory (A-I).
- os: linux
env:
- RLLIB_TESTING=1 RLLIB_TESTS_DIR_TESTS_A_TO_I=1
- RLLIB_TESTING=1
- RLLIB_TESTS_DIR_TESTS_A_TO_I=1
- PYTHON=3.6
- TF_VERSION=2.0.0b1
- TFP_VERSION=0.8
@@ -283,12 +300,13 @@ matrix:
- ./ci/suppress_output ./ci/travis/install-ray.sh
script:
- if [ $RAY_CI_RLLIB_FULL_AFFECTED != "1" ]; then exit; fi
- ./ci/keep_alive bazel test --build_tests_only --test_tag_filters=tests_dir_A,tests_dir_B,tests_dir_C,tests_dir_D,tests_dir_E,tests_dir_F,tests_dir_G,tests_dir_H,tests_dir_I --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors rllib/...
- ./ci/keep_alive bazel test --config=ci --build_tests_only --test_tag_filters=tests_dir_A,tests_dir_B,tests_dir_C,tests_dir_D,tests_dir_E,tests_dir_F,tests_dir_G,tests_dir_H,tests_dir_I rllib/...
# RLlib: tests_dir: Everything in rllib/tests/ directory (J-Z).
- os: linux
env:
- RLLIB_TESTING=1 RLLIB_TESTS_DIR_TESTS_J_TO_Z=1
- RLLIB_TESTING=1
- RLLIB_TESTS_DIR_TESTS_J_TO_Z=1
- PYTHON=3.6
- TF_VERSION=2.0.0b1
- TFP_VERSION=0.8
@@ -303,7 +321,7 @@ matrix:
- ./ci/suppress_output ./ci/travis/install-ray.sh
script:
- if [ $RAY_CI_RLLIB_FULL_AFFECTED != "1" ]; then exit; fi
- ./ci/keep_alive bazel test --build_tests_only --test_tag_filters=tests_dir_J,tests_dir_K,tests_dir_L,tests_dir_M,tests_dir_N,tests_dir_O,tests_dir_P,tests_dir_Q,tests_dir_R,tests_dir_S,tests_dir_T,tests_dir_U,tests_dir_V,tests_dir_W,tests_dir_X,tests_dir_Y,tests_dir_Z --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors rllib/...
- ./ci/keep_alive bazel test --config=ci --build_tests_only --test_tag_filters=tests_dir_J,tests_dir_K,tests_dir_L,tests_dir_M,tests_dir_N,tests_dir_O,tests_dir_P,tests_dir_Q,tests_dir_R,tests_dir_S,tests_dir_T,tests_dir_U,tests_dir_V,tests_dir_W,tests_dir_X,tests_dir_Y,tests_dir_Z rllib/...
# Cpp worker test
- os: linux
@@ -317,7 +335,7 @@ matrix:
- export PATH="$HOME/miniconda/bin:$PATH"
- ./ci/suppress_output ./ci/travis/install-ray.sh
script:
- bazel test //cpp:all --build_tests_only --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=streamed
- bazel test --config=ci //cpp:all --build_tests_only --test_output=streamed
install:
- eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py`
@@ -341,10 +359,10 @@ script:
- ./ci/suppress_output bash src/ray/test/run_object_manager_tests.sh
# cc bazel tests (w/o RLlib)
- ./ci/suppress_output bazel test --build_tests_only --show_progress_rate_limit=100 --test_output=errors -- //:all -rllib/...
- ./ci/suppress_output bazel test --config=ci --build_tests_only --show_progress_rate_limit=100 --test_output=errors -- //:all -rllib/...
# ray serve tests
- if [ $RAY_CI_SERVE_AFFECTED == "1" ]; then ./ci/keep_alive bazel test --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors --test_tag_filters=-jenkins_only python/ray/serve/...; fi
- if [ $RAY_CI_SERVE_AFFECTED == "1" ]; then ./ci/keep_alive bazel test --config=ci --test_tag_filters=-jenkins_only python/ray/serve/...; fi
# ray operator tests
- cd ./deploy/ray-operator/
@@ -356,8 +374,8 @@ script:
- if [ $RAY_CI_PYTHON_AFFECTED == "1" ]; then python -m pytest -v --durations=5 --timeout=300 python/ray/experimental/test/async_test.py; fi
# bazel python tests. This should be run last to keep its logs at the end of travis logs.
- if [ $RAY_CI_PYTHON_AFFECTED == "1" ]; then ./ci/keep_alive bazel test --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors --test_tag_filters=-jenkins_only python/ray/tests/...; fi
- if [ $RAY_CI_TUNE_AFFECTED == "1" ]; then ./ci/keep_alive bazel test --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors --test_tag_filters=-jenkins_only python/ray/tune/...; fi
- if [ $RAY_CI_PYTHON_AFFECTED == "1" ]; then ./ci/keep_alive bazel test --config=ci --test_tag_filters=-jenkins_only python/ray/tests/...; fi
- if [ $RAY_CI_TUNE_AFFECTED == "1" ]; then ./ci/keep_alive bazel test --config=ci --test_tag_filters=-jenkins_only python/ray/tune/...; fi
# NO MORE TESTS BELOW, keep them above.
deploy:
+12 -12
View File
@@ -50,27 +50,27 @@ else
target="./install.sh"
curl -s -L -R -o "${target}" "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-installer-${platform}-${achitecture}.sh"
chmod +x "${target}"
"${target}" --user
if [ "${TRAVIS-}" = true ] || [ -n "${GITHUB_WORKFLOW-}" ]; then
sudo "${target}" > /dev/null # system-wide install for CI
command -V bazel 1>&2
else
"${target}" --user > /dev/null
fi
rm -f "${target}"
fi
add_missing_lines() {
local file="$1"
shift
local line
for line in "$@"; do
grep -q -F -x -- "${line}" "${file}" || printf "%s\n" "${line}" >> "${file}"
done
}
add_missing_lines "${HOME}/.bashrc" 'export PATH="${HOME}/bin:${PATH}"'
if [ "${TRAVIS-}" = true ]; then
# Use bazel disk cache if this script is running in Travis.
mkdir -p "${HOME}/ray-bazel-cache"
cat <<EOF >> "${HOME}/.bazelrc"
build --disk_cache="${HOME}/ray-bazel-cache"
build --show_timestamps # Travis doesn't have an option to show timestamps, but GitHub Actions does
# If we are in Travis, most of the compilation result will be cached.
# This means we are I/O bounded. By default, Bazel set the number of concurrent
# jobs to the the number cores on the machine, which are not efficient for
# network bounded cache downloading workload. Therefore we increase the number
# of jobs to 50
build --jobs=50
EOF
fi
if [ -n "${GITHUB_WORKFLOW-}" ]; then
+15 -9
View File
@@ -16,19 +16,25 @@ torch_version="$TORCH_VERSION"
if [[ torch_version == "" ]]; then torch_version="1.4"; fi
echo "torch_version is $torch_version"
platform="unknown"
unamestr="$(uname)"
if [[ "$unamestr" == "Linux" ]]; then
echo "Platform is linux."
platform="linux"
elif [[ "$unamestr" == "Darwin" ]]; then
echo "Platform is macosx."
platform="macosx"
else
platform=""
case "${OSTYPE}" in
linux*)
platform="linux"
;;
darwin*)
platform="macosx"
;;
msys*)
platform="win32"
;;
esac
if [ -z "$platform" ]; then
echo "Unrecognized platform."
exit 1
fi
echo "Platform is $platform."
# Upgrade pip and other packages to avoid incompatibility ERRORS.
pip install --upgrade pip # setuptools cloudpickle urllib3
-15
View File
@@ -7,15 +7,6 @@ ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
echo "PYTHON is $PYTHON"
# If we are in Travis, most of the compilation result will be cached.
# This means we are I/O bounded. By default, Bazel set the number of concurrent
# jobs to the the number cores on the machine, which are not efficient for
# network bounded cache downloading workload. Therefore we increase the number
# of jobs to 50
if [[ "$TRAVIS" == "true" ]]; then
echo "build --jobs=50" >> $HOME/.bazelrc
fi
if [[ "$PYTHON" == "3.6" ]]; then
export PATH="$HOME/miniconda/bin:$PATH"
@@ -29,12 +20,6 @@ if [[ "$PYTHON" == "3.6" ]]; then
pip install -e . --verbose
popd
elif [[ "$LINT" == "1" ]]; then
export PATH="$HOME/miniconda/bin:$PATH"
pushd "$ROOT_DIR/../../python"
pip install -e . --verbose
popd
else
echo "Unrecognized Python version."
exit 1
+4 -4
View File
@@ -4,14 +4,14 @@ set -eu
case "$(uname -s)" in
Linux*)
strace -qq -k -e trace=exit /bin/true || {
strace -qq -k -e trace=exit /bin/true 1> /dev/null 2> /dev/null || {
echo "This Linux distribution doesn't appear to support strace -k." "Attempting to build & install a recent version..." 1>&2
git clone -q --depth=1 "https://github.com/strace/strace" -b v5.5 && (
git -c advice.detachedHead=false clone -q --depth=1 "https://github.com/strace/strace" -b v5.5 && (
cd strace &&
./bootstrap > /dev/null &&
./configure --quiet --with-libunwind --enable-mpers=no &&
CPPFLAGS="-w ${CPPFLAGS-}" ./configure --quiet --with-libunwind --enable-mpers=no &&
make -s -j"$(getconf _NPROCESSORS_ONLN || echo 1)" &&
sudo make install
sudo make -s install
)
}
;;
-28
View File
@@ -1,28 +0,0 @@
#!/bin/bash
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
# Linux test uses Docker
# We need to update the Docker version provided by Travis CI
# in order to set shm size, a setting required by some of the
# tests.
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo deb https://apt.dockerproject.org/repo ubuntu-trusty main | sudo tee --append /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install docker-engine
docker version
# We tar the current checkout, then include it in the Docker image
tar --exclude './docker' -c . > ./docker/test-base/ray.tar
docker build --no-cache -t ray-project/ray:test-base docker/test-base
rm ./docker/test-base/ray.tar
docker build --no-cache -t ray-project/ray:test-examples docker/test-examples
docker ps -a
else
# Mac OS X test
./install-dependencies.sh
./setup.sh
./build.sh
fi
-60
View File
@@ -1,60 +0,0 @@
#!/bin/bash
#
# This script is for use in the Travis CI testing system. When running
# on Linux this script runs the command in a Docker container.
# Otherwise it runs the commands natively, which is what we want for
# the Mac OS X tests.
#
# Usage:
#
# run_test.sh [OPTIONS] [COMMAND]
#
# Key options are:
#
# --docker-image=img Docker image to run the tests
# --shm-size=xxx Shared memory setting for Docker run command
# --docker-only Skip this test unless running on docker
#
# Example:
#
# run_test.sh --docker-only --shm-size=500m \
# --docker-image=ray-project/ray:test-examples \
# 'source setup-env.sh && cd examples/lbfgs && python driver.py'
#
# For further examples see this project's .travis.yml
#
# Argument parsing adapted from http://stackoverflow.com/a/14203146
for i in "$@"
do
TEST_COMMAND=''
case $i in
--docker-image=*)
DOCKER_IMAGE="${i#*=}"
shift
;;
--shm-size=*)
SHM_SIZE="${i#*=}"
shift
;;
--docker-only)
DOCKER_ONLY=YES
;;
*)
TEST_COMMAND=$i
;;
esac
done
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
# Linux test uses Docker
SHM_ARG=$([[ -z $SHM_SIZE ]] && echo "" || echo "--shm-size $SHM_SIZE")
docker run $SHM_ARG $DOCKER_IMAGE bash -c "$TEST_COMMAND"
else
# Mac OS X test
if [[ -z $DOCKER_ONLY || $DOCKER_ONLY -ne YES ]]; then
bash -c "$TEST_COMMAND"
else
echo "not on Docker, skipping test"
fi
fi
-26
View File
@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Cause the script to exit if a single command fails
set -eo pipefail
# this stops git rev-parse from failing if we run this from the .git directory
builtin cd "$(dirname "${BASH_SOURCE:-$0}")"
ROOT="$(git rev-parse --show-toplevel)"
builtin cd "$ROOT"
find \
python test \
-name '*.py' -type f \
-not -path 'python/ray/cloudpickle/*' \
-exec python -m pyupgrade {} +
if ! git diff --quiet; then
echo 'Reformatted staged files. Please review and stage the changes.'
echo 'Files updated:'
echo
git --no-pager diff --name-only
exit 1
fi
+1 -1
View File
@@ -41,5 +41,5 @@ popd
pushd $ROOT_DIR
echo "Testing maven install."
mvn clean install -DskipTests
mvn -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN clean install -DskipTests
popd
+2 -2
View File
@@ -36,7 +36,7 @@ cd "$ROOT_DIR"/../../java
echo "build ray maven deps"
bazel build gen_maven_deps
echo "maven install ray"
mvn clean install -DskipTests
mvn -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN clean install -DskipTests
cd "$ROOT_DIR"
echo "maven install ray streaming"
mvn clean install -DskipTests
mvn -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN clean install -DskipTests