# Unit tests, Android Lint and debug builds of both apps on every push to main and every PR. name: CI on: push: branches: [main] pull_request: jobs: check: runs-on: mac-mini # Ubuntu with Node, git and curl, which the setup actions need. container: image: gitea/runner-images:ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: distribution: temurin java-version: 21 # Accepts the SDK licenses, so AGP can fetch the build tools it wants on its own. - uses: android-actions/setup-android@v3 with: packages: platform-tools platforms;android-37.0 # The mac-mini runner's containers are arm64, while AGP's aapt2 is built for x86-64 only. # OrbStack runs it through Rosetta, once the x86-64 glibc it links against is installed. - name: Install the x86-64 glibc run: | if [ "$(uname -m)" != aarch64 ]; then exit 0; fi # Ubuntu serves amd64 packages from a different archive than arm64 ones. sed -i '/^URIs:/a Architectures: arm64' /etc/apt/sources.list.d/ubuntu.sources cat > /etc/apt/sources.list.d/amd64.sources < /dev/null 2>&1 && break sleep 5 done apt-get install -y -qq --no-install-recommends libc6:amd64 - run: ./gradlew testDebugUnitTest lint assembleDebug # Gitea's artifact backend speaks the v3 protocol only. - if: failure() uses: actions/upload-artifact@v3 with: name: reports path: | */build/reports/ */build/test-results/ if-no-files-found: ignore