-
Notifications
You must be signed in to change notification settings - Fork 0
224 lines (185 loc) · 6.36 KB
/
plugins.yml
File metadata and controls
224 lines (185 loc) · 6.36 KB
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
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
# SPDX-FileCopyrightText: © 2025 StreamKit Contributors
#
# SPDX-License-Identifier: MPL-2.0
name: Plugins CI
on:
workflow_call:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
SHERPA_ONNX_VERSION: "1.12.17"
jobs:
# Format check for all plugins (no native deps required)
format:
name: Format Check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.92.0"
components: rustfmt
- name: Check formatting - VAD
working-directory: plugins/native/vad
run: cargo fmt -- --check
- name: Check formatting - Whisper
working-directory: plugins/native/whisper
run: cargo fmt -- --check
- name: Check formatting - Kokoro
working-directory: plugins/native/kokoro
run: cargo fmt -- --check
- name: Check formatting - Piper
working-directory: plugins/native/piper
run: cargo fmt -- --check
- name: Check formatting - Matcha
working-directory: plugins/native/matcha
run: cargo fmt -- --check
- name: Check formatting - SenseVoice
working-directory: plugins/native/sensevoice
run: cargo fmt -- --check
- name: Check formatting - NLLB
working-directory: plugins/native/nllb
run: cargo fmt -- --check
# Lint plugins that can build without pre-installed native libraries
lint-simple:
name: Lint (Simple Plugins)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake pkg-config libclang-dev
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.92.0"
components: clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
plugins/native/vad
cache-on-failure: true
- name: Clippy - VAD
working-directory: plugins/native/vad
run: cargo clippy -- -D warnings
# Lint Whisper plugin (builds whisper.cpp from source)
lint-whisper:
name: Lint (Whisper)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake pkg-config libclang-dev
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.92.0"
components: clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
plugins/native/whisper
cache-on-failure: true
- name: Clippy - Whisper
working-directory: plugins/native/whisper
run: cargo clippy -- -D warnings
# Lint NLLB plugin (requires CTranslate2)
lint-nllb:
name: Lint (NLLB)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake pkg-config libclang-dev libopenblas-dev
- name: Cache CTranslate2
id: cache-ct2
uses: actions/cache@v4
with:
path: /usr/local/lib/libctranslate2*
key: ctranslate2-4.5.0-openmp-comp-${{ runner.os }}
- name: Build CTranslate2
if: steps.cache-ct2.outputs.cache-hit != 'true'
run: |
git clone --depth 1 --recurse-submodules --branch v4.5.0 https://github.com/OpenNMT/CTranslate2.git
cd CTranslate2
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DWITH_CUDA=OFF \
-DWITH_MKL=OFF \
-DWITH_OPENBLAS=ON \
-DOPENMP_RUNTIME=COMP \
-DBUILD_CLI=OFF \
..
make -j$(nproc)
sudo make install
sudo ldconfig
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.92.0"
components: clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
plugins/native/nllb
cache-on-failure: true
- name: Clippy - NLLB
working-directory: plugins/native/nllb
run: cargo clippy -- -D warnings
# Lint sherpa-onnx based plugins (Kokoro, Piper, Matcha, SenseVoice)
lint-sherpa:
name: Lint (Sherpa-ONNX Plugins)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake pkg-config libclang-dev wget
- name: Cache sherpa-onnx
id: cache-sherpa
uses: actions/cache@v4
with:
path: /usr/local/lib/libsherpa*
key: sherpa-onnx-${{ env.SHERPA_ONNX_VERSION }}-${{ runner.os }}
- name: Install sherpa-onnx
if: steps.cache-sherpa.outputs.cache-hit != 'true'
run: |
cd /tmp
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/v${SHERPA_ONNX_VERSION}/sherpa-onnx-v${SHERPA_ONNX_VERSION}-linux-x64-shared.tar.bz2
tar xf sherpa-onnx-v${SHERPA_ONNX_VERSION}-linux-x64-shared.tar.bz2
sudo cp -r sherpa-onnx-v${SHERPA_ONNX_VERSION}-linux-x64-shared/lib/* /usr/local/lib/
sudo cp -r sherpa-onnx-v${SHERPA_ONNX_VERSION}-linux-x64-shared/include/* /usr/local/include/
sudo ldconfig
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.92.0"
components: clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
plugins/native/kokoro
plugins/native/piper
plugins/native/matcha
plugins/native/sensevoice
cache-on-failure: true
- name: Clippy - Kokoro
working-directory: plugins/native/kokoro
run: cargo clippy -- -D warnings
- name: Clippy - Piper
working-directory: plugins/native/piper
run: cargo clippy -- -D warnings
- name: Clippy - Matcha
working-directory: plugins/native/matcha
run: cargo clippy -- -D warnings
- name: Clippy - SenseVoice
working-directory: plugins/native/sensevoice
run: cargo clippy -- -D warnings