Upload pre-compiled binaries and libraries on release (#206)
This commit is contained in:
45
.github/workflows/aarch64-linux-gnu.yaml
vendored
45
.github/workflows/aarch64-linux-gnu.yaml
vendored
@@ -5,6 +5,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/aarch64-linux-gnu.yaml'
|
- '.github/workflows/aarch64-linux-gnu.yaml'
|
||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
@@ -20,14 +22,25 @@ on:
|
|||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
- 'toolchains/aarch64-linux-gnu.toolchain.cmake'
|
- 'toolchains/aarch64-linux-gnu.toolchain.cmake'
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
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:
|
concurrency:
|
||||||
group: aarch64-linux-gnu-${{ github.ref }}
|
group: aarch64-linux-gnu-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
aarch64_linux_gnu:
|
aarch64_linux_gnu:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -118,7 +131,31 @@ jobs:
|
|||||||
export PATH=$GITHUB_WORKSPACE/qemu-install/bin:$PATH
|
export PATH=$GITHUB_WORKSPACE/qemu-install/bin:$PATH
|
||||||
export QEMU_LD_PREFIX=$GITHUB_WORKSPACE/toolchain/aarch64-linux-gnu/libc
|
export QEMU_LD_PREFIX=$GITHUB_WORKSPACE/toolchain/aarch64-linux-gnu/libc
|
||||||
|
|
||||||
|
|
||||||
ls -lh ./build-aarch64-linux-gnu/bin
|
ls -lh ./build-aarch64-linux-gnu/bin
|
||||||
|
|
||||||
qemu-aarch64 ./build-aarch64-linux-gnu/bin/sherpa-onnx --help
|
qemu-aarch64 ./build-aarch64-linux-gnu/bin/sherpa-onnx --help
|
||||||
|
|
||||||
|
- name: Copy files
|
||||||
|
if: env.RELEASE == 'true'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
|
||||||
|
|
||||||
|
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-linux-aarch64
|
||||||
|
mkdir $dst
|
||||||
|
|
||||||
|
cp -a build-aarch64-linux-gnu/install/bin $dst/
|
||||||
|
cp -a build-aarch64-linux-gnu/install/lib $dst/
|
||||||
|
cp -a build-aarch64-linux-gnu/install/include $dst/
|
||||||
|
|
||||||
|
tree $dst
|
||||||
|
|
||||||
|
tar cjvf ${dst}.tar.bz2 $dst
|
||||||
|
|
||||||
|
- name: Release pre-compiled binaries and libs for aarch64 linux
|
||||||
|
if: env.RELEASE == 'true'
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
file_glob: true
|
||||||
|
overwrite: true
|
||||||
|
file: sherpa-onnx-*linux-aarch64.tar.bz2
|
||||||
|
|||||||
42
.github/workflows/arm-linux-gnueabihf.yaml
vendored
42
.github/workflows/arm-linux-gnueabihf.yaml
vendored
@@ -20,14 +20,25 @@ on:
|
|||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
- 'toolchains/arm-linux-gnueabihf.toolchain.cmake'
|
- 'toolchains/arm-linux-gnueabihf.toolchain.cmake'
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
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:
|
concurrency:
|
||||||
group: arm-linux-gnueabihf-${{ github.ref }}
|
group: arm-linux-gnueabihf-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
arm_linux_gnueabihf:
|
arm_linux_gnueabihf:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -124,3 +135,28 @@ jobs:
|
|||||||
ls -lh ./build-arm-linux-gnueabihf/bin
|
ls -lh ./build-arm-linux-gnueabihf/bin
|
||||||
|
|
||||||
qemu-arm ./build-arm-linux-gnueabihf/bin/sherpa-onnx --help
|
qemu-arm ./build-arm-linux-gnueabihf/bin/sherpa-onnx --help
|
||||||
|
|
||||||
|
- name: Copy files
|
||||||
|
if: env.RELEASE == 'true'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
|
||||||
|
|
||||||
|
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-linux-arm-gnueabihf
|
||||||
|
mkdir $dst
|
||||||
|
|
||||||
|
cp -a build-arm-linux-gnueabihf/install/bin $dst/
|
||||||
|
cp -a build-arm-linux-gnueabihf/install/lib $dst/
|
||||||
|
cp -a build-arm-linux-gnueabihf/install/include $dst/
|
||||||
|
|
||||||
|
tree $dst
|
||||||
|
|
||||||
|
tar cjvf ${dst}.tar.bz2 $dst
|
||||||
|
|
||||||
|
- name: Release pre-compiled binaries and libs for arm linux gnueabihf
|
||||||
|
if: env.RELEASE == 'true'
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
file_glob: true
|
||||||
|
overwrite: true
|
||||||
|
file: sherpa-onnx-*linux-arm-gnueabihf.tar.bz2
|
||||||
|
|||||||
30
.github/workflows/build-xcframework.yaml
vendored
30
.github/workflows/build-xcframework.yaml
vendored
@@ -9,8 +9,20 @@ on:
|
|||||||
- './build-ios.sh'
|
- './build-ios.sh'
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
workflow_dispatch:
|
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:
|
concurrency:
|
||||||
group: build-xcframework-${{ github.ref }}
|
group: build-xcframework-${{ github.ref }}
|
||||||
@@ -51,7 +63,7 @@ jobs:
|
|||||||
|
|
||||||
tree build-ios
|
tree build-ios
|
||||||
|
|
||||||
filename=sherpa-onnx-${SHERPA_ONNX_VERSION}-pre-compiled-ios-libs.tar.bz2
|
filename=sherpa-onnx-${SHERPA_ONNX_VERSION}-ios.tar.bz2
|
||||||
|
|
||||||
tar cjvf $filename ./build-ios
|
tar cjvf $filename ./build-ios
|
||||||
|
|
||||||
@@ -59,12 +71,12 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: sherpa-onnx-pre-compiled-ios-libs
|
name: sherpa-onnx-ios-libs
|
||||||
path: ./build-ios
|
path: ./build-ios
|
||||||
|
|
||||||
# https://huggingface.co/docs/hub/spaces-github-actions
|
# https://huggingface.co/docs/hub/spaces-github-actions
|
||||||
- name: Publish to huggingface
|
- name: Publish to huggingface
|
||||||
if: ${{ github.repository_owner == 'csukuangfj' }} || ${{ github.repository_owner == 'k2-fsa' }}
|
if: github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa'
|
||||||
env:
|
env:
|
||||||
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
@@ -76,13 +88,21 @@ jobs:
|
|||||||
cd huggingface
|
cd huggingface
|
||||||
git lfs pull
|
git lfs pull
|
||||||
|
|
||||||
cp -v ../sherpa-onnx-*-pre-compiled-ios-libs.tar.bz2 ./
|
cp -v ../sherpa-onnx-*-ios.tar.bz2 ./
|
||||||
|
|
||||||
git status
|
git status
|
||||||
git lfs track "*.bz2"
|
git lfs track "*.bz2"
|
||||||
|
|
||||||
git add .
|
git add .
|
||||||
|
|
||||||
git commit -m "upload sherpa-onnx-${SHERPA_ONNX_VERSION}-pre-compiled-ios-libs.tar.bz2"
|
git commit -m "upload sherpa-onnx-${SHERPA_ONNX_VERSION}-ios.tar.bz2"
|
||||||
|
|
||||||
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-libs main
|
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-libs main
|
||||||
|
|
||||||
|
- name: Release xcframework
|
||||||
|
if: env.RELEASE == 'true'
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
file_glob: true
|
||||||
|
overwrite: true
|
||||||
|
file: sherpa-onnx-*-ios.tar.bz2
|
||||||
|
|||||||
22
.github/workflows/dot-net.yaml
vendored
22
.github/workflows/dot-net.yaml
vendored
@@ -6,6 +6,20 @@ on:
|
|||||||
- dot-net
|
- dot-net
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
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:
|
concurrency:
|
||||||
group: dot-net-${{ github.ref }}
|
group: dot-net-${{ github.ref }}
|
||||||
@@ -133,3 +147,11 @@ jobs:
|
|||||||
# API_KEY is valid until 2024.05.02
|
# API_KEY is valid until 2024.05.02
|
||||||
cd scripts/dotnet/packages
|
cd scripts/dotnet/packages
|
||||||
dotnet nuget push ./org.k2fsa.sherpa.onnx.*.nupkg --skip-duplicate --api-key $API_KEY --source https://api.nuget.org/v3/index.json
|
dotnet nuget push ./org.k2fsa.sherpa.onnx.*.nupkg --skip-duplicate --api-key $API_KEY --source https://api.nuget.org/v3/index.json
|
||||||
|
|
||||||
|
- name: Release nuget packages
|
||||||
|
if: env.RELEASE == 'true'
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
file_glob: true
|
||||||
|
overwrite: true
|
||||||
|
file: scripts/dotnet/packages/*.nupkg
|
||||||
|
|||||||
47
.github/workflows/linux.yaml
vendored
47
.github/workflows/linux.yaml
vendored
@@ -4,6 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/linux.yaml'
|
- '.github/workflows/linux.yaml'
|
||||||
- '.github/scripts/test-online-transducer.sh'
|
- '.github/scripts/test-online-transducer.sh'
|
||||||
@@ -26,14 +28,25 @@ on:
|
|||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
- 'sherpa-onnx/c-api/*'
|
- 'sherpa-onnx/c-api/*'
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
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:
|
concurrency:
|
||||||
group: linux-${{ github.ref }}
|
group: linux-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
linux:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -53,13 +66,14 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
|
cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=./install ..
|
||||||
|
|
||||||
- name: Build sherpa-onnx for ubuntu
|
- name: Build sherpa-onnx for ubuntu
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
make -j2
|
make -j2
|
||||||
|
make install
|
||||||
|
|
||||||
ls -lh lib
|
ls -lh lib
|
||||||
ls -lh bin
|
ls -lh bin
|
||||||
@@ -101,3 +115,28 @@ jobs:
|
|||||||
export EXE=decode-file-c-api
|
export EXE=decode-file-c-api
|
||||||
|
|
||||||
.github/scripts/test-online-transducer.sh
|
.github/scripts/test-online-transducer.sh
|
||||||
|
|
||||||
|
- name: Copy files
|
||||||
|
if: env.RELEASE == 'true'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
|
||||||
|
|
||||||
|
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-linux-x64
|
||||||
|
mkdir $dst
|
||||||
|
|
||||||
|
cp -a build/install/bin $dst/
|
||||||
|
cp -a build/install/lib $dst/
|
||||||
|
cp -a build/install/include $dst/
|
||||||
|
|
||||||
|
tree $dst
|
||||||
|
|
||||||
|
tar cjvf ${dst}.tar.bz2 $dst
|
||||||
|
|
||||||
|
- name: Release pre-compiled binaries and libs for linux x64
|
||||||
|
if: env.RELEASE == 'true' && matrix.build_type == 'Release'
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
file_glob: true
|
||||||
|
overwrite: true
|
||||||
|
file: sherpa-onnx-*linux-x64.tar.bz2
|
||||||
|
|||||||
46
.github/workflows/macos.yaml
vendored
46
.github/workflows/macos.yaml
vendored
@@ -23,14 +23,25 @@ on:
|
|||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
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:
|
concurrency:
|
||||||
group: macos-${{ github.ref }}
|
group: macos-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
macos:
|
macos:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -50,17 +61,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
|
cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_INSTALL_PREFIX=./install ..
|
||||||
|
|
||||||
- name: Build sherpa-onnx for macos
|
- name: Build sherpa-onnx for macos
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
make -j2
|
make -j2
|
||||||
|
make install
|
||||||
|
|
||||||
ls -lh lib
|
ls -lh lib
|
||||||
ls -lh bin
|
ls -lh bin
|
||||||
|
|
||||||
|
file ./bin/sherpa-onnx
|
||||||
|
|
||||||
- name: Display dependencies of sherpa-onnx for macos
|
- name: Display dependencies of sherpa-onnx for macos
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -100,3 +113,28 @@ jobs:
|
|||||||
export EXE=decode-file-c-api
|
export EXE=decode-file-c-api
|
||||||
|
|
||||||
.github/scripts/test-online-transducer.sh
|
.github/scripts/test-online-transducer.sh
|
||||||
|
|
||||||
|
- name: Copy files
|
||||||
|
if: env.RELEASE == 'true'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
|
||||||
|
|
||||||
|
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-osx-universal2
|
||||||
|
mkdir $dst
|
||||||
|
|
||||||
|
cp -a build/install/bin $dst/
|
||||||
|
cp -a build/install/lib $dst/
|
||||||
|
cp -a build/install/include $dst/
|
||||||
|
|
||||||
|
tree $dst
|
||||||
|
|
||||||
|
tar cjvf ${dst}.tar.bz2 $dst
|
||||||
|
|
||||||
|
- name: Release pre-compiled binaries and libs for macOS
|
||||||
|
if: env.RELEASE == 'true' && matrix.build_type == 'Release'
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
file_glob: true
|
||||||
|
overwrite: true
|
||||||
|
file: sherpa-onnx-*osx-universal2.tar.bz2
|
||||||
|
|||||||
2
.github/workflows/test-dot-net.yaml
vendored
2
.github/workflows/test-dot-net.yaml
vendored
@@ -15,6 +15,8 @@ on:
|
|||||||
- '.github/workflows/test-dot-net'
|
- '.github/workflows/test-dot-net'
|
||||||
- 'dotnet-examples/**'
|
- 'dotnet-examples/**'
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
schedule:
|
schedule:
|
||||||
# minute (0-59)
|
# minute (0-59)
|
||||||
# hour (0-23)
|
# hour (0-23)
|
||||||
|
|||||||
45
.github/workflows/windows-x64.yaml
vendored
45
.github/workflows/windows-x64.yaml
vendored
@@ -4,6 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/windows-x64.yaml'
|
- '.github/workflows/windows-x64.yaml'
|
||||||
- '.github/scripts/test-online-transducer.sh'
|
- '.github/scripts/test-online-transducer.sh'
|
||||||
@@ -23,14 +25,25 @@ on:
|
|||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
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:
|
concurrency:
|
||||||
group: windows-x64-${{ github.ref }}
|
group: windows-x64-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows_x64:
|
windows_x64:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -65,13 +78,14 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -T ${{ matrix.toolset-version}},host=x64 -A x64 -D CMAKE_BUILD_TYPE=Release ..
|
cmake -T ${{ matrix.toolset-version}},host=x64 -A x64 -D CMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install ..
|
||||||
|
|
||||||
- name: Build sherpa-onnx for windows
|
- name: Build sherpa-onnx for windows
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
cmake --build . --config Release -- -m:2
|
cmake --build . --config Release -- -m:2
|
||||||
|
cmake --build . --config Release --target install -- -m:2
|
||||||
|
|
||||||
ls -lh ./bin/Release/sherpa-onnx.exe
|
ls -lh ./bin/Release/sherpa-onnx.exe
|
||||||
|
|
||||||
@@ -106,3 +120,26 @@ jobs:
|
|||||||
export EXE=decode-file-c-api.exe
|
export EXE=decode-file-c-api.exe
|
||||||
|
|
||||||
.github/scripts/test-online-transducer.sh
|
.github/scripts/test-online-transducer.sh
|
||||||
|
|
||||||
|
- name: Copy files
|
||||||
|
if: env.RELEASE == 'true' && matrix.vs-version == 'vs2015'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
|
||||||
|
|
||||||
|
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x64
|
||||||
|
mkdir $dst
|
||||||
|
|
||||||
|
cp -a build/install/bin $dst/
|
||||||
|
cp -a build/install/lib $dst/
|
||||||
|
cp -a build/install/include $dst/
|
||||||
|
|
||||||
|
tar cjvf ${dst}.tar.bz2 $dst
|
||||||
|
|
||||||
|
- name: Release pre-compiled binaries and libs for macOS
|
||||||
|
if: env.RELEASE == 'true' && matrix.vs-version == 'vs2015'
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
file_glob: true
|
||||||
|
overwrite: true
|
||||||
|
file: sherpa-onnx-*-win-x64.tar.bz2
|
||||||
|
|||||||
59
.github/workflows/windows-x86.yaml
vendored
59
.github/workflows/windows-x86.yaml
vendored
@@ -23,17 +23,28 @@ on:
|
|||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
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:
|
concurrency:
|
||||||
group: windows-x86-${{ github.ref }}
|
group: windows-x86-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows_x86:
|
windows_x86:
|
||||||
if: false # disable windows x86 CI for now
|
if: true # disable windows x86 CI for now
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
name: ${{ matrix.vs-version }}
|
name: ${{ matrix.vs-version }}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -66,13 +77,14 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -T ${{ matrix.toolset-version}},host=x64 -A Win32 -D CMAKE_BUILD_TYPE=Release ..
|
cmake -T ${{ matrix.toolset-version}},host=x64 -A Win32 -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=./install ..
|
||||||
|
|
||||||
- name: Build sherpa-onnx for windows
|
- name: Build sherpa-onnx for windows
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
cmake --build . --config Release -- -m:2
|
cmake --build . --config Release -- -m:2
|
||||||
|
cmake --build . --config Release --target install -- -m:2
|
||||||
|
|
||||||
ls -lh ./bin/Release/sherpa-onnx.exe
|
ls -lh ./bin/Release/sherpa-onnx.exe
|
||||||
|
|
||||||
@@ -84,13 +96,13 @@ jobs:
|
|||||||
|
|
||||||
.github/scripts/test-offline-ctc.sh
|
.github/scripts/test-offline-ctc.sh
|
||||||
|
|
||||||
- name: Test offline transducer for Windows x86
|
# - name: Test offline transducer for Windows x86
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
export PATH=$PWD/build/bin/Release:$PATH
|
# export PATH=$PWD/build/bin/Release:$PATH
|
||||||
export EXE=sherpa-onnx-offline.exe
|
# export EXE=sherpa-onnx-offline.exe
|
||||||
|
#
|
||||||
.github/scripts/test-offline-transducer.sh
|
# .github/scripts/test-offline-transducer.sh
|
||||||
|
|
||||||
- name: Test online transducer for Windows x86
|
- name: Test online transducer for Windows x86
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -107,3 +119,26 @@ jobs:
|
|||||||
export EXE=decode-file-c-api.exe
|
export EXE=decode-file-c-api.exe
|
||||||
|
|
||||||
.github/scripts/test-online-transducer.sh
|
.github/scripts/test-online-transducer.sh
|
||||||
|
|
||||||
|
- name: Copy files
|
||||||
|
if: env.RELEASE == 'true' && matrix.vs-version == 'vs2015'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
|
||||||
|
|
||||||
|
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x86
|
||||||
|
mkdir $dst
|
||||||
|
|
||||||
|
cp -a build/install/bin $dst/
|
||||||
|
cp -a build/install/lib $dst/
|
||||||
|
cp -a build/install/include $dst/
|
||||||
|
|
||||||
|
tar cjvf ${dst}.tar.bz2 $dst
|
||||||
|
|
||||||
|
- name: Release pre-compiled binaries and libs for macOS
|
||||||
|
if: env.RELEASE == 'true' && matrix.vs-version == 'vs2015'
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
file_glob: true
|
||||||
|
overwrite: true
|
||||||
|
file: sherpa-onnx-*-win-x86.tar.bz2
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ def get_dict():
|
|||||||
def process_linux(s):
|
def process_linux(s):
|
||||||
libs = [
|
libs = [
|
||||||
"libkaldi-native-fbank-core.so",
|
"libkaldi-native-fbank-core.so",
|
||||||
"libonnxruntime.so.1.14.0",
|
"libonnxruntime.so.1.15.1",
|
||||||
"libsherpa-onnx-c-api.so",
|
"libsherpa-onnx-c-api.so",
|
||||||
"libsherpa-onnx-core.so",
|
"libsherpa-onnx-core.so",
|
||||||
]
|
]
|
||||||
@@ -56,7 +56,7 @@ def process_linux(s):
|
|||||||
def process_macos(s):
|
def process_macos(s):
|
||||||
libs = [
|
libs = [
|
||||||
"libkaldi-native-fbank-core.dylib",
|
"libkaldi-native-fbank-core.dylib",
|
||||||
"libonnxruntime.1.14.0.dylib",
|
"libonnxruntime.1.15.1.dylib",
|
||||||
"libsherpa-onnx-c-api.dylib",
|
"libsherpa-onnx-c-api.dylib",
|
||||||
"libsherpa-onnx-core.dylib",
|
"libsherpa-onnx-core.dylib",
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user