From 37b4b80ca63db6bd75faee3e30b14821e9ab7647 Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Wed, 8 Nov 2023 23:15:41 +0800 Subject: [PATCH] chore: add github actions --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c3bf511 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: Android + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + instrumented_tests: + name: Run Instrumented Tests + runs-on: macos-latest + + steps: + - name: Save logcat output + uses: actions/upload-artifact@master + if: failure() + with: + name: logcat + path: artifacts/logcat.log + + - name: checkout + uses: actions/checkout@v2 + + - name: rust toolchain setup + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: install cargo ndk + uses: actions-rs/cargo@v1 + with: + command: install + args: cargo-ndk + + - name: setup build targets + run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android aarch64-apple-ios --target=x86_64-apple-ios + + - name: build + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 34 + script: ./gradlew cargoBuild +