@@ -3,6 +3,7 @@ on: [push, pull_request]
33
44env :
55 ubuntu_image : " ubuntu:22.04"
6+ VCPKG_BINARY_SOURCES : " clear;x-gha,readwrite"
67
78jobs :
89 ubuntu-latest :
@@ -371,77 +372,78 @@ jobs:
371372 name : whisper-bin-${{ matrix.arch }}
372373 path : build/bin/${{ matrix.build }}
373374
374- # TODO: fails for some reason: https://github.com/ggerganov/whisper.cpp/actions/runs/11516781296/job/32060139298?pr=2511
375- # windows-blas:
376- # runs-on: windows-latest
377- #
378- # strategy:
379- # matrix:
380- # build: [Release]
381- # arch: [Win32, x64]
382- # blas: [ON]
383- # sdl2: [ON]
384- # include:
385- # - arch: Win32
386- # obzip: https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.25/OpenBLAS-0.3.25-x86.zip
387- # s2arc: x86
388- # - arch: x64
389- # obzip: https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.25/OpenBLAS-0.3.25-x64.zip
390- # s2arc: x64
391- # - sdl2: ON
392- # s2ver: 2.28.5
393- #
394- # steps:
395- # - name: Clone
396- # uses: actions/checkout@v4
397- #
398- # - name: Add msbuild to PATH
399- # uses: microsoft/setup-msbuild@v2
400- #
401- # - name: Fetch OpenBLAS
402- # if: matrix.blas == 'ON'
403- # run: |
404- # C:/msys64/usr/bin/wget.exe -qO blas.zip ${{ matrix.obzip }}
405- # 7z x blas.zip -oblas -y
406- # copy blas/include/cblas.h .
407- # copy blas/include/openblas_config.h .
408- # echo "OPENBLAS_PATH=$env:GITHUB_WORKSPACE/blas" >> $env:GITHUB_ENV
409- #
410- # - name: Fetch SDL2 and set SDL2_DIR
411- # if: matrix.sdl2 == 'ON'
412- # run: |
413- # 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
414- # 7z x sdl2.zip
415- # echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV
416- #
417- # - name: Configure
418- # run: >
419- # cmake -S . -B ./build -A ${{ matrix.arch }}
420- # -DCMAKE_BUILD_TYPE=${{ matrix.build }}
421- # -DGGML_BLAS=${{ matrix.blas }}
422- # -DGGML_BLAS_VENDOR=OpenBLAS
423- # -DCMAKE_LIBRARY_PATH="$env:OPENBLAS_PATH/lib"
424- # -DWHISPER_SDL2=${{ matrix.sdl2 }}
425- #
426- # - name: Build
427- # run: |
428- # cd ./build
429- # msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
430- #
431- # - name: Copy libopenblas.dll
432- # if: matrix.blas == 'ON'
433- # run: copy "$env:OPENBLAS_PATH/bin/libopenblas.dll" build/bin/${{ matrix.build }}
434- #
435- # - name: Copy SDL2.dll
436- # if: matrix.sdl2 == 'ON'
437- # run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
438- #
439- # - name: Upload binaries
440- # if: matrix.blas == 'ON' && matrix.sdl2 == 'ON'
441- # uses: actions/upload-artifact@v4
442- # with:
443- # name: whisper-blas-bin-${{ matrix.arch }}
444- # path: build/bin/${{ matrix.build }}
375+ windows-blas :
376+ runs-on : windows-latest
377+
378+ strategy :
379+ matrix :
380+ build : [Release]
381+ arch : [Win32, x64]
382+ blas : [ON]
383+ sdl2 : [ON]
384+ include :
385+ - arch : Win32
386+ s2arc : x86
387+ - arch : x64
388+ s2arc : x64
389+ - sdl2 : ON
390+ s2ver : 2.28.5
391+
392+ steps :
393+ - name : Clone
394+ uses : actions/checkout@v4
395+
396+ - name : Export GitHub Actions cache environment variables
397+ uses : actions/github-script@v7
398+ with :
399+ script : |
400+ core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
401+ core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
402+
403+ - name : Add msbuild to PATH
404+ uses : microsoft/setup-msbuild@v2
405+
406+ - name : Install OpenBLAS and pkgconfiglite
407+ if : matrix.blas == 'ON'
408+ run : |
409+ vcpkg install --triplet=${{ matrix.s2arc }}-windows openblas
410+ choco install pkgconfiglite
411+
412+ - name : Fetch SDL2 and set SDL2_DIR
413+ if : matrix.sdl2 == 'ON'
414+ run : |
415+ 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
416+ 7z x sdl2.zip
417+ echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV
418+
419+ - name : Configure
420+ run : >
421+ cmake -S . -B ./build -A ${{ matrix.arch }}
422+ -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
423+ -DCMAKE_BUILD_TYPE=${{ matrix.build }}
424+ -DGGML_BLAS=${{ matrix.blas }}
425+ -DGGML_BLAS_VENDOR=OpenBLAS
426+ -DWHISPER_SDL2=${{ matrix.sdl2 }}
427+
428+ - name : Build
429+ run : |
430+ cd ./build
431+ msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
432+
433+ - name : Copy openblas.dll
434+ if : matrix.blas == 'ON'
435+ run : copy "C:/vcpkg/packages/openblas_${{ matrix.s2arc }}-windows/bin/openblas.dll" build/bin/${{ matrix.build }}
436+
437+ - name : Copy SDL2.dll
438+ if : matrix.sdl2 == 'ON'
439+ run : copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
440+
441+ - name : Upload binaries
442+ if : matrix.blas == 'ON' && matrix.sdl2 == 'ON'
443+ uses : actions/upload-artifact@v4
444+ with :
445+ name : whisper-blas-bin-${{ matrix.arch }}
446+ path : build/bin/${{ matrix.build }}
445447
446448 windows-cublas :
447449 runs-on : windows-2019
0 commit comments