Spaces:
Sleeping
Sleeping
ci : run workflows on pull requests + bindings depend on .h (#446)
Browse files- .github/workflows/bindings.yml +8 -3
- .github/workflows/build.yml +264 -264
.github/workflows/bindings.yml
CHANGED
|
@@ -3,11 +3,16 @@ on:
|
|
| 3 |
push:
|
| 4 |
paths:
|
| 5 |
- bindings/go/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
jobs:
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
- uses: actions/setup-go@v3
|
| 12 |
with:
|
| 13 |
go-version: '^1.19'
|
|
|
|
| 3 |
push:
|
| 4 |
paths:
|
| 5 |
- bindings/go/**
|
| 6 |
+
- whisper.h
|
| 7 |
+
pull_request:
|
| 8 |
+
paths:
|
| 9 |
+
- bindings/go/**
|
| 10 |
+
- whisper.h
|
| 11 |
|
| 12 |
jobs:
|
| 13 |
+
ubuntu-latest:
|
| 14 |
+
runs-on: ubuntu-latest
|
| 15 |
+
steps:
|
| 16 |
- uses: actions/setup-go@v3
|
| 17 |
with:
|
| 18 |
go-version: '^1.19'
|
.github/workflows/build.yml
CHANGED
|
@@ -1,267 +1,267 @@
|
|
| 1 |
name: CI
|
| 2 |
-
on: [push]
|
| 3 |
|
| 4 |
jobs:
|
| 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 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
|
|
|
| 1 |
name: CI
|
| 2 |
+
on: [push, pull_request]
|
| 3 |
|
| 4 |
jobs:
|
| 5 |
+
ubuntu-latest:
|
| 6 |
+
runs-on: ubuntu-latest
|
| 7 |
+
|
| 8 |
+
steps:
|
| 9 |
+
- name: Clone
|
| 10 |
+
uses: actions/checkout@v1
|
| 11 |
+
|
| 12 |
+
- name: Dependencies
|
| 13 |
+
run: |
|
| 14 |
+
sudo apt-get update
|
| 15 |
+
sudo apt-get install build-essential
|
| 16 |
+
sudo apt-get install libsdl2-dev
|
| 17 |
+
|
| 18 |
+
- name: Build
|
| 19 |
+
run: |
|
| 20 |
+
make
|
| 21 |
+
make stream
|
| 22 |
+
|
| 23 |
+
macOS-latest:
|
| 24 |
+
runs-on: macOS-latest
|
| 25 |
+
|
| 26 |
+
steps:
|
| 27 |
+
- name: Clone
|
| 28 |
+
uses: actions/checkout@v1
|
| 29 |
+
|
| 30 |
+
- name: Dependencies
|
| 31 |
+
run: |
|
| 32 |
+
brew update
|
| 33 |
+
brew install sdl2
|
| 34 |
+
|
| 35 |
+
- name: Build
|
| 36 |
+
run: |
|
| 37 |
+
make
|
| 38 |
+
make stream
|
| 39 |
+
|
| 40 |
+
ubuntu-latest-gcc:
|
| 41 |
+
runs-on: ubuntu-latest
|
| 42 |
+
|
| 43 |
+
strategy:
|
| 44 |
+
matrix:
|
| 45 |
+
build: [Debug, Release]
|
| 46 |
+
|
| 47 |
+
steps:
|
| 48 |
+
- name: Clone
|
| 49 |
+
uses: actions/checkout@v1
|
| 50 |
+
|
| 51 |
+
- name: Dependencies
|
| 52 |
+
run: |
|
| 53 |
+
sudo apt-get update
|
| 54 |
+
sudo apt-get install build-essential
|
| 55 |
+
sudo apt-get install cmake
|
| 56 |
+
sudo apt-get install libsdl2-dev
|
| 57 |
+
|
| 58 |
+
- name: Configure
|
| 59 |
+
run: cmake . -DWHISPER_SUPPORT_SDL2=ON -DCMAKE_BUILD_TYPE=${{ matrix.build }}
|
| 60 |
+
|
| 61 |
+
- name: Build
|
| 62 |
+
run: |
|
| 63 |
+
make
|
| 64 |
+
ctest -L gh --output-on-failure
|
| 65 |
+
|
| 66 |
+
ubuntu-latest-clang:
|
| 67 |
+
runs-on: ubuntu-latest
|
| 68 |
+
|
| 69 |
+
strategy:
|
| 70 |
+
matrix:
|
| 71 |
+
build: [Debug, Release]
|
| 72 |
+
|
| 73 |
+
steps:
|
| 74 |
+
- name: Clone
|
| 75 |
+
uses: actions/checkout@v1
|
| 76 |
+
|
| 77 |
+
- name: Dependencies
|
| 78 |
+
run: |
|
| 79 |
+
sudo apt-get update
|
| 80 |
+
sudo apt-get install build-essential
|
| 81 |
+
sudo apt-get install cmake
|
| 82 |
+
sudo apt-get install libsdl2-dev
|
| 83 |
+
|
| 84 |
+
- name: Configure
|
| 85 |
+
run: cmake . -DWHISPER_SUPPORT_SDL2=ON -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
|
| 86 |
+
|
| 87 |
+
- name: Build
|
| 88 |
+
run: |
|
| 89 |
+
make
|
| 90 |
+
ctest -L gh --output-on-failure
|
| 91 |
+
|
| 92 |
+
ubuntu-latest-gcc-sanitized:
|
| 93 |
+
runs-on: ubuntu-latest
|
| 94 |
+
|
| 95 |
+
strategy:
|
| 96 |
+
matrix:
|
| 97 |
+
sanitizer: [ADDRESS, THREAD, UNDEFINED]
|
| 98 |
+
|
| 99 |
+
steps:
|
| 100 |
+
- name: Clone
|
| 101 |
+
uses: actions/checkout@v1
|
| 102 |
+
|
| 103 |
+
- name: Dependencies
|
| 104 |
+
run: |
|
| 105 |
+
sudo apt-get update
|
| 106 |
+
sudo apt-get install build-essential
|
| 107 |
+
sudo apt-get install cmake
|
| 108 |
+
|
| 109 |
+
- name: Configure
|
| 110 |
+
run: cmake . -DCMAKE_BUILD_TYPE=Debug -DWHISPER_SANITIZE_${{ matrix.sanitizer }}=ON
|
| 111 |
+
|
| 112 |
+
- name: Build
|
| 113 |
+
run: |
|
| 114 |
+
make
|
| 115 |
+
ctest -L gh --output-on-failure
|
| 116 |
+
|
| 117 |
+
windows:
|
| 118 |
+
runs-on: windows-latest
|
| 119 |
+
|
| 120 |
+
strategy:
|
| 121 |
+
matrix:
|
| 122 |
+
build: [Release]
|
| 123 |
+
arch: [Win32, x64]
|
| 124 |
+
sdl2: [ON]
|
| 125 |
+
include:
|
| 126 |
+
- arch: Win32
|
| 127 |
+
s2arc: x86
|
| 128 |
+
- arch: x64
|
| 129 |
+
s2arc: x64
|
| 130 |
+
- sdl2: ON
|
| 131 |
+
s2ver: 2.26.0
|
| 132 |
+
|
| 133 |
+
steps:
|
| 134 |
+
- name: Clone
|
| 135 |
+
uses: actions/checkout@v1
|
| 136 |
+
|
| 137 |
+
- name: Add msbuild to PATH
|
| 138 |
+
uses: microsoft/setup-msbuild@v1
|
| 139 |
+
|
| 140 |
+
- name: Fetch SDL2 and set SDL2_DIR
|
| 141 |
+
if: matrix.sdl2 == 'ON'
|
| 142 |
+
run: |
|
| 143 |
+
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
|
| 144 |
+
7z x sdl2.zip
|
| 145 |
+
echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV
|
| 146 |
+
|
| 147 |
+
- name: Configure
|
| 148 |
+
run: >
|
| 149 |
+
cmake -S . -B ./build -A ${{ matrix.arch }}
|
| 150 |
+
-DCMAKE_BUILD_TYPE=${{ matrix.build }}
|
| 151 |
+
-DWHISPER_SUPPORT_SDL2=${{ matrix.sdl2 }}
|
| 152 |
+
|
| 153 |
+
- name: Build
|
| 154 |
+
run: |
|
| 155 |
+
cd ./build
|
| 156 |
+
msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
|
| 157 |
+
|
| 158 |
+
- name: Copy SDL2.dll
|
| 159 |
+
if: matrix.sdl2 == 'ON'
|
| 160 |
+
run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
|
| 161 |
+
|
| 162 |
+
- name: Upload binaries
|
| 163 |
+
if: matrix.sdl2 == 'ON'
|
| 164 |
+
uses: actions/upload-artifact@v1
|
| 165 |
+
with:
|
| 166 |
+
name: whisper-bin-${{ matrix.arch }}
|
| 167 |
+
path: build/bin/${{ matrix.build }}
|
| 168 |
+
|
| 169 |
+
windows-blas:
|
| 170 |
+
runs-on: windows-latest
|
| 171 |
+
|
| 172 |
+
strategy:
|
| 173 |
+
matrix:
|
| 174 |
+
build: [Release]
|
| 175 |
+
arch: [Win32, x64]
|
| 176 |
+
blas: [ON]
|
| 177 |
+
sdl2: [ON]
|
| 178 |
+
include:
|
| 179 |
+
- arch: Win32
|
| 180 |
+
obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x86.zip
|
| 181 |
+
s2arc: x86
|
| 182 |
+
- arch: x64
|
| 183 |
+
obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x64.zip
|
| 184 |
+
s2arc: x64
|
| 185 |
+
- sdl2: ON
|
| 186 |
+
s2ver: 2.26.0
|
| 187 |
+
|
| 188 |
+
steps:
|
| 189 |
+
- name: Clone
|
| 190 |
+
uses: actions/checkout@v1
|
| 191 |
+
|
| 192 |
+
- name: Add msbuild to PATH
|
| 193 |
+
uses: microsoft/setup-msbuild@v1
|
| 194 |
+
|
| 195 |
+
- name: Fetch OpenBLAS
|
| 196 |
+
if: matrix.blas == 'ON'
|
| 197 |
+
run: |
|
| 198 |
+
C:/msys64/usr/bin/wget.exe -qO blas.zip ${{ matrix.obzip }}
|
| 199 |
+
7z x blas.zip -oblas -y
|
| 200 |
+
copy blas/include/cblas.h .
|
| 201 |
+
copy blas/include/openblas_config.h .
|
| 202 |
+
echo "blasdir=$env:GITHUB_WORKSPACE/blas" >> $env:GITHUB_ENV
|
| 203 |
+
|
| 204 |
+
- name: Fetch SDL2 and set SDL2_DIR
|
| 205 |
+
if: matrix.sdl2 == 'ON'
|
| 206 |
+
run: |
|
| 207 |
+
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
|
| 208 |
+
7z x sdl2.zip
|
| 209 |
+
echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV
|
| 210 |
+
|
| 211 |
+
- name: Configure
|
| 212 |
+
run: >
|
| 213 |
+
cmake -S . -B ./build -A ${{ matrix.arch }}
|
| 214 |
+
-DCMAKE_BUILD_TYPE=${{ matrix.build }}
|
| 215 |
+
-DWHISPER_SUPPORT_OPENBLAS=${{ matrix.blas }}
|
| 216 |
+
-DCMAKE_LIBRARY_PATH="$env:blasdir/lib"
|
| 217 |
+
-DWHISPER_SUPPORT_SDL2=${{ matrix.sdl2 }}
|
| 218 |
+
|
| 219 |
+
- name: Build
|
| 220 |
+
run: |
|
| 221 |
+
cd ./build
|
| 222 |
+
msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
|
| 223 |
+
|
| 224 |
+
- name: Copy libopenblas.dll
|
| 225 |
+
if: matrix.blas == 'ON'
|
| 226 |
+
run: copy "$env:blasdir/bin/libopenblas.dll" build/bin/${{ matrix.build }}
|
| 227 |
+
|
| 228 |
+
- name: Copy SDL2.dll
|
| 229 |
+
if: matrix.sdl2 == 'ON'
|
| 230 |
+
run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
|
| 231 |
+
|
| 232 |
+
- name: Upload binaries
|
| 233 |
+
if: matrix.blas == 'ON' && matrix.sdl2 == 'ON'
|
| 234 |
+
uses: actions/upload-artifact@v1
|
| 235 |
+
with:
|
| 236 |
+
name: whisper-blas-bin-${{ matrix.arch }}
|
| 237 |
+
path: build/bin/${{ matrix.build }}
|
| 238 |
+
|
| 239 |
+
emscripten:
|
| 240 |
+
runs-on: ubuntu-latest
|
| 241 |
+
|
| 242 |
+
strategy:
|
| 243 |
+
matrix:
|
| 244 |
+
build: [Release]
|
| 245 |
+
|
| 246 |
+
steps:
|
| 247 |
+
- name: Clone
|
| 248 |
+
uses: actions/checkout@v1
|
| 249 |
+
|
| 250 |
+
- name: Dependencies
|
| 251 |
+
run: |
|
| 252 |
+
wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
|
| 253 |
+
tar -xvf master.tar.gz
|
| 254 |
+
emsdk-master/emsdk update
|
| 255 |
+
emsdk-master/emsdk install latest
|
| 256 |
+
emsdk-master/emsdk activate latest
|
| 257 |
+
|
| 258 |
+
- name: Configure
|
| 259 |
+
run: echo "tmp"
|
| 260 |
+
|
| 261 |
+
- name: Build
|
| 262 |
+
run: |
|
| 263 |
+
pushd emsdk-master
|
| 264 |
+
source ./emsdk_env.sh
|
| 265 |
+
popd
|
| 266 |
+
emcmake cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
|
| 267 |
+
make
|