forked from k2-fsa/sherpa-onnx
-
Notifications
You must be signed in to change notification settings - Fork 4
96 lines (79 loc) · 2.41 KB
/
wasm-simd-hf-space-vad-asr.yaml
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
name: wasm-simd-hf-space-vad-asr
on:
push:
branches:
- wasm
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
workflow_dispatch:
concurrency:
group: wasm-simd-hf-space-vad-asr${{ github.ref }}
cancel-in-progress: true
jobs:
wasm-simd-hf-space-vad-asr:
name: ${{ matrix.index }}/${{ matrix.total }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
total: ["8"]
index: ["0", "1", "2", "3", "4", "5", "6", "7"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Python dependencies
shell: bash
run: |
python3 -m pip install --upgrade pip jinja2
- name: Install emsdk
uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.53
actions-cache-folder: 'emsdk-cache'
- name: View emsdk version
shell: bash
run: |
emcc -v
echo "--------------------"
emcc --check
- name: Generate build script
shell: bash
run: |
cd scripts/wasm
total=${{ matrix.total }}
index=${{ matrix.index }}
./generate-vad-asr.py --total $total --index $index
chmod +x run-vad-asr.sh
mv -v ./run-vad-asr.sh ../..
- name: Show build scripts
shell: bash
run: |
cat ./run-vad-asr.sh
- uses: actions/upload-artifact@v4
with:
name: run-vad-asr-${{ matrix.index }}
path: ./run-vad-asr.sh
- name: Build sherpa-onnx for WebAssembly
shell: bash
env:
MS_TOKEN: ${{ secrets.MODEL_SCOPE_GIT_TOKEN }}
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
./run-vad-asr.sh
- name: Release
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
file_glob: true
overwrite: true
file: ./*.tar.bz2
# repo_name: k2-fsa/sherpa-onnx
# repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
# tag: v1.10.23
- name: Upload wasm files
uses: actions/upload-artifact@v4
with:
name: sherpa-onnx-wasm-simd-vad-asr-${{ matrix.index }}
path: ./sherpa-onnx-wasm-simd-*.tar.bz2