commit 012ff9d53dd26b44f92592c4f229af894e37e43c parent c8e861812b5af23bcd3f36be418e4228f3cb7191 Author: William Casarin <jb55@jb55.com> Date: Tue, 17 Jun 2025 12:58:12 -0700 android: add initial ci Signed-off-by: William Casarin <jb55@jb55.com> Diffstat:
M | .github/workflows/rust.yml | | | 22 | ++++++++++++++++++++++ |
M | Makefile | | | 2 | +- |
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git 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 @@ -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