From 87e34afa9c4cd5126d0d4904d31790d27b54d5b2 Mon Sep 17 00:00:00 2001 From: atalman Date: Wed, 5 Jul 2023 06:23:42 -0700 Subject: [PATCH] Remove previous installations on macos-arm64 before smoke testing More arm64 changes test run under environment sleep 15min allow investigate add sleep test test Test test test Arm64 use python fix test testing test tests testing test test --- .github/scripts/validate_binaries.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh index c6a8afffc..56668ab77 100755 --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -7,7 +7,13 @@ else conda activate ${ENV_NAME} INSTALLATION=${MATRIX_INSTALLATION/"conda install"/"conda install -y"} - # Make sure we remove previous installation if it exists + export OLD_PATH=${PATH} + # Workaround macos-arm64 runners. Issue: https://github.com/pytorch/test-infra/issues/4342 + if [[ ${TARGET_OS} == 'macos-arm64' ]]; then + export PATH="${CONDA_PREFIX}/bin:${PATH}" + fi + + # Make sure we remove previous installation if it exists, this issue seems to affect only if [[ ${MATRIX_PACKAGE_TYPE} == 'wheel' ]]; then pip3 uninstall -y torch torchaudio torchvision fi @@ -25,6 +31,10 @@ else python3 ./test/smoke_test/smoke_test.py fi + if [[ ${TARGET_OS} == 'macos-arm64' ]]; then + export PATH=${OLD_PATH} + fi + conda deactivate conda env remove -n ${ENV_NAME} fi