Skip to content

Add CI workflow for building and testing the app #3

Add CI workflow for building and testing the app

Add CI workflow for building and testing the app #3

Workflow file for this run

---
on:
push:
branches:
- master
pull_request:
jobs:
build-app:
name: Build app
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: true
- name: Validate gradle wrapper checksum
uses: gradle/actions/wrapper-validation@v3
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: gradle
- name: Set up Go
uses: actions/setup-go@v5
- name: Install gomobile
run: go install golang.org/x/mobile/cmd/gomobile@latest
- name: Get NDK version
id: get_version
shell: bash
run: |
sed -nr 's/^\s*(ndkVersion)\s*(=)\s"(.+)".*$/\1\2\3/p' \
app/build.gradle.kts \
>> "${GITHUB_OUTPUT}"
- name: Build and test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
arch: x86_64
ndk: ${{ steps.get_version.outputs.ndkVersion }}
# Debug build only since release builds require a signing key
script: ./gradlew --no-daemon build -x assembleRelease