diff --git a/.github/workflows/ygopro-core.yml b/.github/workflows/ygopro-core.yml index 4fe08d3f..386efc57 100644 --- a/.github/workflows/ygopro-core.yml +++ b/.github/workflows/ygopro-core.yml @@ -248,6 +248,9 @@ jobs: with: fetch-depth: 1 submodules: recursive + - name: Setup Android NDK + shell: bash + run: ./scripts/setup-ndk.sh - name: Build shell: bash run: ./scripts/build-android.sh diff --git a/scripts/build-android.sh b/scripts/build-android.sh index 532ace70..4d85e58e 100755 --- a/scripts/build-android.sh +++ b/scripts/build-android.sh @@ -2,12 +2,6 @@ set -euxo pipefail -NDK_VERSION=${NDK_VERSION:-"21.4.7075529"} - -SDKMANAGER=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager -echo y | $SDKMANAGER "ndk;$NDK_VERSION" -ln -sfn $ANDROID_HOME/ndk/$NDK_VERSION $ANDROID_HOME/ndk-bundle - PROCS="" if [[ "$TRAVIS_OS_NAME" == "macosx" ]]; then PROCS=$(sysctl -n hw.ncpu) diff --git a/scripts/setup-ndk.sh b/scripts/setup-ndk.sh new file mode 100755 index 00000000..f8ac52c8 --- /dev/null +++ b/scripts/setup-ndk.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +NDK_VERSION=${NDK_VERSION:-"21.4.7075529"} + +SDKMANAGER=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager +echo y | $SDKMANAGER "ndk;$NDK_VERSION" +ln -sfn $ANDROID_HOME/ndk/$NDK_VERSION $ANDROID_HOME/ndk-bundle