Skip to content

Commit

Permalink
try this jni lib
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Jun 26, 2024
1 parent ef8f019 commit 53267f6
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/release-kotlin-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,29 @@ jobs:
use-cross: true
command: build
args: --release --target ${{ matrix.target }} --manifest-path bindings_ffi/Cargo.toml --target-dir bindings_ffi/target

- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.output_target }}
path: bindings_ffi/target/${{ matrix.output_target }}/release/libxmtpv3.so
name: ${{ matrix.target }}
path: bindings_ffi/target/${{ matrix.target }}/release/libxmtpv3.so
retention-days: 1

- name: Prepare JNI libs
run: |
LIBRARY_NAME="libxmtpv3"
TARGET_NAME="libuniffi_xmtpv3"
cd bindings_ffi
rm -rf jniLibs/
mkdir -p jniLibs/armeabi-v7a/ && \
cp target/armv7-linux-androideabi/release/$LIBRARY_NAME.so jniLibs/armeabi-v7a/$TARGET_NAME.so && \
mkdir -p jniLibs/x86/ && \
cp target/i686-linux-android/release/$LIBRARY_NAME.so jniLibs/x86/$TARGET_NAME.so && \
mkdir -p jniLibs/x86_64/ && \
cp target/x86_64-linux-android/release/$LIBRARY_NAME.so jniLibs/x86_64/$TARGET_NAME.so && \
mkdir -p jniLibs/arm64-v8a/ && \
cp target/aarch64-linux-android/release/$LIBRARY_NAME.so jniLibs/arm64-v8a/$TARGET_NAME.so
package-kotlin:
needs: [build-linux]
Expand All @@ -77,12 +94,12 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: bindings_ffi/target
path: bindings_ffi/jniLibs

- name: Build archive
working-directory: bindings_ffi
run: |
zip -r LibXMTPKotlinFFI.zip target
zip -r LibXMTPKotlinFFI.zip jniLibs
- name: Get short SHA
id: slug
Expand Down

0 comments on commit 53267f6

Please sign in to comment.