Skip to content

Commit d3a6b88

Browse files
committed
[Android] Add llama demo app to CI
1 parent cd7d5c3 commit d3a6b88

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

build/test_android_ci.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ build_executorch() {
2020
rm -rf cmake-out && mkdir cmake-out
2121
ANDROID_NDK=/opt/ndk BUCK2=$(which buck2) FLATC=$(which flatc) ANDROID_ABI=arm64-v8a \
2222
bash examples/demo-apps/android/ExecuTorchDemo/setup.sh
23+
ANDROID_NDK=/opt/ndk BUCK2=$(which buck2) FLATC=$(which flatc) ANDROID_ABI=arm64-v8a \
24+
bash examples/demo-apps/android/LlamaDemo/setup.sh
2325
}
2426

2527
build_android_demo_app() {
@@ -28,5 +30,12 @@ build_android_demo_app() {
2830
popd
2931
}
3032

33+
build_android_llama_demo_app() {
34+
pushd examples/demo-apps/android/LlamaDemo
35+
ANDROID_HOME=/opt/android/sdk ./gradlew build
36+
popd
37+
}
38+
3139
build_executorch
3240
build_android_demo_app
41+
build_android_llama_demo_app

examples/demo-apps/android/LlamaDemo/setup.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright (c) Meta Platforms, Inc. and affiliates.
33
# All rights reserved.
44
#
@@ -48,7 +48,3 @@ cmake --build "${CMAKE_OUT}"/extension/android -j "${CMAKE_JOBS}"
4848
JNI_LIBS_PATH="examples/demo-apps/android/LlamaDemo/app/src/main/jniLibs"
4949
mkdir -p "${JNI_LIBS_PATH}/${ANDROID_ABI}"
5050
cp "${CMAKE_OUT}"/extension/android/libexecutorch_llama_jni.so "${JNI_LIBS_PATH}/${ANDROID_ABI}/"
51-
52-
pushd extension/android
53-
./gradlew build
54-
popd

0 commit comments

Comments
 (0)