File tree 4 files changed +20
-12
lines changed
4 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 73
73
curl -O https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/llm_demo/app-debug.apk
74
74
curl -O https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/llm_demo/app-debug-androidTest.apk
75
75
curl -O https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/fp32-xnnpack-custom/model.zip
76
+ curl -o https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/library_test_dir/app-debug.apk android-test-debug.apk
77
+ curl -o https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/library_test_dir/app-debug-androidTest.apk android-test-debug-androidTest.apk
76
78
unzip model.zip
77
79
mv *.pte model.pte
78
80
Original file line number Diff line number Diff line change @@ -134,6 +134,11 @@ build_android_demo_apps() {
134
134
pushd extension/benchmark/android/benchmark
135
135
ANDROID_HOME=" ${ANDROID_SDK:-/ opt/ android/ sdk} " ./gradlew build assembleAndroidTest
136
136
popd
137
+
138
+ pushd extension/android_test
139
+ ANDROID_HOME=" ${ANDROID_SDK:-/ opt/ android/ sdk} " ./gradlew testDebugUnitTest
140
+ ANDROID_HOME=" ${ANDROID_SDK:-/ opt/ android/ sdk} " ./gradlew build assembleAndroidTest
141
+ popd
137
142
}
138
143
139
144
collect_artifacts_to_be_uploaded () {
@@ -158,6 +163,11 @@ collect_artifacts_to_be_uploaded() {
158
163
mkdir -p " ${MINIBENCH_APP_DIR} "
159
164
cp extension/benchmark/android/benchmark/app/build/outputs/apk/debug/* .apk " ${MINIBENCH_APP_DIR} "
160
165
cp extension/benchmark/android/benchmark/app/build/outputs/apk/androidTest/debug/* .apk " ${MINIBENCH_APP_DIR} "
166
+ # Collect Java library test
167
+ JAVA_LIBRARY_TEST_DIR=" ${ARTIFACTS_DIR_NAME} /library_test_dir"
168
+ mkdir -p " ${JAVA_LIBRARY_TEST_DIR} "
169
+ cp extension/android_test/build/outputs/apk/debug/* .apk " ${JAVA_LIBRARY_TEST_DIR} "
170
+ cp extension/android_test/build/outputs/apk/androidTest/debug/* .apk " ${JAVA_LIBRARY_TEST_DIR} "
161
171
}
162
172
163
173
main () {
Original file line number Diff line number Diff line change @@ -25,3 +25,8 @@ adb shell mkdir -p /data/local/tmp/llama
25
25
adb push model.pte /data/local/tmp/llama
26
26
adb push tokenizer.bin /data/local/tmp/llama
27
27
adb shell am instrument -w -r com.example.executorchllamademo.test/androidx.test.runner.AndroidJUnitRunner
28
+
29
+ adb install -t android-test-debug.apk
30
+ adb install -t android-test-debug-androidTest.apk
31
+
32
+ adb shell am instrument -w -r org.pytorch.executorch.test/androidx.test.runner.AndroidJUnitRunner
Original file line number Diff line number Diff line change 5
5
* This source code is licensed under the BSD-style license found in the
6
6
* LICENSE file in the root directory of this source tree.
7
7
*/
8
- buildscript {
9
- repositories {
10
- google()
11
- mavenCentral()
12
- gradlePluginPortal()
13
- }
14
- dependencies {
15
- classpath ' com.android.tools.build:gradle:7.3.0'
16
- }
8
+ plugins {
9
+ id(" com.android.application" ) version " 8.1.0" apply false
17
10
}
18
11
19
-
20
- apply plugin : ' com.android.library'
21
-
22
12
group ' org.pytorch.executorch'
23
13
14
+ apply plugin : " com.android.application"
24
15
25
16
android {
26
17
namespace ' org.pytorch.executorch'
You can’t perform that action at this time.
0 commit comments