45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
name: Android acceptance
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
android:
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 40
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
github-server-url: https://gitea.turkservis.online
|
|
- name: Set up Java 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: '21'
|
|
- name: Set up Android SDK
|
|
shell: bash
|
|
run: bash scripts/setup-android-ci.sh
|
|
- name: Test and build exact commit
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
test "$(git rev-parse HEAD)" = "$GITHUB_SHA"
|
|
uname -a
|
|
free -m
|
|
# One compiler process inside the server's bounded, serial CI runner.
|
|
build_args=(--no-daemon --console=plain --max-workers=1
|
|
'-Dorg.gradle.jvmargs=-Xmx2560m -Dfile.encoding=UTF-8'
|
|
'-Pkotlin.compiler.execution.strategy=in-process')
|
|
bash gradlew testDebugUnitTest assembleDebug "${build_args[@]}"
|
|
bash gradlew compileReleaseKotlin "${build_args[@]}"
|
|
- name: Keep exact-commit APK and test reports
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: aiturk-android-${{ github.sha }}
|
|
if-no-files-found: error
|
|
path: |
|
|
app/build/outputs/apk/debug/app-debug.apk
|
|
app/build/reports/tests/testDebugUnitTest
|