Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin NDK version #1250

Merged
merged 5 commits into from
Feb 13, 2025
Merged
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
12 changes: 8 additions & 4 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
ORT_NIGHTLY_SOURCE: "https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/nuget/v3/index.json"
# ANDROID_ABI: "arm64-v8a"
ANDROID_ABI: "x86_64"
ANDROID_NDK_VERSION: "27.2.12479018" # LTS version
jobs:
android_x64:
# Note: linux is the only good option for the Android emulator currently.
Expand Down Expand Up @@ -49,8 +50,11 @@ jobs:
ls -l $ANDROID_HOME

echo "ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT"
"${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" --install "ndk;${{ env.ANDROID_NDK_VERSION }}"

echo "ANDROID_NDK_HOME=${ANDROID_SDK_ROOT}/ndk/${{ env.ANDROID_NDK_VERSION }}" >> $GITHUB_ENV
echo "ANDROID_AVD_HOME=${{ runner.temp }}" >> $GITHUB_ENV

echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME"
echo "ANDROID_NDK_LATEST_HOME=$ANDROID_NDK_LATEST_HOME"
ls -l $ANDROID_HOME/ndk

Expand All @@ -76,12 +80,12 @@ jobs:
run: |
set -e -x
rm -rf build
./build.sh --android --android_api=27 --android_ndk_path=${ANDROID_NDK_LATEST_HOME} --config=RelWithDebInfo --android_abi=${{ env.ANDROID_ABI }} --parallel --build_java --update
./build.sh --android --android_api=27 --android_ndk_path=${ANDROID_NDK_HOME} --config=RelWithDebInfo --android_abi=${{ env.ANDROID_ABI }} --parallel --build_java --update

- name: Run Android build
run: |
set -e -x
./build.sh --android --android_api=27 --android_ndk_path=${ANDROID_NDK_LATEST_HOME} --config=RelWithDebInfo --android_abi=${{ env.ANDROID_ABI }} --parallel --build_java --build
./build.sh --android --android_api=27 --android_ndk_path=${ANDROID_NDK_HOME} --config=RelWithDebInfo --android_abi=${{ env.ANDROID_ABI }} --parallel --build_java --build

- name: Enable KVM group perms so Android emulator can run
run: |
Expand All @@ -92,4 +96,4 @@ jobs:
- name: Run Android tests
run: |
set -e -x
./build.sh --android --android_api=27 --android_ndk_path=${ANDROID_NDK_LATEST_HOME} --config=RelWithDebInfo --android_abi=${{ env.ANDROID_ABI }} --parallel --build_java --android_run_emulator --test
./build.sh --android --android_api=27 --android_ndk_path=${ANDROID_NDK_HOME} --config=RelWithDebInfo --android_abi=${{ env.ANDROID_ABI }} --parallel --build_java --android_run_emulator --test
Loading