diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d2839d4..aeb3f66 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,6 +22,28 @@ jobs: cargo fmt --all -- --check cargo clippy + android: + name: Check (android) + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt,clippy + - name: Setup Java JDK + uses: actions/setup-java@v4.5.0 + with: + java-version: '17' + distribution: 'temurin' + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + - name: Add android rust target + run: rustup target add aarch64-linux-android + - name: Install Cargo NDK + run: cargo install cargo-ndk + - name: Run tests + run: make jni-check + linux-test: name: Test (Linux) uses: ./.github/workflows/build-and-test.yml diff --git a/Makefile b/Makefile index d1240e5..84eb3cb 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ jni: fake cargo ndk --target arm64-v8a -o $(ANDROID_DIR)/app/src/main/jniLibs/ build --profile release jni-check: fake - cargo ndk --target arm64-v8a -o $(ANDROID_DIR)/app/src/main/jniLibs/ check + cargo ndk --target arm64-v8a check apk: jni cd $(ANDROID_DIR) && ./gradlew build