Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/android_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
java-package: jdk
architecture: x64
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
run: ./ci/mac_ci_setup.sh --android
- name: 'Start simulator'
run: ./ci/mac_start_emulator.sh
# Return to using:
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
java-package: jdk
architecture: x64
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
run: ./ci/mac_ci_setup.sh --android
- name: 'Start simulator'
run: ./ci/mac_start_emulator.sh
# Return to using:
Expand Down
16 changes: 9 additions & 7 deletions ci/mac_ci_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,18 @@ pip3 install slackclient
sudo xcode-select --switch /Applications/Xcode_13.2.1.app

if [[ "${1:-}" == "--android" ]]; then
# Download and set up ndk 21. Github upgraded to ndk 22 for their Mac image.
# Download and set up ndk 21 after GitHub update
# https://github.com/actions/virtual-environments/issues/5595
ANDROID_ROOT="/Users/runner/Library/Android"
ANDROID_SDK_ROOT="${ANDROID_ROOT}/sdk"
ANDROID_HOME=$ANDROID_SDK_ROOT
SDKMANAGER=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager

SDKMANAGER="${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager"
$SDKMANAGER --uninstall "ndk-bundle"
$SDKMANAGER --install "ndk;21.3.6528147"
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

# Download and set up build-tools 30.0.3, 31.0.0 is missing dx.jar.
$SDKMANAGER --uninstall "build-tools;31.0.0"
$SDKMANAGER --install "build-tools;30.0.3"

export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/21.3.6528147
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/21.4.7075529
fi