Skip to content

Commit

Permalink
Attempt to add script to ensure android ndk 21 is installed when bui…
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Jul 25, 2022
1 parent 8bd6030 commit bce6074
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
)
env:
DEPLOY_BRANCH: android
OS_NAME: linux
LIBWINDBOT_URL: https://github.com/ProjectIgnis/windbot/releases/download/20220213/libWindbot.aar
LIBWINDBOT_RESOURCES: https://github.com/ProjectIgnis/windbot/releases/download/20220213/WindBotIgnite-Resources.7z
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
Expand All @@ -35,12 +36,7 @@ jobs:
run: |
echo "sdk.dir=$ANDROID_HOME" > local.properties
- name: Build client
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
$ANDROID_HOME/ndk-bundle/ndk-build -j2
run: ./ci/build-android.sh
- name: Build base apk
run: |
./ci/touch-assets.sh
Expand Down
20 changes: 20 additions & 0 deletions ci/build-android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

set -euxo pipefail

if [[ "$OS_NAME" == "osx" ]]; then
ANDROID_HOME=$HOME/Library/Android/sdk
SDKMANAGER=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager
echo y | $SDKMANAGER "ndk;21.4.7075529"
ln -sfn $ANDROID_HOME/ndk/21.4.7075529 $ANDROID_HOME/ndk-bundle
$ANDROID_HOME/ndk-bundle/ndk-build -j3
fi
if [[ "$OS_NAME" == "linux" ]]; then
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"
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
$ANDROID_HOME/ndk-bundle/ndk-build -j2
fi

0 comments on commit bce6074

Please sign in to comment.