Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various CI fixes and cleanup #8289

Merged
merged 21 commits into from
May 5, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build --enable_platform_specific_config
###############################################################################
# On Windows, provide: USE_CLANG_CL=1, CC=clang, BAZEL_LLVM, BAZEL_SH
# On all platforms, provide: PYTHON2_BIN_PATH, PYTHON3_BIN_PATH
# On all platforms, provide: PYTHON3_BIN_PATH=python
###############################################################################
build --action_env=PATH
build:linux --compilation_mode=opt
Expand Down
2 changes: 1 addition & 1 deletion bazel/ray_deps_setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ def ray_deps_setup():
url = "https://github.com/grpc/grpc/archive/4790ab6d97e634a1ede983be393f3bb3c132b2f7.tar.gz",
sha256 = "df83bd8a08975870b8b254c34afbecc94c51a55198e6e3a5aab61d62f40b7274",
patches = [
"//thirdparty/patches:grpc-command-quoting.patch",
"//thirdparty/patches:grpc-cython-copts.patch",
"//thirdparty/patches:grpc-python.patch",
],
)

Expand Down
6 changes: 0 additions & 6 deletions ci/travis/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ reload_env() {
export TRAVIS_PULL_REQUEST
fi

export PYTHON3_BIN_PATH=python
if [ "${OSTYPE}" = msys ]; then
export USE_CLANG_CL=1
fi

# NOTE: Modifying PATH invalidates Bazel's cache! Do not add to PATH unnecessarily.
PATH="${HOME}/miniconda/bin":"${PATH}"
if [ "${OSTYPE}" = msys ]; then
Expand Down Expand Up @@ -350,7 +345,6 @@ init() {

configure_system

"${ROOT_DIR}"/install-bazel.sh
. "${ROOT_DIR}"/install-dependencies.sh

cat <<EOF >> ~/.bashrc
Expand Down
29 changes: 14 additions & 15 deletions ci/travis/install-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,20 @@ esac
fi
}

if [ "${OSTYPE}" = "msys" ]; then
target="${MINGW_DIR-/usr}/bin/bazel.exe"
mkdir -p "${target%/*}"
curl -s -L -R -o "${target}" "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-${platform}-${achitecture}.exe"
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}"
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}"
sudo=sudo
exe_suffix=""
bazel_target="/usr/local/bin/bazel"
if [ "${OSTYPE}" = msys ]; then
sudo=""
exe_suffix=".exe"
bazel_target="${MINGW_PREFIX}/bin/bazel.exe"
fi
${sudo} curl -f -s -L -R -o "${bazel_target}" "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-${platform}-${achitecture}${exe_suffix}"
mehrdadn marked this conversation as resolved.
Show resolved Hide resolved
${sudo} chmod +x "${bazel_target}"
if [ "${OSTYPE}" = msys ]; then
${sudo} tee /etc/profile.d/bazel.sh > /dev/null <<EOF; . /etc/profile.d/bazel.sh
export USE_CLANG_CL=1 # Clang front-end for Visual C++
EOF
fi

if [ "${TRAVIS-}" = true ]; then
Expand Down
8 changes: 8 additions & 0 deletions ci/travis/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ pkg_install_helper() {
esac
}

install_bazel() {
"${ROOT_DIR}"/install-bazel.sh
if [ -f /etc/profile.d/bazel.sh ]; then
. /etc/profile.d/bazel.sh
fi
}

install_base() {
case "${OSTYPE}" in
linux*)
Expand Down Expand Up @@ -124,6 +131,7 @@ install_node() {

install_dependencies() {

install_bazel
install_base
if [ -n "${GITHUB_WORKFLOW-}" ]; then # Keep Travis's built-in compilers and only use this for GitHub Actions (for now)
"${ROOT_DIR}"/install-toolchains.sh
Expand Down
7 changes: 0 additions & 7 deletions thirdparty/patches/grpc-command-quoting.patch

This file was deleted.

23 changes: 23 additions & 0 deletions thirdparty/patches/grpc-python.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git third_party/py/python_configure.bzl third_party/py/python_configure.bzl
--- third_party/py/python_configure.bzl
+++ third_party/py/python_configure.bzl
@@ -163,1 +163,1 @@
- bash_bin_path = repository_ctx.which("bash")
+ bash_bin_path = repository_ctx.which("bash" if not _is_windows(repository_ctx) else "sh.exe")
@@ -193,1 +193,1 @@ def _get_python_lib(repository_ctx, python_bin, lib_path_key):
- cmd = '%s - %s' % (python_bin, print_lib)
+ cmd = '"%s" - %s' % (python_bin, print_lib)
@@ -275,10 +275,10 @@
_create_single_version_package(repository_ctx,
"_python2",
_PYTHON2_BIN_PATH,
- "python",
+ "python" if not _is_windows(repository_ctx) else "python.exe",
_PYTHON2_LIB_PATH)
_create_single_version_package(repository_ctx,
"_python3",
_PYTHON3_BIN_PATH,
- "python3",
+ "python3" if not _is_windows(repository_ctx) else "python.exe",
_PYTHON3_LIB_PATH)
--