ray/.buildkite/pipeline.windows.yml
SangBin Cho 5298ee83b2
[Test] Revert (partially) Fix windows buildkite (#26615) (#27495)
Root cause:
https://www.shell-tips.com/bash/source-dot-command/#gsc.tab=0
Using . will execute the command in the "current shell" in a bash script. It looks like removing . command from ci.sh init means that we will lose the set -eo command used within ci.sh init applied to next test running commands because set -eo is called within a child process, not the current shell (so the future command won't have the set -eo configured).
2022-08-04 13:55:48 -07:00

46 lines
1.8 KiB
YAML

prelude_commands: &prelude_commands |-
set -ex
mkdir ray
cd ray
git config --global core.symlinks true
git config --global core.autocrlf false
git init
git remote add origin https://github.com/ray-project/ray.git
if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then export BUILDKITE_GIT_REF=${BUILDKITE_COMMIT}; else export BUILDKITE_GIT_REF=refs/pull/${BUILDKITE_PULL_REQUEST}/head; fi
git fetch -v --prune -- origin ${BUILDKITE_GIT_REF}
git checkout -f ${BUILDKITE_COMMIT}
export PYTHON="3.6"
export RAY_USE_RANDOM_PORTS="1"
export RAY_DEFAULT_BUILD="1"
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
powershell ci/pipeline/fix-windows-container-networking.ps1
cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
upload_wheels_if_needed: &upload_wheels_if_needed |-
if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
pip install -q docker aws_requests_auth boto3
python .buildkite/copy_files.py --destination branch_wheels --path python/dist
if [ "$BUILDKITE_BRANCH" = "master" ]; then python .buildkite/copy_files.py --destination wheels --path python/dist; fi
steps:
- label: ":windows: Build & Test"
parallelism: 6
commands:
- *prelude_commands
# conda init should be moved to the docker image setup
- conda init
- . ./ci/ci.sh init
- ./ci/ci.sh build
- if [ "${BUILDKITE_PARALLEL_JOB}" = "0" ]; then ./ci/ci.sh test_core; fi
# The next command will be sharded into $parallelism shards.
- ./ci/ci.sh test_python
- label: ":windows: Wheels"
commands:
- *prelude_commands
- export WINDOWS_WHEELS="1"
- . ./ci/ci.sh init
- ./ci/ci.sh build
- *upload_wheels_if_needed