Skip to content

Commit e54bb41

Browse files
authored
Yolo nightly (#203)
1 parent 480d9a2 commit e54bb41

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/android-build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
path: dl3/android/DeepLabV3Demo
3434
- name: MV3Demo
3535
path: mv3/android/MV3Demo
36+
- name: YoloDemo
37+
path: Yolo/android
3638

3739

3840
name: Build ${{ matrix.name }}
@@ -50,15 +52,15 @@ jobs:
5052
uses: gradle/actions/setup-gradle@v4
5153

5254
- name: Download local AAR
53-
if: ${{ inputs.local_aar && matrix.name == 'LlamaDemo' }}
55+
if: ${{ inputs.local_aar && (matrix.name == 'LlamaDemo' || matrix.name == 'YoloDemo') }}
5456
run: |
5557
mkdir -p ${{ matrix.path }}/app/libs
5658
curl -fL -o ${{ matrix.path }}/app/libs/executorch.aar "${{ inputs.local_aar }}"
5759
5860
- name: Build with Gradle
5961
working-directory: ${{ matrix.path }}
6062
run: |
61-
if [ -n "${{ inputs.local_aar }}" ] && [ "${{ matrix.name }}" == "LlamaDemo" ]; then
63+
if [ -n "${{ inputs.local_aar }}" ] && ([ "${{ matrix.name }}" == "LlamaDemo" ] || [ "${{ matrix.name }}" == "YoloDemo" ]); then
6264
./gradlew build --no-daemon -PuseLocalAar=true
6365
else
6466
./gradlew build --no-daemon
@@ -112,6 +114,7 @@ jobs:
112114
- LlamaDemo APKs (`app-debug-LlamaDemo.apk`, `app-release-unsigned-LlamaDemo.apk`)
113115
- DeepLabV3Demo APKs (`app-debug-DeepLabV3Demo.apk`, `app-release-unsigned-DeepLabV3Demo.apk`)
114116
- MV3Demo APKs (`app-debug-MV3Demo.apk`, `app-release-unsigned-MV3Demo.apk`)
117+
- YoloDemo APKs (`app-debug-YoloDemo.apk`, `app-release-unsigned-YoloDemo.apk`)
115118
116119
**Build Date:** ${{ steps.tag.outputs.build_date }}
117120
**Commit:** ${{ github.sha }}

Yolo/android/app/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ dependencies {
6060
implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha12")
6161
implementation("com.facebook.fbjni:fbjni:0.5.1")
6262
implementation("com.google.code.gson:gson:2.8.6")
63-
implementation(files("libs/executorch.aar"))
63+
if (useLocalAar == true) {
64+
implementation(files("libs/executorch.aar"))
65+
} else {
66+
implementation("org.pytorch:executorch-android:1.1.0")
67+
}
6468

6569
implementation("com.google.android.material:material:1.12.0")
6670
implementation("androidx.activity:activity:1.9.0")

Yolo/android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
77
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
88

9+
<uses-feature android:name="android.hardware.camera" android:required="false" />
10+
911
<application
1012
android:allowBackup="false"
1113
android:dataExtractionRules="@xml/data_extraction_rules"

0 commit comments

Comments
 (0)