Skip to content

Commit

Permalink
Final touches on AAR build and release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
oluiscabral committed Dec 12, 2024
1 parent 68f478f commit c80086b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 28 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ jobs:

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly # nightly is required for fmt
components: rustfmt, clippy

- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
Expand All @@ -33,11 +30,6 @@ jobs:
- name: Check
run: cargo check

- name: Format
run: |
cargo fmt --all -- --check
cargo clippy --workspace --bins -- -D warnings
- name: Run tests
run: cargo test --verbose

Expand Down
29 changes: 9 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android

- name: Set up Cargo Cache
uses: Swatinem/rust-cache@v2
Expand All @@ -38,28 +36,19 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3

- name: Set up Android SDK
uses: android-actions/setup-android@v3

- name: Set up Android NDK
uses: nttld/setup-ndk@v1
with:
link-to-sdk: true
ndk-version: r28-beta1

- name: Java tests
run: gradle test
working-directory: ./java

- name: Install cargo-ndk
run: cargo install cargo-ndk

- name: Build fs-storage JNI libs
run: cargo ndk -o ./target/release/fs-storage/jniLibs --target aarch64-linux-android --target armv7-linux-androideabi --target i686-linux-android --target x86_64-linux-android build -p fs-storage --release

- name: Create JNI Libraries ZIP
run: |
cd target/release/fs-storage
zip -r ../../../jniLibs.zip jniLibs
cd -
- name: Release JNI Libraries ZIP
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "jniLibs.zip"

- name: Publish Java release
run: gradle publish
working-directory: ./java
Expand Down

0 comments on commit c80086b

Please sign in to comment.