-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c214d8f
commit d08cc04
Showing
33 changed files
with
883 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,6 +152,8 @@ jobs: | |
- name: Build flutter | ||
shell: bash | ||
run: | | ||
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) | ||
d=$PWD | ||
pushd sherpa-onnx/flutter | ||
|
@@ -166,7 +168,7 @@ jobs: | |
tree ./sherpa_onnx.app | ||
app=flutter_sherpa_onnx_macos_${{ matrix.arch }}.app | ||
app=sherpa-onnx-osx-${{ matrix.arch }}-$SHERPA_ONNX_VERSION.app | ||
mv sherpa_onnx.app $app | ||
tar cjfv $app.tar.bz2 $app | ||
ls -lh | ||
|
@@ -178,13 +180,43 @@ jobs: | |
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: flutter-sherpa-onnx-app-macos-${{ matrix.arch }} | ||
name: sherpa-onnx-osx-${{ matrix.arch }} | ||
path: ./*.tar.bz2 | ||
|
||
- name: Release android libs | ||
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
uses: svenstaro/upload-release-action@v2 | ||
- name: Publish to huggingface | ||
env: | ||
HF_TOKEN: ${{ secrets.HF_TOKEN }} | ||
uses: nick-fields/retry@v3 | ||
with: | ||
file_glob: true | ||
overwrite: true | ||
file: flutter*.tar.bz2 | ||
max_attempts: 20 | ||
timeout_seconds: 200 | ||
shell: bash | ||
command: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Fangjun Kuang" | ||
rm -rf huggingface | ||
export GIT_LFS_SKIP_SMUDGE=1 | ||
export GIT_CLONE_PROTECTION_ACTIVE=false | ||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-flutter huggingface | ||
cd huggingface | ||
git fetch | ||
git pull | ||
git merge -m "merge remote" --ff origin main | ||
mkdir -p flutter | ||
cp -v ../*.tar.bz2 ./flutter | ||
git status | ||
git lfs track "*.bz2" | ||
git add . | ||
git commit -m "add more files" | ||
git push https://csukuangfj:[email protected]/csukuangfj/sherpa-onnx-flutter main | ||
# - name: Release android libs | ||
# if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
# uses: svenstaro/upload-release-action@v2 | ||
# with: | ||
# file_glob: true | ||
# overwrite: true | ||
# file: sherpa*.tar.bz2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,7 +142,7 @@ jobs: | |
cd build/windows/x64/runner/ | ||
dst=flutter_sherpa_onnx_windows_x64 | ||
dst=sherpa-onnx-win-x64-$SHERPA_ONNX_VERSION | ||
mv Release $dst | ||
tar cjfv $dst.tar.bz2 ./$dst | ||
|
@@ -155,13 +155,43 @@ jobs: | |
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: flutter-sherpa-onnx-windows-x64 | ||
name: sherpa-onnx-win-x64 | ||
path: ./*.tar.bz2 | ||
|
||
- name: Release android libs | ||
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
uses: svenstaro/upload-release-action@v2 | ||
- name: Publish to huggingface | ||
env: | ||
HF_TOKEN: ${{ secrets.HF_TOKEN }} | ||
uses: nick-fields/retry@v3 | ||
with: | ||
file_glob: true | ||
overwrite: true | ||
file: flutter*.tar.bz2 | ||
max_attempts: 20 | ||
timeout_seconds: 200 | ||
shell: bash | ||
command: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Fangjun Kuang" | ||
rm -rf huggingface | ||
export GIT_LFS_SKIP_SMUDGE=1 | ||
export GIT_CLONE_PROTECTION_ACTIVE=false | ||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-flutter huggingface | ||
cd huggingface | ||
git fetch | ||
git pull | ||
git merge -m "merge remote" --ff origin main | ||
mkdir -p flutter | ||
cp -v ../*.tar.bz2 ./flutter | ||
git status | ||
git lfs track "*.bz2" | ||
git add . | ||
git commit -m "add more files" | ||
git push https://csukuangfj:[email protected]/csukuangfj/sherpa-onnx-flutter main | ||
# - name: Release android libs | ||
# if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
# uses: svenstaro/upload-release-action@v2 | ||
# with: | ||
# file_glob: true | ||
# overwrite: true | ||
# file: sherpa*.tar.bz2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: test-dart | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- '.github/workflows/test-dart.yaml' | ||
- 'dart-api-examples/**' | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- '.github/workflows/test-dart.yaml' | ||
- 'dart-api-examples/**' | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: test-dart-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
dart: | ||
name: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] #, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Flutter SDK | ||
uses: flutter-actions/setup-flutter@v3 | ||
with: | ||
channel: stable | ||
version: latest | ||
|
||
- name: Display flutter info | ||
shell: bash | ||
run: | | ||
which flutter | ||
which dart | ||
flutter --version | ||
dart --version | ||
flutter doctor | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
cd dart-api-examples | ||
pushd vad | ||
./run.sh | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.