Skip to content

Commit

Permalink
Update android-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kishorekumar-anchala authored Dec 13, 2024
1 parent 640b35c commit 25eee9e
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ on:
workflow_dispatch:
push:
branches:
- main
- rel-*
- rel-*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -13,17 +12,11 @@ env:
ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1"
ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime"
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_HOME: "/usr/local/lib/android/sdk"

ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk"
jobs:
android_x64:
# Note: linux is the only good option for the Android emulator currently.
# it doesn't work on macos-14.
# HVF error: HV_UNSUPPORTED
# it works on macos-13 but with macos-15 being released soon that isn't a long term solution.
runs-on: ubuntu-latest
steps:
- name: Checkout OnnxRuntime GenAI repo
Expand All @@ -43,7 +36,14 @@ jobs:
with:
gradle-version: '8.6'

# Check the NDK that we're using
- name: Install SDK Tools
run: |
yes | sdkmanager --install "platform-tools" "platforms;android-27"
- name: Install Android Emulator
run: |
yes | sdkmanager --install "emulator"
- name: Check Android NDKs
run: |
set -e -x
Expand All @@ -52,7 +52,6 @@ jobs:
echo "ANDROID_NDK_LATEST_HOME=$ANDROID_NDK_LATEST_HOME"
ls -l $ANDROID_HOME/ndk
# Needed for linux
- name: Install jq
run: |
sudo apt-get install jq
Expand All @@ -61,18 +60,12 @@ jobs:
with:
dotnet-version: '8.0.x'

- name: Checkout OnnxRuntime GenAI repo
uses: actions/checkout@v4
with:
submodules: true

- name: Get the Latest OnnxRuntime Nightly Version
run: |
ORT_NIGHTLY_VERSION=$(curl -s "${{ env.ORT_NIGHTLY_REST_API }}" | jq -r '.value[0].versions[0].normalizedVersion')
echo "$ORT_NIGHTLY_VERSION"
echo "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" >> $GITHUB_ENV
# have to create a dummy project to use `add package`
- name: Download OnnxRuntime Nightly
run: |
dotnet new console
Expand Down

0 comments on commit 25eee9e

Please sign in to comment.