mirror of
https://github.com/wassname/ray.git
synced 2026-07-18 12:40:56 +08:00
Fix pip and Bazel interaction messing up CI (#9506)
Co-authored-by: Mehrdad <noreply@github.com>
This commit is contained in:
+12
-6
@@ -233,13 +233,19 @@ install_go() {
|
||||
fi
|
||||
}
|
||||
|
||||
bazel_ensure_buildable_on_windows() {
|
||||
_bazel_build_before_install() {
|
||||
local target
|
||||
if [ "${OSTYPE}" = msys ]; then
|
||||
# This performs as full of a build as possible, to ensure the repository always remains buildable on Windows.
|
||||
# On Windows, we perform as full of a build as possible, to ensure the repository always remains buildable on Windows.
|
||||
# (Pip install will not perform a full build.)
|
||||
# NOTE: Do not add build flags here. Use .bazelrc and --config instead.
|
||||
bazel build -k "//:*"
|
||||
target="//:*"
|
||||
else
|
||||
# Just build Python on other platforms.
|
||||
# This because pip install captures & suppresses the build output, which causes a timeout on CI.
|
||||
target="//:ray_pkg"
|
||||
fi
|
||||
# NOTE: Do not add build flags here. Use .bazelrc and --config instead.
|
||||
bazel build -k "${target}"
|
||||
}
|
||||
|
||||
install_ray() {
|
||||
@@ -247,7 +253,7 @@ install_ray() {
|
||||
(
|
||||
cd "${WORKSPACE_DIR}"/python
|
||||
build_dashboard_front_end
|
||||
pip install -v -v -e .
|
||||
keep_alive pip install -v -e .
|
||||
)
|
||||
}
|
||||
|
||||
@@ -431,7 +437,7 @@ init() {
|
||||
}
|
||||
|
||||
build() {
|
||||
bazel_ensure_buildable_on_windows
|
||||
_bazel_build_before_install
|
||||
|
||||
if ! need_wheels; then
|
||||
install_ray
|
||||
|
||||
@@ -32,7 +32,7 @@ install_ray() {
|
||||
pip install wheel
|
||||
|
||||
cd "${WORKSPACE_DIR}"/python
|
||||
pip install -v -e .
|
||||
"${WORKSPACE_DIR}"/ci/keep_alive pip install -v -e .
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user