Skip to content

Commit f1d7556

Browse files
committed
build(workflow): add sherpa ncnn library download step
- Add new workflow step to download and extract Sherpa NCNN library - Create target directory for jniLibs - Download APK from GitHub releases - Extract specific library file for arm64-v8a architecture - Add verification step to ensure library extraction - Update .gitignore to exclude downloaded sherpa.apk file
1 parent 1505a9a commit f1d7556

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ jobs:
3333
- name: Grant execute permission for gradlew
3434
run: chmod +x gradlew
3535

36+
- name: Download and Extract Sherpa NCNN Library
37+
run: |
38+
# Create target directory
39+
mkdir -p app/src/main/jniLibs/arm64-v8a
40+
41+
# Download the APK containing the library
42+
curl -L -o sherpa.apk https://github.com/k2-fsa/sherpa-ncnn/releases/download/v2.1.15/sherpa-ncnn-2.1.15-cpu-arm64-v8a-bilingual-en-zh.apk
43+
44+
# Extract the specific library file
45+
unzip -j sherpa.apk lib/arm64-v8a/libsherpa-ncnn-jni.so -d app/src/main/jniLibs/arm64-v8a/
46+
47+
# Verify file exists
48+
ls -l app/src/main/jniLibs/arm64-v8a/libsherpa-ncnn-jni.so
49+
3650
- name: Build Release APK
3751
run: ./gradlew assembleRelease
3852

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ gradle/gradle-8.7
4242
mnn/build/*
4343
mnn/build
4444
kls_database.db
45+
sherpa.apk

0 commit comments

Comments
 (0)