Skip to content

Commit

Permalink
[all_tests][ci] Use .zshenv to avoid conda setting up breaks the pipe…
Browse files Browse the repository at this point in the history
…line (#30999)

We have seen mac wheel build failures like when setting up the environment. 

The error was raised when doing `source ~/.zshrc` which contains 
- an export PATH to include bazel that `ci.sh init` puts in
- default conda activation code comes with the sandbox. 

We don't use condas for the mac builds and tests I believe, and this PR moves the PATH export to `.zshenv` for environment.

(This also reverts the PR: #30911) 

Signed-off-by: rickyyx <[email protected]>
  • Loading branch information
rickyyx committed Dec 16, 2022
1 parent f8936f9 commit 9bf1f57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .buildkite/pipeline.macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ prelude_commands: &prelude_commands |-
rm -rf /tmp/bazel_event_logs
cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
(which bazel && bazel clean) || true;
. ./ci/ci.sh init && source ~/.zshrc
. ./ci/ci.sh init && source ~/.zshenv
./ci/ci.sh build
./ci/env/install-dependencies.sh
./ci/env/env_info.sh
Expand Down Expand Up @@ -46,8 +46,7 @@ steps:
- export MAC_WHEELS=1
- export MAC_JARS=1
- export RAY_INSTALL_JAVA=1
- . ./ci/ci.sh init
- source ~/.zshrc
- . ./ci/ci.sh init && source ~/.zshenv
- ./ci/ci.sh build
# Test wheels
- ./ci/ci.sh test_wheels
Expand Down
4 changes: 2 additions & 2 deletions ci/env/install-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ if [ "${BAZEL_CONFIG_ONLY-}" != "1" ]; then
"${target}" --user
# Add bazel to the path.
# shellcheck disable=SC2016
printf '\nexport PATH="$HOME/bin:$PATH"\n' >> ~/.zshrc
printf '\nexport PATH="$HOME/bin:$PATH"\n' >> ~/.zshenv
# shellcheck disable=SC1090
source ~/.zshrc
source ~/.zshenv
elif [ "${CI-}" = true ] || [ "${arg1-}" = "--system" ]; then
"$(command -v sudo || echo command)" "${target}" > /dev/null # system-wide install for CI
else
Expand Down

0 comments on commit 9bf1f57

Please sign in to comment.