Fix CI for pip install (#371)
This commit is contained in:
1
.github/workflows/run-java-test.yaml
vendored
1
.github/workflows/run-java-test.yaml
vendored
@@ -21,6 +21,7 @@ on:
|
|||||||
- 'java-api-examples/**'
|
- 'java-api-examples/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
- 'sherpa-onnx/jni/*'
|
- 'sherpa-onnx/jni/*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: run-java-test-${{ github.ref }}
|
group: run-java-test-${{ github.ref }}
|
||||||
|
|||||||
1
.github/workflows/run-python-test.yaml
vendored
1
.github/workflows/run-python-test.yaml
vendored
@@ -19,6 +19,7 @@ on:
|
|||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: run-python-test-${{ github.ref }}
|
group: run-python-test-${{ github.ref }}
|
||||||
|
|||||||
1
.github/workflows/style_check.yaml
vendored
1
.github/workflows/style_check.yaml
vendored
@@ -29,6 +29,7 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- '.github/workflows/style_check.yaml'
|
- '.github/workflows/style_check.yaml'
|
||||||
- 'sherpa-onnx/**'
|
- 'sherpa-onnx/**'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: style_check-${{ github.ref }}
|
group: style_check-${{ github.ref }}
|
||||||
|
|||||||
21
.github/workflows/test-pip-install.yaml
vendored
21
.github/workflows/test-pip-install.yaml
vendored
@@ -12,6 +12,7 @@ on:
|
|||||||
# day of the week (0-6)
|
# day of the week (0-6)
|
||||||
# nightly build at 23:50 UTC time every day
|
# nightly build at 23:50 UTC time every day
|
||||||
- cron: "50 23 * * *"
|
- cron: "50 23 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: test-pip-install-${{ github.ref }}
|
group: test-pip-install-${{ github.ref }}
|
||||||
@@ -29,9 +30,12 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||||
|
exclude:
|
||||||
|
- os: macos-latest
|
||||||
|
python-version: "3.7"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -51,8 +55,23 @@ jobs:
|
|||||||
python3 -c "import sherpa_onnx; print(sherpa_onnx.__file__)"
|
python3 -c "import sherpa_onnx; print(sherpa_onnx.__file__)"
|
||||||
python3 -c "import sherpa_onnx; print(sherpa_onnx.__version__)"
|
python3 -c "import sherpa_onnx; print(sherpa_onnx.__version__)"
|
||||||
|
|
||||||
|
p=$(python3 -c "from pathlib import Path; import sys; print(Path(sys.executable).parent)")
|
||||||
|
echo $p
|
||||||
|
ls -lh $p
|
||||||
|
# ls -lh $p/bin
|
||||||
|
# export PATH=$p/bin:$PATH
|
||||||
|
|
||||||
|
# For windows
|
||||||
|
export PATH=/c/hostedtoolcache/windows/Python/3.7.9/x64/bin:$PATH
|
||||||
|
export PATH=/c/hostedtoolcache/windows/Python/3.8.10/x64/bin:$PATH
|
||||||
|
export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH
|
||||||
|
export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH
|
||||||
|
export PATH=/c/hostedtoolcache/windows/Python/3.11.6/x64/bin:$PATH
|
||||||
|
|
||||||
|
|
||||||
sherpa-onnx --help
|
sherpa-onnx --help
|
||||||
sherpa-onnx-offline --help
|
sherpa-onnx-offline --help
|
||||||
|
sherpa-onnx-offline-tts --help
|
||||||
|
|
||||||
sherpa-onnx-microphone --help
|
sherpa-onnx-microphone --help
|
||||||
sherpa-onnx-microphone-offline --help
|
sherpa-onnx-microphone-offline --help
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: python-offline-websocket-server-${{ github.ref }}
|
group: python-offline-websocket-server-${{ github.ref }}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: python-online-websocket-server-${{ github.ref }}
|
group: python-online-websocket-server-${{ github.ref }}
|
||||||
|
|||||||
@@ -22,6 +22,11 @@ extern "C" {
|
|||||||
// We will set SHERPA_ONNX_BUILD_SHARED_LIBS and SHERPA_ONNX_BUILD_MAIN_LIB in
|
// We will set SHERPA_ONNX_BUILD_SHARED_LIBS and SHERPA_ONNX_BUILD_MAIN_LIB in
|
||||||
// CMakeLists.txt
|
// CMakeLists.txt
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wattributes"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#if defined(SHERPA_ONNX_BUILD_SHARED_LIBS)
|
#if defined(SHERPA_ONNX_BUILD_SHARED_LIBS)
|
||||||
#define SHERPA_ONNX_EXPORT __declspec(dllexport)
|
#define SHERPA_ONNX_EXPORT __declspec(dllexport)
|
||||||
@@ -31,15 +36,7 @@ extern "C" {
|
|||||||
#define SHERPA_ONNX_IMPORT
|
#define SHERPA_ONNX_IMPORT
|
||||||
#endif
|
#endif
|
||||||
#else // WIN32
|
#else // WIN32
|
||||||
#if __APPLE__
|
|
||||||
// it throws a warning on macOS when using
|
|
||||||
// __attribute__((visibility("default")))
|
|
||||||
//
|
|
||||||
// warning: 'visibility' attribute ignored [-Wignored-attributes]
|
|
||||||
#define SHERPA_ONNX_EXPORT
|
|
||||||
#else
|
|
||||||
#define SHERPA_ONNX_EXPORT __attribute__((visibility("default")))
|
#define SHERPA_ONNX_EXPORT __attribute__((visibility("default")))
|
||||||
#endif // __APPLE__
|
|
||||||
|
|
||||||
#define SHERPA_ONNX_IMPORT SHERPA_ONNX_EXPORT
|
#define SHERPA_ONNX_IMPORT SHERPA_ONNX_EXPORT
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
@@ -598,6 +595,10 @@ SHERPA_ONNX_API void SherpaOnnxDestroySpeechSegment(
|
|||||||
SHERPA_ONNX_API void SherpaOnnxVoiceActivityDetectorReset(
|
SHERPA_ONNX_API void SherpaOnnxVoiceActivityDetectorReset(
|
||||||
SherpaOnnxVoiceActivityDetector *p);
|
SherpaOnnxVoiceActivityDetector *p);
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class OfflineTtsVitsImpl : public OfflineTtsImpl {
|
|||||||
SHERPA_ONNX_LOGE(
|
SHERPA_ONNX_LOGE(
|
||||||
"This is a single-speaker model and supports only sid 0. Given sid: "
|
"This is a single-speaker model and supports only sid 0. Given sid: "
|
||||||
"%d",
|
"%d",
|
||||||
sid);
|
static_cast<int32_t>(sid));
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ class OfflineTtsVitsImpl : public OfflineTtsImpl {
|
|||||||
SHERPA_ONNX_LOGE(
|
SHERPA_ONNX_LOGE(
|
||||||
"This model contains only %d speakers. sid should be in the range "
|
"This model contains only %d speakers. sid should be in the range "
|
||||||
"[%d, %d]. Given: %d",
|
"[%d, %d]. Given: %d",
|
||||||
num_speakers, 0, num_speakers - 1, sid);
|
num_speakers, 0, num_speakers - 1, static_cast<int32_t>(sid));
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user