Spaces:
Sleeping
Sleeping
android : fix build and ci (#2624)
Browse files* 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 <[email protected]>
.github/workflows/build.yml
CHANGED
|
@@ -564,35 +564,34 @@ jobs:
|
|
| 564 |
- name: Build swiftui example
|
| 565 |
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
|
| 566 |
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
|
| 576 |
-
|
| 577 |
-
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
| 592 |
-
|
| 593 |
-
|
| 594 |
-
|
| 595 |
-
# ./gradlew assembleRelease --no-daemon
|
| 596 |
|
| 597 |
# TODO: disable because of following fail: https://github.com/ggerganov/whisper.cpp/actions/runs/11019444420/job/30627193602
|
| 598 |
# android_java:
|
|
|
|
| 564 |
- name: Build swiftui example
|
| 565 |
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
|
| 566 |
|
| 567 |
+
android:
|
| 568 |
+
runs-on: ubuntu-latest
|
| 569 |
+
|
| 570 |
+
steps:
|
| 571 |
+
- name: Clone
|
| 572 |
+
uses: actions/checkout@v4
|
| 573 |
+
with:
|
| 574 |
+
path: whisper
|
| 575 |
+
|
| 576 |
+
- name: Install Java
|
| 577 |
+
uses: actions/setup-java@v4
|
| 578 |
+
with:
|
| 579 |
+
distribution: zulu
|
| 580 |
+
java-version: 21
|
| 581 |
+
|
| 582 |
+
- name: Setup Android SDK
|
| 583 |
+
uses: android-actions/setup-android@v3
|
| 584 |
+
|
| 585 |
+
- name: Build
|
| 586 |
+
run: |
|
| 587 |
+
cd whisper/examples/whisper.android
|
| 588 |
+
./gradlew assembleRelease --no-daemon
|
| 589 |
+
|
| 590 |
+
- name: Build with external ggml
|
| 591 |
+
run: |
|
| 592 |
+
export PATH_TO_GGML=$PWD/ggml
|
| 593 |
+
cd whisper/examples/whisper.android
|
| 594 |
+
./gradlew assembleRelease --no-daemon
|
|
|
|
| 595 |
|
| 596 |
# TODO: disable because of following fail: https://github.com/ggerganov/whisper.cpp/actions/runs/11019444420/job/30627193602
|
| 597 |
# android_java:
|
examples/whisper.android/lib/src/main/jni/whisper/CMakeLists.txt
CHANGED
|
@@ -88,3 +88,5 @@ include_directories(${WHISPER_LIB_DIR}/src)
|
|
| 88 |
include_directories(${WHISPER_LIB_DIR}/include)
|
| 89 |
include_directories(${WHISPER_LIB_DIR}/ggml/include)
|
| 90 |
include_directories(${WHISPER_LIB_DIR}/ggml/src)
|
|
|
|
|
|
|
|
|
| 88 |
include_directories(${WHISPER_LIB_DIR}/include)
|
| 89 |
include_directories(${WHISPER_LIB_DIR}/ggml/include)
|
| 90 |
include_directories(${WHISPER_LIB_DIR}/ggml/src)
|
| 91 |
+
include_directories(${WHISPER_LIB_DIR}/ggml/src/ggml-cpu)
|
| 92 |
+
|