This repository was archived by the owner on Mar 26, 2026. It is now read-only.
Build and bundle gemstone locally instead of prebuilt package #1620
This file contains hidden or 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: | |
| UNIT_TESTS: "true" | |
| jobs: | |
| unit_test: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Free disk space | |
| run: | | |
| df -h | |
| sudo rm -rf /usr/share/dotnet /opt/ghc /opt/hostedtoolcache/CodeQL /usr/local/lib/node_modules | |
| sudo apt-get clean | |
| df -h | |
| - name: Enable KVM | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: "17" | |
| distribution: "temurin" | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install just | |
| uses: extractions/setup-just@v2 | |
| - name: Cache NDK | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.ANDROID_HOME }}/ndk/28.1.13356709 | |
| key: ndk-28.1.13356709-${{ runner.os }} | |
| - name: Setup NDK | |
| run: just install-ndk | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-linux-android,aarch64-linux-android,armv7-linux-androideabi | |
| - name: Cache cargo-ndk binary | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/bin/cargo-ndk | |
| key: ${{ runner.os }}-cargo-ndk-4.1.2 | |
| - name: Install cargo-ndk | |
| run: command -v cargo-ndk || cargo install cargo-ndk@4.1.2 --locked | |
| - name: Cache Cargo registry and git | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-deps-${{ hashFiles('core/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-deps- | |
| - name: Cache Cargo target | |
| uses: actions/cache@v4 | |
| with: | |
| path: core/target | |
| key: ${{ runner.os }}-cargo-target-${{ hashFiles('core/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-target- | |
| - name: Cache AVD | |
| uses: actions/cache@v4 | |
| id: avd-cache | |
| with: | |
| path: | | |
| ~/.android/avd/* | |
| ~/.android/adb* | |
| key: avd-29-2g-${{ runner.os }} | |
| - name: Gradle cache | |
| uses: gradle/actions/setup-gradle@v3 | |
| with: | |
| cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
| - name: Build tests | |
| run: just build-test | |
| env: | |
| GPR_USERNAME: ${{ github.actor }} | |
| GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run tests | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 29 | |
| arch: x86_64 | |
| force-avd-creation: false | |
| disk-size: 2048M | |
| emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: true | |
| script: just test | |
| env: | |
| GPR_USERNAME: ${{ github.actor }} | |
| GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }} |