Skip to content

Commit

Permalink
merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
pkufool committed Feb 29, 2024
2 parents 4a04172 + 38c072d commit 857c432
Show file tree
Hide file tree
Showing 182 changed files with 5,037 additions and 1,319 deletions.
37 changes: 22 additions & 15 deletions .github/workflows/aarch64-linux-gnu-shared.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: cache-qemu
id: cache-qemu
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: qemu-install
key: qemu-aarch64-install-20220908
Expand Down Expand Up @@ -79,38 +79,46 @@ jobs:
- name: cache-toolchain
id: cache-toolchain
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: toolchain
key: gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu
key: gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz

- name: Download toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
shell: bash
run: |
wget https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz
wget -qq https://huggingface.co/csukuangfj/sherpa-ncnn-toolchains/resolve/main/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz
mkdir $GITHUB_WORKSPACE/toolchain
tar xvf ./gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz --strip-components 1 -C $GITHUB_WORKSPACE/toolchain
tar xf ./gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz --strip-components 1 -C $GITHUB_WORKSPACE/toolchain
- name: Set environment variable
if: steps.cache-build-result.outputs.cache-hit != 'true'
shell: bash
run: |
echo "$GITHUB_WORKSPACE/toolchain/bin" >> "$GITHUB_PATH"
echo "$GITHUB_WORKSPACE/bin" >> "$GITHUB_PATH"
ls -lh "$GITHUB_WORKSPACE/toolchain/bin"
echo "CC=aarch64-none-linux-gnu-gcc" >> "$GITHUB_ENV"
echo "CXX=aarch64-none-linux-gnu-g++" >> "$GITHUB_ENV"
- name: Display toolchain info
shell: bash
run: |
export PATH=$GITHUB_WORKSPACE/toolchain/bin:$PATH
aarch64-linux-gnu-gcc --version
aarch64-none-linux-gnu-gcc --version
- name: Display qemu-aarch64 -h
shell: bash
run: |
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-none-linux-gnu/libc
qemu-aarch64 -h
- name: build aarch64-linux-gnu
shell: bash
run: |
export PATH=$GITHUB_WORKSPACE/toolchain/bin:$PATH
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
Expand All @@ -130,7 +138,7 @@ jobs:
run: |
export PATH=$GITHUB_WORKSPACE/toolchain/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-none-linux-gnu/libc
ls -lh ./build-aarch64-linux-gnu/bin
Expand All @@ -141,8 +149,7 @@ jobs:
- name: Copy files
shell: bash
run: |
export PATH=$GITHUB_WORKSPACE/toolchain/bin:$PATH
aarch64-linux-gnu-strip --version
aarch64-none-linux-gnu-strip --version
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
Expand All @@ -157,13 +164,13 @@ jobs:
ls -lh $dst/bin/
echo "strip"
aarch64-linux-gnu-strip $dst/bin/*
aarch64-none-linux-gnu-strip $dst/bin/*
tree $dst
tar cjvf ${dst}.tar.bz2 $dst
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: sherpa-onnx-linux-aarch64-shared
path: sherpa-onnx-*linux-aarch64-shared.tar.bz2
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/aarch64-linux-gnu-static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: cache-qemu
id: cache-qemu
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: qemu-install
key: qemu-aarch64-install-20220908
Expand Down Expand Up @@ -79,20 +79,19 @@ jobs:
- name: cache-toolchain
id: cache-toolchain
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: toolchain
key: gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
key: gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz

- name: Download toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
shell: bash
run: |
# wget wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
wget -qq https://huggingface.co/csukuangfj/sherpa-ncnn-toolchains/resolve/main/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
wget -qq https://huggingface.co/csukuangfj/sherpa-ncnn-toolchains/resolve/main/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz
mkdir $GITHUB_WORKSPACE/toolchain
tar xf ./gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz --strip-components 1 -C $GITHUB_WORKSPACE/toolchain
tar xf ./gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz --strip-components 1 -C $GITHUB_WORKSPACE/toolchain
- name: Display toolchain info
shell: bash
Expand Down Expand Up @@ -162,7 +161,7 @@ jobs:
tar cjvf ${dst}.tar.bz2 $dst
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: sherpa-onnx-linux-aarch64-static
path: sherpa-onnx-*linux-aarch64-static.tar.bz2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
ls -lh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: sherpa-onnx-android-libs
path: ./jniLibs
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/apk-kws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ jobs:
with:
fetch-depth: 0

# https://github.com/actions/setup-java
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '21'

- name: ccache
uses: hendrikmuhs/[email protected]
with:
Expand All @@ -55,7 +61,7 @@ jobs:
run: |
ls -lh ./apks/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./apks/*.apk

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apk-speaker-identification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
if: true
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 20
timeout_seconds: 200
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/apk-tts-engine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
ls -lh ./apks/
du -h -d1 .
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: false
with:
name: tts-engine-apk
Expand All @@ -94,7 +94,7 @@ jobs:
if: true
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 20
timeout_seconds: 200
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/apk-tts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
with:
fetch-depth: 0

# https://github.com/actions/setup-java
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '21'

- name: ccache
uses: hendrikmuhs/[email protected]
with:
Expand Down Expand Up @@ -79,7 +85,7 @@ jobs:
ls -lh ./apks/
du -h -d1 .
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: false
with:
name: tts-apk
Expand All @@ -89,7 +95,7 @@ jobs:
if: true
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 20
timeout_seconds: 200
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/apk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ jobs:
with:
fetch-depth: 0

# https://github.com/actions/setup-java
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '21'

- name: ccache
uses: hendrikmuhs/[email protected]
with:
Expand Down Expand Up @@ -57,7 +63,7 @@ jobs:
run: |
ls -lh ./apks/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./apks/*.apk

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/arm-linux-gnueabihf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

- name: cache-qemu
id: cache-qemu
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: qemu-install
key: qemu-arm-install-20220907
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- name: cache-toolchain
id: cache-toolchain
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: toolchain
key: gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
Expand Down Expand Up @@ -177,13 +177,13 @@ jobs:
tar cjvf ${dst}.tar.bz2 $dst
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: matrix.lib_type == 'shared'
with:
name: sherpa-onnx-linux-arm-gnueabihf-shared
path: sherpa-onnx-*linux-arm-gnueabihf-shared.tar.bz2

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: matrix.lib_type == 'static'
with:
name: sherpa-onnx-linux-arm-gnueabihf-static
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-wheels-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
if: matrix.python-version == 'cp38'
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 20
timeout_seconds: 200
Expand All @@ -88,7 +88,7 @@ jobs:
git commit -m "add more wheels"
git push https://csukuangfj:[email protected]/csukuangfj/sherpa-onnx-wheels main
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-wheels-armv7l.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
if: matrix.python-version == '3.8'
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 20
timeout_seconds: 200
Expand All @@ -113,7 +113,7 @@ jobs:
git push https://csukuangfj:[email protected]/csukuangfj/sherpa-onnx-wheels main
- name: Upload wheel
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sherpa_onnx-${{ env.SHERPA_ONNX_VERSION }}-cp${{ env.PYTHON_VERSION }}-cp${{ env.PYTHON_VERSION }}-linux_armv7l.whl.zip
path: ./wheelhouse/*.whl
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-wheels-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ jobs:
rm -rf ./wheelhouse
mv ./wheels ./wheelhouse
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

- name: Publish to huggingface
if: matrix.python-version == 'cp38'
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 20
timeout_seconds: 200
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-wheels-macos-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ jobs:
ls -lh ./wheelhouse/*.whl
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

- name: Publish to huggingface
if: matrix.python-version == 'cp38'
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 20
timeout_seconds: 200
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-wheels-macos-x64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ jobs:
ls -lh ./wheelhouse/*.whl
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

- name: Publish to huggingface
if: matrix.python-version == 'cp38'
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 20
timeout_seconds: 200
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-wheels-win32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ jobs:
ls -lh ./wheelhouse/*.whl
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

- name: Publish to huggingface
if: matrix.python-version == 'cp38'
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 20
timeout_seconds: 200
Expand Down
Loading

0 comments on commit 857c432

Please sign in to comment.