Skip to content

Commit 8ecb93e

Browse files
authored
[ci] Add Android build workflow (#75)
1 parent b399374 commit 8ecb93e

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,44 @@ jobs:
4747
- name: run Cargo clippy
4848
run: cargo clippy -- -D warnings -A deprecated
4949

50+
android:
51+
runs-on: ubuntu-latest
52+
strategy:
53+
matrix:
54+
rust:
55+
- stable
56+
- beta
57+
- nightly
58+
env:
59+
CARGO_TERM_COLOR: always
60+
# 20 MiB stack
61+
RUST_MIN_STACK: 20971520
62+
63+
steps:
64+
- uses: actions/checkout@v4
65+
with:
66+
submodules: true
67+
68+
- name: Install Rust
69+
run: |
70+
rustup set auto-self-update disable
71+
rustup toolchain install ${{ matrix.rust }} --profile minimal --component rustfmt clippy
72+
rustup target add aarch64-linux-android
73+
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
74+
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
75+
echo RUST_BACKTRACE=1 >> $GITHUB_ENV
76+
77+
- name: Setup Android SDK
78+
uses: android-actions/setup-android@07976c6290703d34c16d382cb36445f98bb43b1f #3.2.0
79+
80+
- name: Setup Android NDK
81+
run: sdkmanager "ndk;26.1.10909125"
82+
83+
- name: Compile for Android
84+
run: |
85+
cargo install cargo-ndk
86+
cargo ndk -t aarch64-linux-android build
87+
5088
# wasi:
5189
# name: wasi
5290
# runs-on: ubuntu-latest

0 commit comments

Comments
 (0)