Skip to content

Commit

Permalink
Revert "Retry download and install NDK when testing Android (pytorch#…
Browse files Browse the repository at this point in the history
…97067)"

This reverts commit d9b289b.

Reverted pytorch#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
  • Loading branch information
pytorchmergebot committed Mar 23, 2023
1 parent da7c42f commit a74ecaf
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions .github/workflows/_run_android_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
Expand Down

0 comments on commit a74ecaf

Please sign in to comment.