forked from k2-fsa/sherpa-onnx
-
Notifications
You must be signed in to change notification settings - Fork 1
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
345c140
commit 28f0348
Showing
1 changed file
with
48 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ concurrency: | |
|
||
jobs: | ||
build-android-libs: | ||
name: Android for ${{ matrix.os }} | ||
name: Android libs | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
|
@@ -44,6 +44,11 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.os }}-android-jni | ||
|
||
- name: Display NDK HOME | ||
shell: bash | ||
run: | | ||
|
@@ -53,6 +58,9 @@ jobs: | |
- name: build android arm64-v8a | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
export ANDROID_NDK=$ANDROID_NDK_LATEST_HOME | ||
./build-android-arm64-v8a.sh | ||
mkdir -p jniLibs/arm64-v8a/ | ||
|
@@ -62,6 +70,9 @@ jobs: | |
- name: build android armv7-eabi | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
export ANDROID_NDK=$ANDROID_NDK_LATEST_HOME | ||
./build-android-armv7-eabi.sh | ||
mkdir -p ./jniLibs/armeabi-v7a/ | ||
|
@@ -71,6 +82,9 @@ jobs: | |
- name: build android x86_64 | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
export ANDROID_NDK=$ANDROID_NDK_LATEST_HOME | ||
./build-android-x86-64.sh | ||
mkdir -p ./jniLibs/x86_64 | ||
|
@@ -80,6 +94,9 @@ jobs: | |
- name: build android x86 | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
export ANDROID_NDK=$ANDROID_NDK_LATEST_HOME | ||
./build-android-x86.sh | ||
mkdir -p ./jniLibs/x86 | ||
|
@@ -143,3 +160,33 @@ jobs: | |
file_glob: true | ||
overwrite: true | ||
file: sherpa-onnx-*-android.tar.bz2 | ||
|
||
build-android-aar: | ||
needs: [build-android-libs] | ||
name: Android AAR | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Display NDK HOME | ||
shell: bash | ||
run: | | ||
echo "ANDROID_NDK_LATEST_HOME: ${ANDROID_NDK_LATEST_HOME}" | ||
ls -lh ${ANDROID_NDK_LATEST_HOME} | ||
- name: Retrieve artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: sherpa-onnx-android-libs | ||
path: /tmp/jniLibs | ||
|
||
- name: Show jni libs | ||
shell: bash | ||
run: | | ||
ls -lh /tmp/jniLibs |