Skip to content

Commit 012ff9d

Browse files
committed
android: add initial ci
Signed-off-by: William Casarin <[email protected]>
1 parent c8e8618 commit 012ff9d

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/workflows/rust.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,28 @@ jobs:
2222
cargo fmt --all -- --check
2323
cargo clippy
2424
25+
android:
26+
name: Check (android)
27+
runs-on: ubuntu-22.04
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: dtolnay/rust-toolchain@stable
31+
with:
32+
components: rustfmt,clippy
33+
- name: Setup Java JDK
34+
uses: actions/[email protected]
35+
with:
36+
java-version: '17'
37+
distribution: 'temurin'
38+
- name: Setup Android SDK
39+
uses: android-actions/setup-android@v3
40+
- name: Add android rust target
41+
run: rustup target add aarch64-linux-android
42+
- name: Install Cargo NDK
43+
run: cargo install cargo-ndk
44+
- name: Run tests
45+
run: make jni-check
46+
2547
linux-test:
2648
name: Test (Linux)
2749
uses: ./.github/workflows/build-and-test.yml

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jni: fake
1313
cargo ndk --target arm64-v8a -o $(ANDROID_DIR)/app/src/main/jniLibs/ build --profile release
1414

1515
jni-check: fake
16-
cargo ndk --target arm64-v8a -o $(ANDROID_DIR)/app/src/main/jniLibs/ check
16+
cargo ndk --target arm64-v8a check
1717

1818
apk: jni
1919
cd $(ANDROID_DIR) && ./gradlew build

0 commit comments

Comments
 (0)