Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
name: Android Build

on:
pull_request:
schedule:
# Run nightly at midnight UTC
- cron: '0 0 * * *'
Expand Down Expand Up @@ -35,38 +36,49 @@ jobs:
path: mv3/android/MV3Demo
- name: YoloDemo
path: Yolo/android
- name: WhisperDemo
path: whisper/android/WhisperApp
require_aar: true
- name: ParakeetDemo
path: parakeet/android/ParakeetApp
require_aar: true


name: Build ${{ matrix.name }}
steps:
- name: Checkout repository
if: ${{ !matrix.require_aar || inputs.local_aar }}
uses: actions/checkout@v4

Comment on lines 49 to 52
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The matrix marks Whisper/Parakeet as require_aar: true and then conditionally skips checkout/JDK/Gradle/build steps when inputs.local_aar is not provided. This yields matrix jobs that do no work but still succeed, which can hide build regressions. Prefer a job-level if: (or matrix exclude) to skip those entries entirely, or remove require_aar if the Maven dependency fallback is sufficient.

Copilot uses AI. Check for mistakes.
- name: Set up JDK 17
if: ${{ !matrix.require_aar || inputs.local_aar }}
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Gradle
if: ${{ !matrix.require_aar || inputs.local_aar }}
uses: gradle/actions/setup-gradle@v4

- name: Download local AAR
if: ${{ inputs.local_aar && (matrix.name == 'LlamaDemo' || matrix.name == 'YoloDemo') }}
if: ${{ inputs.local_aar && (matrix.name == 'LlamaDemo' || matrix.name == 'YoloDemo' || matrix.name == 'WhisperDemo' || matrix.name == 'ParakeetDemo') }}
run: |
mkdir -p ${{ matrix.path }}/app/libs
curl -fL -o ${{ matrix.path }}/app/libs/executorch.aar "${{ inputs.local_aar }}"

- name: Build with Gradle
if: ${{ !matrix.require_aar || inputs.local_aar }}
working-directory: ${{ matrix.path }}
run: |
if [ -n "${{ inputs.local_aar }}" ] && ([ "${{ matrix.name }}" == "LlamaDemo" ] || [ "${{ matrix.name }}" == "YoloDemo" ]); then
if [ -n "${{ inputs.local_aar }}" ] && ([ "${{ matrix.name }}" == "LlamaDemo" ] || [ "${{ matrix.name }}" == "YoloDemo" ] || [ "${{ matrix.name }}" == "WhisperDemo" ] || [ "${{ matrix.name }}" == "ParakeetDemo" ]); then
./gradlew build --no-daemon -PuseLocalAar=true
else
./gradlew build --no-daemon
fi

- name: Rename APKs with demo name
if: ${{ !matrix.require_aar || inputs.local_aar }}
working-directory: ${{ matrix.path }}/app/build/outputs/apk/
run: |
find . -name "*.apk" -type f -print0 | while IFS= read -r -d '' apk; do
Expand All @@ -78,6 +90,7 @@ jobs:
done

- name: Upload build artifacts
if: ${{ !matrix.require_aar || inputs.local_aar }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}-apk
Expand Down
1 change: 1 addition & 0 deletions parakeet/android/ParakeetApp/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ dependencies {
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
testImplementation(libs.junit)
debugImplementation(libs.androidx.ui.tooling)
if (useLocalAar == true) {
implementation(files("libs/executorch.aar"))
Expand Down
9 changes: 8 additions & 1 deletion whisper/android/WhisperApp/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
alias(libs.plugins.kotlin.compose)
}

val useLocalAar: Boolean? = (project.findProperty("useLocalAar") as? String)?.toBoolean()

android {
namespace = "com.example.whisperapp"
compileSdk = 35
Expand Down Expand Up @@ -46,7 +48,12 @@ dependencies {
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
testImplementation(libs.junit)
debugImplementation(libs.androidx.ui.tooling)
implementation(files("libs/executorch.aar"))
if (useLocalAar == true) {
implementation(files("libs/executorch.aar"))
} else {
implementation("org.pytorch:executorch-android:1.1.0")
}
implementation("com.facebook.fbjni:fbjni:0.5.1")
}
12 changes: 4 additions & 8 deletions whisper/android/WhisperApp/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.WhisperApp"
android:extractNativeLibs="true"
tools:targetApi="31">
android:theme="@android:style/Theme.Material.Light.NoActionBar"
android:extractNativeLibs="true">

<uses-native-library
android:name="libcdsprpc.so"
Expand All @@ -22,7 +18,7 @@
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.WhisperApp">
android:theme="@android:style/Theme.Material.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
5 changes: 0 additions & 5 deletions whisper/android/WhisperApp/app/src/main/res/values/themes.xml

This file was deleted.

13 changes: 0 additions & 13 deletions whisper/android/WhisperApp/app/src/main/res/xml/backup_rules.xml

This file was deleted.

This file was deleted.