Skip to content

Commit aa33aba

Browse files
mehrdadnweb-flow
andauthored
Fix pip and Bazel interaction messing up CI (#9506)
Co-authored-by: Mehrdad <noreply@github.com>
1 parent 60a838f commit aa33aba

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

ci/travis/ci.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,21 +233,27 @@ install_go() {
233233
fi
234234
}
235235

236-
bazel_ensure_buildable_on_windows() {
236+
_bazel_build_before_install() {
237+
local target
237238
if [ "${OSTYPE}" = msys ]; then
238-
# This performs as full of a build as possible, to ensure the repository always remains buildable on Windows.
239+
# On Windows, we perform as full of a build as possible, to ensure the repository always remains buildable on Windows.
239240
# (Pip install will not perform a full build.)
240-
# NOTE: Do not add build flags here. Use .bazelrc and --config instead.
241-
bazel build -k "//:*"
241+
target="//:*"
242+
else
243+
# Just build Python on other platforms.
244+
# This because pip install captures & suppresses the build output, which causes a timeout on CI.
245+
target="//:ray_pkg"
242246
fi
247+
# NOTE: Do not add build flags here. Use .bazelrc and --config instead.
248+
bazel build -k "${target}"
243249
}
244250

245251
install_ray() {
246252
# TODO(mehrdadn): This function should be unified with the one in python/build-wheel-windows.sh.
247253
(
248254
cd "${WORKSPACE_DIR}"/python
249255
build_dashboard_front_end
250-
pip install -v -v -e .
256+
keep_alive pip install -v -e .
251257
)
252258
}
253259

@@ -431,7 +437,7 @@ init() {
431437
}
432438

433439
build() {
434-
bazel_ensure_buildable_on_windows
440+
_bazel_build_before_install
435441

436442
if ! need_wheels; then
437443
install_ray

python/build-wheel-windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ install_ray() {
3232
pip install wheel
3333

3434
cd "${WORKSPACE_DIR}"/python
35-
pip install -v -e .
35+
"${WORKSPACE_DIR}"/ci/keep_alive pip install -v -e .
3636
)
3737
}
3838

0 commit comments

Comments
 (0)