[CI] Upload macOS bazel test files (#25744)

This commit is contained in:
Simon Mo 2022-06-15 10:09:04 -07:00 committed by GitHub
parent f61f60f708
commit 503e197f8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 13 deletions

View file

@ -15,8 +15,13 @@ if [ -d "/tmp/artifacts" ]; then
if [ "$(ls -A /tmp/artifacts)" ]; then
echo "Directory not empty, cleaning up..."
# Need to run in docker to avoid permission issues
docker run --rm -v /tmp/artifacts:/artifact-mount alpine:latest /bin/sh -c 'rm -rf /artifact-mount/*; rm -rf /artifact-mount/.[!.]*' || true
if [[ "${OSTYPE}" = darwin* ]]; then
rm -rf /tmp/artifacts
mkdir -p /tmp/artifacts
else
# Need to run in docker to avoid permission issues
docker run --rm -v /tmp/artifacts:/artifact-mount alpine:latest /bin/sh -c 'rm -rf /artifact-mount/*; rm -rf /artifact-mount/.[!.]*' || true
fi
else
echo "Directory already empty, no need to clean up."
fi

View file

@ -1,6 +1,4 @@
common: &common
artifact_paths:
- "/tmp/bazel_event_logs/*"
env:
BUILDKITE: "true"
CI: "true"
@ -11,7 +9,8 @@ common: &common
LANG: en_US.UTF-8
prelude_commands: &prelude_commands |-
./ci/build/upload_build_info.sh
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 build
@ -29,7 +28,8 @@ steps:
conditions: ["RAY_CI_MACOS_WHEELS_AFFECTED", "RAY_CI_PYTHON_DEPENDENCIES_AFFECTED"]
commands:
# Cleanup environments
- ./ci/build/upload_build_info.sh
- 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
# TODO(simon): make sure to change both PR and wheel builds
# Special setup for jar builds (will be installed to the machine instead)

View file

@ -35,11 +35,7 @@ if [[ -z "${BUILDKITE-}" ]]; then
aws s3 cp --recursive /tmp/bazel_event_logs "${DST}"
else
if [[ "${OSTYPE}" = darwin* ]]; then
echo "Using Buildkite Artifact Store on macOS"
else
# Codepath for Buildkite
pip install -q docker aws_requests_auth boto3
python .buildkite/copy_files.py --destination logs --path /tmp/bazel_event_logs
fi
# Codepath for Buildkite
pip install -q docker aws_requests_auth boto3
python .buildkite/copy_files.py --destination logs --path /tmp/bazel_event_logs
fi