From c80086bde709326e9894c93f510017151c90d1db Mon Sep 17 00:00:00 2001 From: oluiscabral Date: Wed, 11 Dec 2024 23:09:53 -0300 Subject: [PATCH] Final touches on AAR build and release workflow --- .github/workflows/build.yml | 8 -------- .github/workflows/release.yml | 29 +++++++++-------------------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee96394..4125fc9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 214ebe9..23a8703 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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