-
Notifications
You must be signed in to change notification settings - Fork 451
94 lines (79 loc) · 2.5 KB
/
test-piper-phonemize.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
name: test-piper-phonemize
on:
push:
branches:
- master
paths:
- '.github/workflows/test-piper-phonemize.yaml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'sherpa-onnx/csrc/*'
pull_request:
branches:
- master
paths:
- '.github/workflows/test-piper-phonemize.yaml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'sherpa-onnx/csrc/*'
workflow_dispatch:
concurrency:
group: test-piper-phonemize-${{ github.ref }}
cancel-in-progress: true
jobs:
test_piper_phonemize:
name: ${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.shared_lib }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
build_type: [Release, Debug]
shared_lib: [ON, OFF]
exclude:
- os: windows-latest
build_type: Debug
shared_lib: OFF
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.os }}-${{ matrix.build_type }}-shared-${{ matrix.shared_lib }}
- name: Configure CMake
shell: bash
run: |
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --version
mkdir build
cd build
cmake -DSHERPA_ONNX_ENABLE_EPSEAK_NG_EXE=ON -DBUILD_ESPEAK_NG_EXE=ON -DCMAKE_VERBOSE_MAKEFILE=ON -D SHERPA_ONNX_ENABLE_TESTS=ON -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} -DCMAKE_INSTALL_PREFIX=./install ..
- name: Build
shell: bash
run: |
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --version
cd build
cmake --build . --target install --config ${{ matrix.build_type }}
- name: run test
if: matrix.os != 'windows-latest'
shell: bash
run: |
cd build
ls -lh install/
ls -lh install/share
ls -lh install/share/espeak-ng-data/
./bin/piper-phonemize-test
- name: run test
if: matrix.os == 'windows-latest'
shell: bash
run: |
cd build
ls -lh install/
ls -lh install/share
ls -lh install/share/espeak-ng-data/
./bin/${{ matrix.build_type }}/piper-phonemize-test