Skip to content

Commit

Permalink
chore(.github): add android workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Aug 1, 2024
1 parent ce97879 commit 51d3efe
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
on: [push, pull_request]

name: CI


jobs:
test:
runs-on: ubuntu-latest

env:
ANDROID_SDK_ROOT: ${{ github.workspace }}/android-sdk
ANDROID_NDK_HOME: ${{ github.workspace }}/android-ndk
ANDROID_HOME: ${{ github.workspace }}/android-sdk

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- name: Set up Android SDK
uses: android-actions/setup-android@v2
with:
api-level: 30
build-tools: 30.0.3
ndk: 21.3.6528147

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- name: Add Android targets
run: rustup target add aarch64-linux-android

- name: Install cargo-ndk
run: cargo install cargo-ndk

- name: Install cargo-mobile
run: cargo install cargo-mobile

- name: Build for Android
run: cargo mobile build --target android

- name: Run Tests on Android
run: cargo mobile test --target android

0 comments on commit 51d3efe

Please sign in to comment.