From c2f33e17e59ed0bc4b38763890546e8e86866a82 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Thu, 17 Nov 2022 16:35:57 +0100 Subject: [PATCH 1/3] Fix android compilation --- crash-handler/src/lib.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crash-handler/src/lib.rs b/crash-handler/src/lib.rs index 9e75a07..ea613d6 100644 --- a/crash-handler/src/lib.rs +++ b/crash-handler/src/lib.rs @@ -51,12 +51,10 @@ pub use crash_context::CrashContext; pub enum CrashEventResult { /// The event was handled in some way Handled(bool), - #[cfg(all( - not(target_os = "macos"), - any( - target_os = "linux", - all(target_os = "windows", target_arch = "x86_64") - ) + #[cfg(any( + target_os = "linux", + target_os = "android", + all(target_os = "windows", target_arch = "x86_64"), ))] /// The handler wishes to jump somewhere else, presumably to return /// execution and skip the code that caused the exception From a185512f2128295525732dda8906992e887602f5 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Thu, 17 Nov 2022 16:39:49 +0100 Subject: [PATCH 2/3] Add additional targets to build --- .github/workflows/rust-ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 6fdd8a2..5fc6deb 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -51,6 +51,28 @@ jobs: - name: cargo test run: cargo test + build-android: + name: Build sources + runs-on: ubuntu-22.04 + strategy: + matrix: + job: + - { target: aarch64-unknown-linux-gnu } + - { target: aarch64-unknown-linux-musl } + - { target: aarch64-linux-android } + steps: + - uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + target: ${{ matrix.job.target }} + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + use-cross: true + args: --target ${{ matrix.job.target }} --verbose --all-targets + deny-check: name: cargo-deny runs-on: ubuntu-22.04 From 45efa4ca027676d1977b021f81489736c24627a7 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Thu, 17 Nov 2022 16:43:37 +0100 Subject: [PATCH 3/3] Add caching --- .github/workflows/rust-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 5fc6deb..d492e91 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -66,6 +66,7 @@ jobs: uses: dtolnay/rust-toolchain@stable with: target: ${{ matrix.job.target }} + - uses: Swatinem/rust-cache@v2 - name: Build uses: actions-rs/cargo@v1 with: