File tree Expand file tree Collapse file tree 3 files changed +13
-25
lines changed
Expand file tree Collapse file tree 3 files changed +13
-25
lines changed Original file line number Diff line number Diff line change @@ -12,24 +12,10 @@ if [[ -z "${PYTHON_EXECUTABLE:-}" ]]; then
1212fi
1313which " ${PYTHON_EXECUTABLE} "
1414
15- build_android_test () {
16- mkdir -p " ${BUILD_AAR_DIR} " /executorch_android/src/androidTest/resources
17- cp extension/module/test/resources/add.pte " ${BUILD_AAR_DIR} " /executorch_android/src/androidTest/resources
15+ mkdir -p " ${BUILD_AAR_DIR} " /executorch_android/src/androidTest/resources
16+ cp extension/module/test/resources/add.pte " ${BUILD_AAR_DIR} " /executorch_android/src/androidTest/resources
1817
19- pushd " ${BUILD_AAR_DIR} "
20- ANDROID_HOME=" ${ANDROID_SDK:-/ opt/ android/ sdk} " ./gradlew :executorch_android:testDebugUnitTest
21- ANDROID_HOME=" ${ANDROID_SDK:-/ opt/ android/ sdk} " ./gradlew :executorch_android:assembleAndroidTest
22- if [ -n " $ARTIFACTS_DIR_NAME " ]; then
23- mkdir -p " ${ARTIFACTS_DIR_NAME} /library_test_dir"
24- cp executorch_android/build/outputs/apk/androidTest/debug/executorch_android-debug-androidTest.apk " ${ARTIFACTS_DIR_NAME} /library_test_dir"
25- fi
26- popd
27- }
28-
29- main () {
30- build_android_test
31- }
32-
33- if [[ " ${BASH_SOURCE[0]} " == " ${0} " ]]; then
34- main " $@ "
35- fi
18+ pushd " ${BUILD_AAR_DIR} "
19+ ANDROID_HOME=" ${ANDROID_SDK:-/ opt/ android/ sdk} " ./gradlew :executorch_android:testDebugUnitTest
20+ ANDROID_HOME=" ${ANDROID_SDK:-/ opt/ android/ sdk} " ./gradlew :executorch_android:assembleAndroidTest
21+ popd
Original file line number Diff line number Diff line change 3131 # Build LLM Demo for Android
3232 export BUILD_AAR_DIR=aar-out
3333 mkdir -p $BUILD_AAR_DIR
34- bash build/build_android_library.sh ${ARTIFACTS_DIR_NAME}
35- bash .ci/scripts/build_android_instrumentation.sh ${ARTIFACTS_DIR_NAME}
34+ bash build/build_android_library.sh
35+ cp ${BUILD_AAR_DIR}/executorch.aar $ARTIFACTS_DIR_NAME
36+
37+ mkdir -p ${ARTIFACTS_DIR_NAME}/library_test_dir
38+ bash .ci/scripts/build_android_instrumentation.sh
39+ cp ${BUILD_AAR_DIR}/executorch_android/build/outputs/apk/androidTest/debug/executorch_android-debug-androidTest.apk "${ARTIFACTS_DIR_NAME}/library_test_dir"
3640
3741 mkdir -p ${ARTIFACTS_DIR_NAME}/fp32-xnnpack-custom
3842 bash examples/models/llama/install_requirements.sh
96100 curl -O https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/llm_demo/app-debug.apk
97101 curl -O https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/llm_demo/app-debug-androidTest.apk
98102 curl -O https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/fp32-xnnpack-custom/model.zip
99- curl -o android-test-debug-androidTest.apk https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/library_test_dir/executorch -debug-androidTest.apk
103+ curl -o android-test-debug-androidTest.apk https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/library_test_dir/executorch_android -debug-androidTest.apk
100104 unzip model.zip
101105 mv *.pte model.pte
102106
Original file line number Diff line number Diff line change @@ -140,8 +140,6 @@ main() {
140140 fi
141141 export ANDROID_ABIS
142142
143- ARTIFACTS_DIR_NAME=" $1 "
144-
145143 copy_src
146144 for ANDROID_ABI in " ${ANDROID_ABIS[@]} " ; do
147145 build_android_native_library ${ANDROID_ABI}
You can’t perform that action at this time.
0 commit comments