diff --git a/.github/workflows/aarch64-linux-gnu-shared.yaml b/.github/workflows/aarch64-linux-gnu-shared.yaml index 8ff888432..cb095aaf4 100644 --- a/.github/workflows/aarch64-linux-gnu-shared.yaml +++ b/.github/workflows/aarch64-linux-gnu-shared.yaml @@ -12,6 +12,7 @@ on: - 'CMakeLists.txt' - 'cmake/**' - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' - 'toolchains/aarch64-linux-gnu.toolchain.cmake' pull_request: branches: @@ -21,6 +22,7 @@ on: - 'CMakeLists.txt' - 'cmake/**' - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' - 'toolchains/aarch64-linux-gnu.toolchain.cmake' workflow_dispatch: diff --git a/.github/workflows/aarch64-linux-gnu-static.yaml b/.github/workflows/aarch64-linux-gnu-static.yaml index f59e4dd25..c3e0bce9d 100644 --- a/.github/workflows/aarch64-linux-gnu-static.yaml +++ b/.github/workflows/aarch64-linux-gnu-static.yaml @@ -12,6 +12,7 @@ on: - 'CMakeLists.txt' - 'cmake/**' - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' - 'toolchains/aarch64-linux-gnu.toolchain.cmake' pull_request: branches: @@ -21,6 +22,7 @@ on: - 'CMakeLists.txt' - 'cmake/**' - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' - 'toolchains/aarch64-linux-gnu.toolchain.cmake' workflow_dispatch: diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 335b3d939..e41898574 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -25,15 +25,6 @@ on: - 'build-android*.sh' workflow_dispatch: - inputs: - release: - description: "Whether to release" - type: boolean - -env: - RELEASE: - |- # Release if there is a release tag name or a release flag in workflow_dispatch - ${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }} concurrency: group: android-${{ github.ref }} diff --git a/.github/workflows/apk-kws.yaml b/.github/workflows/apk-kws.yaml index 440e4a5b3..7c85e6afa 100644 --- a/.github/workflows/apk-kws.yaml +++ b/.github/workflows/apk-kws.yaml @@ -2,8 +2,6 @@ name: apk-kws on: push: - branches: - - apk-kws tags: - '*' @@ -17,7 +15,7 @@ permissions: contents: write jobs: - apk: + apk_kws: runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/.github/workflows/apk-speaker-identification.yaml b/.github/workflows/apk-speaker-identification.yaml index c5acc0ee3..7c21ab686 100644 --- a/.github/workflows/apk-speaker-identification.yaml +++ b/.github/workflows/apk-speaker-identification.yaml @@ -2,8 +2,6 @@ name: apk-speaker-identification on: push: - branches: - - apk tags: - '*' @@ -17,7 +15,7 @@ permissions: contents: write jobs: - apk_tts: + apk_speaker_identification: if: github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' runs-on: ${{ matrix.os }} name: apk for tts ${{ matrix.index }}/${{ matrix.total }} @@ -84,18 +82,7 @@ jobs: ls -lh ./apks/ du -h -d1 . - # - name: Release - # uses: svenstaro/upload-release-action@v2 - # with: - # file_glob: true - # file: ./apks/*.apk - # overwrite: true - # repo_name: k2-fsa/sherpa-onnx - # repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }} - # tag: speaker-recongition-models - - name: Publish to huggingface - if: true env: HF_TOKEN: ${{ secrets.HF_TOKEN }} uses: nick-fields/retry@v3 diff --git a/.github/workflows/apk-tts-engine.yaml b/.github/workflows/apk-tts-engine.yaml index 8c2db1ce1..a08119bfa 100644 --- a/.github/workflows/apk-tts-engine.yaml +++ b/.github/workflows/apk-tts-engine.yaml @@ -2,8 +2,6 @@ name: apk-tts-engine on: push: - branches: - - apk-tts tags: - '*' diff --git a/.github/workflows/apk-tts.yaml b/.github/workflows/apk-tts.yaml index a3ba0f5be..c195c376c 100644 --- a/.github/workflows/apk-tts.yaml +++ b/.github/workflows/apk-tts.yaml @@ -2,9 +2,6 @@ name: apk-tts on: push: - branches: - - apk-tts - - apk tags: - '*' diff --git a/.github/workflows/apk.yaml b/.github/workflows/apk.yaml index 4cf7f0434..6c4d9f817 100644 --- a/.github/workflows/apk.yaml +++ b/.github/workflows/apk.yaml @@ -2,8 +2,6 @@ name: apk on: push: - branches: - - apk tags: - '*' diff --git a/.github/workflows/arm-linux-gnueabihf.yaml b/.github/workflows/arm-linux-gnueabihf.yaml index eba11886a..00b7223ad 100644 --- a/.github/workflows/arm-linux-gnueabihf.yaml +++ b/.github/workflows/arm-linux-gnueabihf.yaml @@ -10,6 +10,7 @@ on: - 'CMakeLists.txt' - 'cmake/**' - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' - 'toolchains/arm-linux-gnueabihf.toolchain.cmake' tags: - '*' @@ -21,6 +22,7 @@ on: - 'CMakeLists.txt' - 'cmake/**' - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' - 'toolchains/arm-linux-gnueabihf.toolchain.cmake' workflow_dispatch: diff --git a/.github/workflows/build-wheels-aarch64.yaml b/.github/workflows/build-wheels-aarch64.yaml index 192a3a5b1..17ff53d7e 100644 --- a/.github/workflows/build-wheels-aarch64.yaml +++ b/.github/workflows/build-wheels-aarch64.yaml @@ -2,8 +2,6 @@ name: build-wheels-aarch64 on: push: - branches: - - wheel tags: - '*' workflow_dispatch: @@ -61,10 +59,8 @@ jobs: run: | ls -lh ./wheelhouse/ - ls -lh ./wheelhouse/*.whl - - name: Publish to huggingface - if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux_2_28' + if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux2014' env: HF_TOKEN: ${{ secrets.HF_TOKEN }} uses: nick-fields/retry@v3 diff --git a/.github/workflows/build-wheels-armv7l.yaml b/.github/workflows/build-wheels-armv7l.yaml index 3ee12c283..000c698b5 100644 --- a/.github/workflows/build-wheels-armv7l.yaml +++ b/.github/workflows/build-wheels-armv7l.yaml @@ -2,8 +2,6 @@ name: build-wheels-armv7l on: push: - branches: - - wheel tags: - '*' workflow_dispatch: diff --git a/.github/workflows/build-wheels-linux.yaml b/.github/workflows/build-wheels-linux.yaml index 78a312c35..48f1a7767 100644 --- a/.github/workflows/build-wheels-linux.yaml +++ b/.github/workflows/build-wheels-linux.yaml @@ -2,8 +2,6 @@ name: build-wheels-linux on: push: - branches: - - wheel tags: - '*' workflow_dispatch: @@ -12,7 +10,7 @@ env: SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1 concurrency: - group: build-wheels-${{ github.ref }} + group: build-wheels-linux-${{ github.ref }} cancel-in-progress: true jobs: @@ -84,6 +82,7 @@ jobs: env: HF_TOKEN: ${{ secrets.HF_TOKEN }} uses: nick-fields/retry@v3 + shell: bash with: max_attempts: 20 timeout_seconds: 200 @@ -112,6 +111,7 @@ jobs: env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + shell: bash run: | python3 -m pip install --upgrade pip python3 -m pip install wheel twine setuptools @@ -119,16 +119,17 @@ jobs: twine upload ./wheelhouse/*.whl - name: Build sdist - if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux_2_28' + if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux2014' shell: bash run: | python3 setup.py sdist ls -l dist/* - name: Publish sdist to PyPI - if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux_2_28' + if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux2014' env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + shell: bash run: | twine upload dist/sherpa-onnx-*.tar.gz diff --git a/.github/workflows/build-wheels-macos-arm64.yaml b/.github/workflows/build-wheels-macos-arm64.yaml index cd1fdcc55..1b90ab4d4 100644 --- a/.github/workflows/build-wheels-macos-arm64.yaml +++ b/.github/workflows/build-wheels-macos-arm64.yaml @@ -2,8 +2,6 @@ name: build-wheels-macos-arm64 on: push: - branches: - - wheel tags: - '*' workflow_dispatch: @@ -16,7 +14,7 @@ concurrency: cancel-in-progress: true jobs: - build_wheels: + build_wheels_macos_arm64: name: ${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: @@ -34,6 +32,7 @@ jobs: if: matrix.python-version == 'cp37' uses: pypa/cibuildwheel@v2.11.4 env: + CIBW_BUILD: "${{ matrix.python-version}}-* " CIBW_ENVIRONMENT: SHERPA_ONNX_CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES='arm64'" CIBW_ARCHS: "arm64" CIBW_BUILD_VERBOSITY: 3 @@ -58,8 +57,6 @@ jobs: run: | ls -lh ./wheelhouse/ - ls -lh ./wheelhouse/*.whl - - uses: actions/upload-artifact@v4 with: name: wheel-${{ matrix.python-version }} diff --git a/.github/workflows/build-wheels-macos-x64.yaml b/.github/workflows/build-wheels-macos-x64.yaml index 162bf9f96..80f1ff829 100644 --- a/.github/workflows/build-wheels-macos-x64.yaml +++ b/.github/workflows/build-wheels-macos-x64.yaml @@ -16,7 +16,7 @@ concurrency: cancel-in-progress: true jobs: - build_wheels: + build_wheels_macos_x64: name: ${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: @@ -41,6 +41,7 @@ jobs: # Don't repair macOS wheels CIBW_REPAIR_WHEEL_COMMAND_MACOS: "" + - name: Build wheels if: matrix.python-version != 'cp37' uses: pypa/cibuildwheel@v2.15.0 diff --git a/.github/workflows/build-wheels-win32.yaml b/.github/workflows/build-wheels-win32.yaml index 5df8672dc..bd34d1e59 100644 --- a/.github/workflows/build-wheels-win32.yaml +++ b/.github/workflows/build-wheels-win32.yaml @@ -2,8 +2,6 @@ name: build-wheels-win32 on: push: - branches: - - wheel tags: - '*' workflow_dispatch: diff --git a/.github/workflows/build-wheels-win64.yaml b/.github/workflows/build-wheels-win64.yaml index bcaad2291..670ead539 100644 --- a/.github/workflows/build-wheels-win64.yaml +++ b/.github/workflows/build-wheels-win64.yaml @@ -42,8 +42,6 @@ jobs: run: | ls -lh ./wheelhouse/ - ls -lh ./wheelhouse/*.whl - - uses: actions/upload-artifact@v4 with: name: wheel-${{ matrix.python-version }} diff --git a/.github/workflows/build-xcframework.yaml b/.github/workflows/build-xcframework.yaml index 7e59700ab..4027030e2 100644 --- a/.github/workflows/build-xcframework.yaml +++ b/.github/workflows/build-xcframework.yaml @@ -4,11 +4,25 @@ on: push: branches: - master - - xcframework paths: - './build-ios.sh' + - '.github/workflows/build-xcframework.yaml' + - 'CMakeLists.txt' + - 'cmake/**' + - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' tags: - '*' + pull_request: + branches: + - master + paths: + - './build-ios.sh' + - '.github/workflows/build-xcframework.yaml' + - 'CMakeLists.txt' + - 'cmake/**' + - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' workflow_dispatch: diff --git a/.github/workflows/mfc.yaml b/.github/workflows/mfc.yaml index 82db12b8c..dadbe993f 100644 --- a/.github/workflows/mfc.yaml +++ b/.github/workflows/mfc.yaml @@ -12,6 +12,7 @@ on: - 'cmake/**' - 'mfc-examples/**' - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' pull_request: branches: - master @@ -21,6 +22,7 @@ on: - 'cmake/**' - 'mfc-examples/**' - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' workflow_dispatch: diff --git a/.github/workflows/riscv64-linux.yaml b/.github/workflows/riscv64-linux.yaml index 1a2f53993..f95604a6e 100644 --- a/.github/workflows/riscv64-linux.yaml +++ b/.github/workflows/riscv64-linux.yaml @@ -9,6 +9,7 @@ on: - 'CMakeLists.txt' - 'cmake/**' - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' - 'toolchains/riscv64-linux-gnu.toolchain.cmake' - 'build-riscv64-linux-gnu.sh' tags: @@ -22,6 +23,7 @@ on: - 'cmake/**' - 'sherpa-onnx/csrc/*' - 'toolchains/riscv64-linux-gnu.toolchain.cmake' + - 'sherpa-onnx/c-api/*' - 'build-riscv64-linux-gnu.sh' workflow_dispatch: diff --git a/.github/workflows/run-python-test.yaml b/.github/workflows/run-python-test.yaml index 1f64eb35d..4e6e97fd8 100644 --- a/.github/workflows/run-python-test.yaml +++ b/.github/workflows/run-python-test.yaml @@ -36,8 +36,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] # windows-latest] - python-version: ["3.7", "3.8", "3.9", "3.10"] + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.7", "3.8", "3.9", "3.10","3.11", "3.12"] exclude: - os: macos-latest python-version: "3.9" diff --git a/.github/workflows/swift.yaml b/.github/workflows/swift.yaml index 9971606f0..0a68afe0e 100644 --- a/.github/workflows/swift.yaml +++ b/.github/workflows/swift.yaml @@ -4,10 +4,28 @@ on: push: branches: - master + paths: + - './build-swift-macos.sh' + - '.github/workflows/swift.yaml' + - 'CMakeLists.txt' + - 'cmake/**' + - 'swift-api-examples/**' + - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' + - '.github/scripts/test-swift.sh' pull_request: branches: - master + paths: + - './build-swift-macos.sh' + - '.github/workflows/swift.yaml' + - 'CMakeLists.txt' + - 'cmake/**' + - 'swift-api-examples/**' + - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/c-api/*' + - '.github/scripts/test-swift.sh' workflow_dispatch: diff --git a/.github/workflows/test-build-wheel.yaml b/.github/workflows/test-build-wheel.yaml index 9a56d673f..54c265bbd 100644 --- a/.github/workflows/test-build-wheel.yaml +++ b/.github/workflows/test-build-wheel.yaml @@ -4,8 +4,23 @@ on: push: branches: - master - + paths: + - 'setup.py' + - '.github/workflows/test-build-wheel.yaml' + - 'CMakeLists.txt' + - 'cmake/**' + - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/python/**' pull_request: + branches: + - master + paths: + - 'setup.py' + - '.github/workflows/test-build-wheel.yaml' + - 'CMakeLists.txt' + - 'cmake/**' + - 'sherpa-onnx/csrc/*' + - 'sherpa-onnx/python/**' workflow_dispatch: @@ -15,13 +30,13 @@ concurrency: jobs: test-build-wheel: - name: ${{ matrix.os }} ${{ matrix.python_version }} + name: ${{ matrix.os }} ${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 @@ -75,6 +90,7 @@ jobs: 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.8/x64/bin:$PATH + export PATH=/c/hostedtoolcache/windows/Python/3.12.2/x64/bin:$PATH which sherpa-onnx sherpa-onnx --help diff --git a/.github/workflows/test-pip-install.yaml b/.github/workflows/test-pip-install.yaml index d4bd67478..c79f3a8b3 100644 --- a/.github/workflows/test-pip-install.yaml +++ b/.github/workflows/test-pip-install.yaml @@ -29,7 +29,7 @@ jobs: fail-fast: false matrix: 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", "3.12"] exclude: - os: macos-latest python-version: "3.7" @@ -68,6 +68,7 @@ jobs: 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.8/x64/bin:$PATH + export PATH=/c/hostedtoolcache/windows/Python/3.12.2/x64/bin:$PATH sherpa-onnx --help sherpa-onnx-keyword-spotter --help