From a74ecaf0f6fd05247b7e6ecf9069bb3024511ca2 Mon Sep 17 00:00:00 2001 From: PyTorch MergeBot Date: Thu, 23 Mar 2023 02:53:49 +0000 Subject: [PATCH] Revert "Retry download and install NDK when testing Android (#97067)" This reverts commit d9b289b74749f76ea9a8c27e74fb60251ff42a66. Reverted https://github.com/pytorch/pytorch/pull/97067 on behalf of https://github.com/huydhn due to Need to rework this a bit as sdkmanager does not correctly treat a failed download as failure (surprise) https://github.com/pytorch/pytorch/actions/runs/4495666042/jobs/7909537961 --- .github/workflows/_run_android_tests.yml | 27 +++++++----------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/_run_android_tests.yml b/.github/workflows/_run_android_tests.yml index 3b18241dc5a32..28a72558f5913 100644 --- a/.github/workflows/_run_android_tests.yml +++ b/.github/workflows/_run_android_tests.yml @@ -53,28 +53,17 @@ jobs: python-version: 3.8 environment-file: .github/requirements/conda-env-${{ runner.os }}-${{ runner.arch }} - - name: Install NDK - uses: nick-fields/retry@v2.8.2 - with: - timeout_minutes: 5 - max_attempts: 3 - retry_wait_seconds: 90 - command: | - # Install NDK 21 after GitHub update - # https://github.com/actions/virtual-environments/issues/5595 - ANDROID_ROOT="/usr/local/lib/android" - ANDROID_SDK_ROOT="${ANDROID_ROOT}/sdk" - - SDKMANAGER="${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" - # This step downloads and installs NDK, thus it could be flaky - echo "y" | ${SDKMANAGER} "ndk;21.4.7075529" - - echo "ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}" >> "${GITHUB_ENV}" - - name: Build PyTorch Android run: | + # Install NDK 21 after GitHub update + # https://github.com/actions/virtual-environments/issues/5595 + ANDROID_ROOT="/usr/local/lib/android" + ANDROID_SDK_ROOT="${ANDROID_ROOT}/sdk" + SDKMANAGER="${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" + echo "y" | ${SDKMANAGER} "ndk;21.4.7075529" + export ANDROID_NDK="${ANDROID_SDK_ROOT}/ndk-bundle" - ln -sfn "${ANDROID_SDK_ROOT}/ndk/21.4.7075529" "${ANDROID_NDK}" + ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK} echo "CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname "$(which conda)")/../"}" >> "${GITHUB_ENV}" ${CONDA_RUN} ./scripts/build_pytorch_android.sh x86