]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
android : fix build and ci (#2624)
authorThamster <redacted>
Sat, 14 Dec 2024 15:25:53 +0000 (10:25 -0500)
committerGitHub <redacted>
Sat, 14 Dec 2024 15:25:53 +0000 (17:25 +0200)
* Adding missing CMakeLists.txt include for ggm-cpu needed by whisper.android

* attempt to re-enable CI for JNI android

---------

Co-authored-by: Your Name <redacted>
.github/workflows/build.yml
examples/whisper.android/lib/src/main/jni/whisper/CMakeLists.txt

index 241de9be1b08ac386e1c04d583ad4a33cc411d2c..953cb1e1a9944b4a6fc7f9fa2da25a3471448fca 100644 (file)
@@ -564,35 +564,34 @@ jobs:
       - name: Build swiftui example
         run: xcodebuild -project examples/whisper.swiftui/whisper.swiftui.xcodeproj -scheme WhisperCppDemo -configuration ${{ matrix.build }} -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' build
 
-# TODO: update android build and re-enable when it works
-#  android:
-#    runs-on: ubuntu-latest
-#
-#    steps:
-#      - name: Clone
-#        uses: actions/checkout@v4
-#        with:
-#          path: whisper
-#
-#      - name: Install Java
-#        uses: actions/setup-java@v4
-#        with:
-#          distribution: zulu
-#          java-version: 21
-#
-#      - name: Setup Android SDK
-#        uses: android-actions/setup-android@v3
-#
-#      - name: Build
-#        run: |
-#          cd whisper/examples/whisper.android
-#          ./gradlew assembleRelease --no-daemon
-#
-#      - name: Build with external ggml
-#        run: |
-#          export PATH_TO_GGML=$PWD/ggml
-#          cd whisper/examples/whisper.android
-#          ./gradlew assembleRelease --no-daemon
+  android:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Clone
+        uses: actions/checkout@v4
+        with:
+          path: whisper
+
+      - name: Install Java
+        uses: actions/setup-java@v4
+        with:
+          distribution: zulu
+          java-version: 21
+
+      - name: Setup Android SDK
+        uses: android-actions/setup-android@v3
+
+      - name: Build
+        run: |
+          cd whisper/examples/whisper.android
+          ./gradlew assembleRelease --no-daemon
+
+      - name: Build with external ggml
+        run: |
+          export PATH_TO_GGML=$PWD/ggml
+          cd whisper/examples/whisper.android
+          ./gradlew assembleRelease --no-daemon
 
 # TODO: disable because of following fail: https://github.com/ggerganov/whisper.cpp/actions/runs/11019444420/job/30627193602
 #  android_java:
index f5e555c1e4aaf5c8876b6706d199e74f29fd269f..2654e9a3372977756ef54809447cf68ca8cc2203 100644 (file)
@@ -88,3 +88,5 @@ include_directories(${WHISPER_LIB_DIR}/src)
 include_directories(${WHISPER_LIB_DIR}/include)
 include_directories(${WHISPER_LIB_DIR}/ggml/include)
 include_directories(${WHISPER_LIB_DIR}/ggml/src)
+include_directories(${WHISPER_LIB_DIR}/ggml/src/ggml-cpu)
+