Setup CI #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android Tests | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CI: "true" | |
CARGO_INCREMENTAL: 0 | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
jobs: | |
unit_test: | |
name: Build and Test | |
runs-on: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: "17" | |
distribution: "zulu" | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Setup NDK | |
run: make install-ndk | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: | | |
core/gemstone | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Install dependencies | |
run: | | |
make install-typeshare && make install-toolchains | |
- name: Gradle cache | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Build Core | |
run: make generate | |
- name: Build tests | |
run: make build-test | |
env: | |
GRP_USERNAME: ${{ github.actor }} | |
GRP_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 31 | |
target: google_apis | |
arch: x86_64 | |
script: make test |