From 762704256e2cf1b18bb5342d7eba0ff54eb9d5a9 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 2 Dec 2024 16:22:03 -0800 Subject: [PATCH] ci: build android Fixes: https://github.com/damus-io/notedeck/issues/529 --- .github/workflows/rust.yml | 30 ++++++++++++++++++++++++++++++ Cargo.toml | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 81f49a64..f3f103f2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -30,6 +30,36 @@ jobs: components: clippy - run: cargo clippy -- -D warnings + android-build: + name: Build (Android) + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + with: + packages: 'platforms;android-30' + accept-android-sdk-licenses: true + + - name: Install android target & cargo-apk + run: | + rustup target add aarch64-linux-android + cargo install cargo-apk + + - name: Rust cache + uses: Swatinem/rust-cache@v2 + + - name: Run Tests + run: cargo apk build + linux-test: name: Test (Linux) uses: ./.github/workflows/build-and-test.yml diff --git a/Cargo.toml b/Cargo.toml index 237c6d76..144059d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ description = "A multiplatform nostr client" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] -crate-type = ["lib", "cdylib"] +crate-type = ["lib"] [workspace.dependencies] egui = { git = "https://github.com/emilk/egui", rev = "fcb7764e48ce00f8f8e58da10f937410d65b0bfb", features = ["serde"] }