Skip to content

Commit

Permalink
fix builing apk (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Aug 18, 2023
1 parent d42def5 commit db4454f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/apk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
tags:
- '*'

workflow_dispatch:

concurrency:
group: apk-${{ github.ref }}
cancel-in-progress: true
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/jni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- jni-test-2023-01-09
paths:
- '.github/workflows/jni.yaml'
- 'CMakeLists.txt'
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(sherpa-ncnn)

set(SHERPA_NCNN_VERSION "2.0.5")
set(SHERPA_NCNN_VERSION "2.0.6")

# Disable warning about
#
Expand Down
Empty file.
12 changes: 11 additions & 1 deletion build-apk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ log "====================x86===================="
./build-android-x86.sh


mkdir -p apks

log "https://huggingface.co/csukuangfj/sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13"

# Download the model
# see https://k2-fsa.github.io/sherpa/ncnn/pretrained_models/zipformer-transucer-models.html#csukuangfj-sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13-bilingual-chinese-english
repo_url=https://huggingface.co/csukuangfj/sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13
Expand All @@ -40,6 +44,7 @@ git lfs pull --include "*.bin"

# remove .git to save spaces
rm -rf .git
rm .gitattributes
rm -rfv test_wavs
rm -v export-for-ncnn-bilingual.sh
rm README.md
Expand All @@ -49,7 +54,10 @@ popd
mv -v $repo ./android/SherpaNcnn/app/src/main/assets/
tree ./android/SherpaNcnn/app/src/main/assets/

mkdir -p apks
pushd android/SherpaNcnn/app/src/main/java/com/k2fsa/sherpa/ncnn
sed -i.bak s/"type = 1"/"type = 2"/ ./MainActivity.kt
git diff
popd

for arch in arm64-v8a armeabi-v7a x86_64 x86; do
log "------------------------------------------------------------"
Expand All @@ -75,4 +83,6 @@ for arch in arm64-v8a armeabi-v7a x86_64 x86; do
rm -v ./android/SherpaNcnn/app/src/main/jniLibs/$arch/*.so
done

git checkout .

ls -lh apks/

0 comments on commit db4454f

Please sign in to comment.