-
-
Notifications
You must be signed in to change notification settings - Fork 71
86 lines (74 loc) · 3.91 KB
/
test_whisper.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Test
on: [push, pull_request, workflow_dispatch]
env:
MODEL_URL: https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-tiny.bin
MODEL_FILENAME: ggml-tiny.bin
AUDIO_URL: https://github.com/ggerganov/whisper.cpp/raw/master/samples/jfk.wav
AUDIO_FILENAME: jfk.wav
jobs:
test:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
# macOS
- platform: "macos-latest"
name: "MacOS (Arm) - aarch64"
cmake-args: "-DGGML_CCACHE=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DGGML_STATIC=ON"
# Linux
- platform: "ubuntu-24.04"
name: "Ubuntu 24.04 - x86_64"
cmake-args: "-DGGML_CCACHE=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DGGML_STATIC=ON"
- platform: "ubuntu-24.04"
name: "Ubuntu 24.04 - x86_64 - Vulkan"
cmake-args: "-DGGML_VULKAN=ON -DGGML_CCACHE=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DGGML_STATIC=ON"
# Windows
- platform: "windows-latest"
name: "Windows - x86_64"
cmake-args: "-DGGML_CCACHE=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DGGML_STATIC=ON"
- platform: "windows-latest"
name: "Windows - x86_64 - Vulkan"
cmake-args: "-DGGML_VULKAN=ON -DGGML_CCACHE=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DGGML_STATIC=ON"
runs-on: ${{ matrix.platform }}
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v4
- name: Prepare Vulkan SDK for Windows
run: |
C:\msys64\usr\bin\wget.exe https://sdk.lunarg.com/sdk/download/1.3.290.0/windows/VulkanSDK-1.3.290.0-Installer.exe -O vulkan.exe
.\vulkan.exe --root C:\vulkan --accept-licenses --default-answer --confirm-command install
echo "VULKAN_SDK=C:\vulkan" >> $env:GITHUB_ENV
Copy-Item -Path "C:\vulkan\Bin\*.dll" -Destination "." -Recurse
if: ${{ contains(matrix.platform, 'windows') && contains(matrix.cmake-args, 'DGGML_VULKAN=ON') }}
- name: Prepare Vulkan SDK for Linux
run: |
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list http://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list
sudo apt update
sudo apt install vulkan-sdk -y
sudo apt-get install -y mesa-vulkan-drivers
if: ${{ contains(matrix.platform, 'ubuntu') && contains(matrix.cmake-args, 'DGGML_VULKAN=ON') }}
- name: Download assets on Windows
if: contains(matrix.platform, 'windows')
run: |
C:\msys64\usr\bin\wget.exe ${{ env.MODEL_URL }}
C:\msys64\usr\bin\wget.exe ${{ env.AUDIO_URL }}
- name: Download assets on Linux
if: contains(matrix.platform, 'windows') == false
run: |
wget ${{ env.MODEL_URL }}
wget ${{ env.AUDIO_URL }}
- name: Build
run: |
cmake -B build ${{ matrix.cmake-args }}
cmake --build build --target main --config Release
- name: Test Windows
if: contains(matrix.platform, 'windows')
run: |
.\build\bin\Release\main -m ${{ env.MODEL_FILENAME }} -f ${{ env.AUDIO_FILENAME }}
- name: Test Unix
if: ${{ contains(matrix.platform, 'ubuntu') || contains(matrix.platform, 'macos') }}
run: |
./build/bin/main -m ${{ env.MODEL_FILENAME }} -f ${{ env.AUDIO_FILENAME }}