diff --git a/.bazelrc b/.bazelrc index 67bbf92d1e8c..2baaa0fa2af5 100644 --- a/.bazelrc +++ b/.bazelrc @@ -101,16 +101,17 @@ aquery:ci --color=no aquery:ci --noshow_progress build:ci --color=yes build:ci --curses=no -build:ci --disk_cache=~/ray-bazel-cache build:ci --keep_going -build:ci --remote_cache="https://storage.googleapis.com/ray-bazel-cache" build:ci --progress_report_interval=100 build:ci --show_progress_rate_limit=15 build:ci --show_task_finish build:ci --ui_actions_shown=1024 -build:ci-travis --show_timestamps # Travis doesn't have an option to show timestamps, but GitHub Actions does -# GitHub Actions has low disk space, so prefer hardlinks there. -build:ci-github --experimental_repository_cache_hardlinks +build:ci --show_timestamps +build:ci-travis --disk_cache=~/ray-bazel-cache +build:ci-travis --remote_cache="https://storage.googleapis.com/ray-bazel-cache" +build:ci-github --experimental_repository_cache_hardlinks # GitHub Actions has low disk space, so prefer hardlinks there. +build:ci-github --disk_cache=~/ray-bazel-cache +build:ci-github --remote_cache="https://storage.googleapis.com/ray-bazel-cache" test:ci --flaky_test_attempts=3 test:ci --nocache_test_results test:ci --spawn_strategy=local diff --git a/.buildkite/Dockerfile b/.buildkite/Dockerfile new file mode 100644 index 000000000000..80c374019065 --- /dev/null +++ b/.buildkite/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:focal + +ENV DEBIAN_FRONTEND=noninteractive +ENV TZ=America/Los_Angeles +ENV BUILDKITE=true +ENV CI=true + +RUN apt-get update -qq +RUN apt-get install -y -qq \ + curl python-is-python3 git build-essential \ + sudo unzip apt-utils dialog tzdata wget +RUN locale -a + +RUN mkdir /bazel-cache; \ + (echo "build --remote_cache=https://ray-bazel-remote.g1jl7rtfvrm4o.us-west-2.cs.amazonlightsail.com" >> /root/.bazelrc) + +RUN mkdir /ray +WORKDIR /ray + +# Below should be re-run each time +COPY . . +RUN ./ci/travis/ci.sh init +RUN ./ci/travis/ci.sh build diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml new file mode 100644 index 000000000000..d577aa9c8150 --- /dev/null +++ b/.buildkite/pipeline.yml @@ -0,0 +1,7 @@ +# TODO: doc +- label: "Ray Core Tests" + commands: + - bash src/ray/test/run_object_manager_tests.sh + - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only -- //:all -rllib/... +- label: "Ray Dashboard Tests" + command: bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only python/ray/new_dashboard/... \ No newline at end of file diff --git a/ci/travis/ci.sh b/ci/travis/ci.sh index 3638b3af36e5..3c623bcff133 100755 --- a/ci/travis/ci.sh +++ b/ci/travis/ci.sh @@ -208,9 +208,12 @@ build_dashboard_front_end() { else ( cd ray/new_dashboard/client - set +x # suppress set -x since it'll get very noisy here - . "${HOME}/.nvm/nvm.sh" - nvm use --silent node + + if [ -z "${BUILDKITE-}" ]; then + set +x # suppress set -x since it'll get very noisy here + . "${HOME}/.nvm/nvm.sh" + nvm use --silent node + fi install_npm_project npm run -s build ) diff --git a/ci/travis/install-bazel.sh b/ci/travis/install-bazel.sh index 2ba58b1ff0e2..1f125de66218 100755 --- a/ci/travis/install-bazel.sh +++ b/ci/travis/install-bazel.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -x +set -x set -euo pipefail ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) @@ -115,6 +115,8 @@ if [ "${CI-}" = true ]; then cat <> ~/.bazelrc build --google_credentials="${translated_path}" EOF + elif [ -n "${BUILDKITE-}" ]; then + echo "Using buildkite secret store to communicate with cache address" else echo "Using remote build cache in read-only mode." 1>&2 cat <> ~/.bazelrc diff --git a/ci/travis/install-dependencies.sh b/ci/travis/install-dependencies.sh index 7bc73e967051..dcc98285264f 100755 --- a/ci/travis/install-dependencies.sh +++ b/ci/travis/install-dependencies.sh @@ -187,6 +187,10 @@ install_nvm() { "nvm() { \"\${NVM_HOME}/nvm.exe\" \"\$@\"; }" \ > "${NVM_HOME}/nvm.sh" fi + elif [ -n "${BUILDKITE-}" ]; then + # https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions + curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - + sudo apt-get install -y nodejs else test -f "${NVM_HOME}/nvm.sh" # double-check NVM is already available on other platforms fi @@ -227,7 +231,9 @@ install_node() { } install_toolchains() { - "${ROOT_DIR}"/install-toolchains.sh + if [ -z "${BUILDKITE-}" ]; then + "${ROOT_DIR}"/install-toolchains.sh + fi } install_dependencies() { @@ -251,11 +257,13 @@ install_dependencies() { if [ -n "${PYTHON-}" ]; then # PyTorch is installed first since we are using a "-f" directive to find the wheels. # We want to install the CPU version only. - local torch_url="https://download.pytorch.org/whl/torch_stable.html" - case "${OSTYPE}" in - darwin*) pip install torch torchvision;; - *) pip install torch==1.7.0+cpu torchvision==0.8.1+cpu -f "${torch_url}";; - esac + if [ -z "${BUILDKITE-}" ]; then + local torch_url="https://download.pytorch.org/whl/torch_stable.html" + case "${OSTYPE}" in + darwin*) pip install torch torchvision;; + *) pip install torch==1.7.0+cpu torchvision==0.8.1+cpu -f "${torch_url}";; + esac + fi # Try n times; we often encounter OpenSSL.SSL.WantReadError (or others) # that break the entire CI job: Simply retry installation in this case