diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 241de9be..953cb1e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: diff --git a/examples/whisper.android/lib/src/main/jni/whisper/CMakeLists.txt b/examples/whisper.android/lib/src/main/jni/whisper/CMakeLists.txt index f5e555c1..2654e9a3 100644 --- a/examples/whisper.android/lib/src/main/jni/whisper/CMakeLists.txt +++ b/examples/whisper.android/lib/src/main/jni/whisper/CMakeLists.txt @@ -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) +