Support including TTS conditionally. (#699)

This commit is contained in:
Fangjun Kuang
2024-03-26 17:21:35 +08:00
committed by GitHub
parent bd66f7a7d0
commit 4e040c596e
14 changed files with 413 additions and 77 deletions

View File

@@ -40,13 +40,14 @@ concurrency:
jobs:
windows_x64:
name: ${{ matrix.shared_lib }}
name: shared-${{ matrix.shared_lib }} tts-${{ matrix.with_tts }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
shared_lib: [ON, OFF]
with_tts: [ON, OFF]
steps:
- uses: actions/checkout@v4
@@ -58,7 +59,8 @@ jobs:
run: |
mkdir build
cd build
cmake -A x64 -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} -DCMAKE_INSTALL_PREFIX=./install ..
cmake -A x64 -DSHERPA_ONNX_ENABLE_TTS=${{ matrix.with_tts }} -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} -DCMAKE_INSTALL_PREFIX=./install ..
- name: Build sherpa-onnx for windows
shell: bash
run: |
@@ -93,6 +95,7 @@ jobs:
.github/scripts/test-online-ctc.sh
- name: Test offline TTS
if: matrix.with_tts == 'ON'
shell: bash
run: |
export PATH=$PWD/build/bin/Release:$PATH
@@ -155,9 +158,15 @@ jobs:
shared_lib=${{ matrix.shared_lib }}
if [[ $shared_lib == "ON" ]]; then
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x64-shared
suffix=shared
else
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x64-static
suffix=static
fi
if [[ ${{ matrix.with_tts }} ]]; then
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x64-$suffix
else
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x64-$suffix-no-tts
fi
mkdir $dst