@@ -3,6 +3,7 @@ on: [push, pull_request]
3
3
4
4
env :
5
5
ubuntu_image : " ubuntu:22.04"
6
+ VCPKG_BINARY_SOURCES : " clear;x-gha,readwrite"
6
7
7
8
jobs :
8
9
ubuntu-latest :
@@ -308,7 +309,7 @@ jobs:
308
309
- name : Build using CMake w/ OpenBLAS
309
310
shell : msys2 {0}
310
311
run : |
311
- cmake -B build -DGGML_OPENBLAS =ON
312
+ cmake -B build -DGGML_BLAS =ON -DGGML_BLAS_VENDOR=OpenBLAS
312
313
cmake --build build --config ${{ matrix.build }} -j $(nproc)
313
314
314
315
windows :
@@ -382,10 +383,8 @@ jobs:
382
383
sdl2 : [ON]
383
384
include :
384
385
- arch : Win32
385
- obzip : https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.25/OpenBLAS-0.3.25-x86.zip
386
386
s2arc : x86
387
387
- arch : x64
388
- obzip : https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.25/OpenBLAS-0.3.25-x64.zip
389
388
s2arc : x64
390
389
- sdl2 : ON
391
390
s2ver : 2.28.5
@@ -394,17 +393,21 @@ jobs:
394
393
- name : Clone
395
394
uses : actions/checkout@v4
396
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
+
397
403
- name : Add msbuild to PATH
398
404
uses : microsoft/setup-msbuild@v2
399
405
400
- - name : Fetch OpenBLAS
406
+ - name : Install OpenBLAS and pkgconfiglite
401
407
if : matrix.blas == 'ON'
402
408
run : |
403
- C:/msys64/usr/bin/wget.exe -qO blas.zip ${{ matrix.obzip }}
404
- 7z x blas.zip -oblas -y
405
- copy blas/include/cblas.h .
406
- copy blas/include/openblas_config.h .
407
- echo "OPENBLAS_PATH=$env:GITHUB_WORKSPACE/blas" >> $env:GITHUB_ENV
409
+ vcpkg install --triplet=${{ matrix.s2arc }}-windows openblas
410
+ choco install pkgconfiglite
408
411
409
412
- name : Fetch SDL2 and set SDL2_DIR
410
413
if : matrix.sdl2 == 'ON'
@@ -416,19 +419,20 @@ jobs:
416
419
- name : Configure
417
420
run : >
418
421
cmake -S . -B ./build -A ${{ matrix.arch }}
422
+ -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
419
423
-DCMAKE_BUILD_TYPE=${{ matrix.build }}
420
- -DGGML_OPENBLAS =${{ matrix.blas }}
421
- -DCMAKE_LIBRARY_PATH="$env:OPENBLAS_PATH/lib"
424
+ -DGGML_BLAS =${{ matrix.blas }}
425
+ -DGGML_BLAS_VENDOR=OpenBLAS
422
426
-DWHISPER_SDL2=${{ matrix.sdl2 }}
423
427
424
428
- name : Build
425
429
run : |
426
430
cd ./build
427
431
msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
428
432
429
- - name : Copy libopenblas .dll
433
+ - name : Copy openblas .dll
430
434
if : matrix.blas == 'ON'
431
- run : copy "$env:OPENBLAS_PATH/ bin/libopenblas .dll" build/bin/${{ matrix.build }}
435
+ run : copy "C:/vcpkg/packages/openblas_${{ matrix.s2arc }}-windows/ bin/openblas .dll" build/bin/${{ matrix.build }}
432
436
433
437
- name : Copy SDL2.dll
434
438
if : matrix.sdl2 == 'ON'
0 commit comments