ci : disable CUDA and Android builds

This commit is contained in:
Georgi Gerganov 2024-12-08 15:36:01 +02:00
parent 11dddfbc9e
commit 472464453d
2 changed files with 98 additions and 94 deletions

View File

@ -430,71 +430,72 @@ jobs:
name: whisper-blas-bin-${{ matrix.arch }} name: whisper-blas-bin-${{ matrix.arch }}
path: build/bin/${{ matrix.build }} path: build/bin/${{ matrix.build }}
windows-cublas: # TODO: fix and re-enable
runs-on: windows-2019 # windows-cublas:
# runs-on: windows-2019
strategy: #
matrix: # strategy:
build: [Release] # matrix:
arch: [x64] # build: [Release]
cublas: [ON] # arch: [x64]
sdl2: [ON] # cublas: [ON]
cuda-toolkit: [12.2.0, 11.8.0] # sdl2: [ON]
include: # cuda-toolkit: [12.2.0, 11.8.0]
- arch: x64 # include:
s2arc: x64 # - arch: x64
- sdl2: ON # s2arc: x64
s2ver: 2.28.5 # - sdl2: ON
# s2ver: 2.28.5
steps: #
- name: Clone # steps:
uses: actions/checkout@v4 # - name: Clone
# uses: actions/checkout@v4
- name: Add msbuild to PATH #
uses: microsoft/setup-msbuild@v2 # - name: Add msbuild to PATH
# uses: microsoft/setup-msbuild@v2
- name: Install CUDA Toolkit #
id: cuda-toolkit # - name: Install CUDA Toolkit
uses: Jimver/cuda-toolkit@v0.2.15 # id: cuda-toolkit
with: # uses: Jimver/cuda-toolkit@v0.2.15
cuda: '${{ matrix.cuda-toolkit }}' # with:
# cuda: '${{ matrix.cuda-toolkit }}'
- name: Fetch SDL2 and set SDL2_DIR #
if: matrix.sdl2 == 'ON' # - name: Fetch SDL2 and set SDL2_DIR
run: | # if: matrix.sdl2 == 'ON'
C:/msys64/usr/bin/wget.exe -qO sdl2.zip https://github.com/libsdl-org/SDL/releases/download/release-${{ matrix.s2ver }}/SDL2-devel-${{ matrix.s2ver }}-VC.zip # run: |
7z x sdl2.zip # C:/msys64/usr/bin/wget.exe -qO sdl2.zip https://github.com/libsdl-org/SDL/releases/download/release-${{ matrix.s2ver }}/SDL2-devel-${{ matrix.s2ver }}-VC.zip
echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV # 7z x sdl2.zip
# echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV
- name: Configure #
run: > # - name: Configure
cmake -S . -B ./build -A ${{ matrix.arch }} # run: >
-DCMAKE_BUILD_TYPE=${{ matrix.build }} # cmake -S . -B ./build -A ${{ matrix.arch }}
-DGGML_CUDA=${{ matrix.cublas }} # -DCMAKE_BUILD_TYPE=${{ matrix.build }}
-DWHISPER_SDL2=${{ matrix.sdl2 }} # -DGGML_CUDA=${{ matrix.cublas }}
# -DWHISPER_SDL2=${{ matrix.sdl2 }}
- name: Build ${{ matrix.cuda-toolkit }} #
run: | # - name: Build ${{ matrix.cuda-toolkit }}
cd ./build # run: |
cmake --build . --config ${{ matrix.build }} # cd ./build
# cmake --build . --config ${{ matrix.build }}
- name: Copy CUDA DLLs #
run: > # - name: Copy CUDA DLLs
Copy-Item -PassThru # run: >
-Path "${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/bin/*.dll" # Copy-Item -PassThru
-Include cudart64_*,cublas64_*,cublasLt64_* # -Path "${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/bin/*.dll"
-Destination build/bin/${{ matrix.build }} # -Include cudart64_*,cublas64_*,cublasLt64_*
# -Destination build/bin/${{ matrix.build }}
- name: Copy SDL2.dll #
if: matrix.sdl2 == 'ON' # - name: Copy SDL2.dll
run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }} # if: matrix.sdl2 == 'ON'
# run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
- name: Upload binaries #
if: matrix.sdl2 == 'ON' # - name: Upload binaries
uses: actions/upload-artifact@v4 # if: matrix.sdl2 == 'ON'
with: # uses: actions/upload-artifact@v4
name: whisper-cublas-${{ matrix.cuda-toolkit }}-bin-${{ matrix.arch }} # with:
path: build/bin/${{ matrix.build }} # name: whisper-cublas-${{ matrix.cuda-toolkit }}-bin-${{ matrix.arch }}
# path: build/bin/${{ matrix.build }}
emscripten: emscripten:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -563,34 +564,35 @@ jobs:
- name: Build swiftui example - 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 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
android: # TODO: update android build and re-enable when it works
runs-on: ubuntu-latest # android:
# runs-on: ubuntu-latest
steps: #
- name: Clone # steps:
uses: actions/checkout@v4 # - name: Clone
with: # uses: actions/checkout@v4
path: whisper # with:
# path: whisper
- name: Install Java #
uses: actions/setup-java@v4 # - name: Install Java
with: # uses: actions/setup-java@v4
distribution: zulu # with:
java-version: 21 # distribution: zulu
# java-version: 21
- name: Setup Android SDK #
uses: android-actions/setup-android@v3 # - name: Setup Android SDK
# uses: android-actions/setup-android@v3
- name: Build #
run: | # - name: Build
cd whisper/examples/whisper.android # run: |
./gradlew assembleRelease --no-daemon # cd whisper/examples/whisper.android
# ./gradlew assembleRelease --no-daemon
- name: Build with external ggml #
run: | # - name: Build with external ggml
export PATH_TO_GGML=$PWD/ggml # run: |
cd whisper/examples/whisper.android # export PATH_TO_GGML=$PWD/ggml
./gradlew assembleRelease --no-daemon # 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 # TODO: disable because of following fail: https://github.com/ggerganov/whisper.cpp/actions/runs/11019444420/job/30627193602
# android_java: # android_java:

View File

@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD 17)
set(WHISPER_LIB_DIR ${CMAKE_SOURCE_DIR}/../../../../../../..) set(WHISPER_LIB_DIR ${CMAKE_SOURCE_DIR}/../../../../../../..)
# Path to external GGML, otherwise uses the copy in whisper.cpp. # Path to external GGML, otherwise uses the copy in whisper.cpp.
option(GGML_HOME "whisper: Path to external GGML source" OFF) option(GGML_HOME "whisper: Path to external GGML source" OFF)
set( set(
SOURCE_FILES SOURCE_FILES
@ -14,6 +14,8 @@ set(
${CMAKE_SOURCE_DIR}/jni.c ${CMAKE_SOURCE_DIR}/jni.c
) )
# TODO: this needs to be updated to work with the new ggml CMakeLists
if (NOT GGML_HOME) if (NOT GGML_HOME)
set( set(
SOURCE_FILES SOURCE_FILES