Files
tern-android/.gitea/workflows/ci.yml
T
Mateusz PstruchaandClaude Opus 5.5 d7ee8b7c46
CI / build (push) Successful in 10m25s
Release / apk (push) Successful in 4m14s
Build the Android client with UnifiedPush notifications
The mail client from android-client-spec.md on AGP 9.4 / Kotlin 2.4 /
compileSdk 37: sign-in and first-run (account, then notifications),
adaptive list-detail with a modal or permanent drawer, swipe to archive
or delete, a locked-down WebView for HTML mail with remote images
blocked per message, reply/reply-all/compose with drafts and an outbox,
and Material You theming with the brand palette as fallback.

Mail is cached in Room and kept current by delta sync over
/api/events. UnifiedPush (connector only, no FCM) delivers the server's
content-free wake-ups; a WorkManager job syncs and raises one
MessagingStyle notification per thread with Archive and Mark read, and
drops notifications for threads read elsewhere. Settings shows push
state, picks a distributor and sends a test push.

The session token is encrypted with a Keystore key, backups are off,
release builds are HTTPS-only (trusting user-installed CAs). CI now
pins platform 37 / build-tools 36 and runs unit tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 21:03:11 +02:00

74 lines
2.8 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
# One runner serves all three repos, so a queue is a real cost: superseding
# pushes shouldn't each wait for a full build. Releases deliberately aren't
# covered — cancelling a publish halfway is worse than running it twice.
concurrency:
group: ${{ gitea.workflow }}-${{ gitea.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: rocky-10
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
# Installed explicitly rather than via android-actions/setup-android
# so the SDK package versions are pinned to match compileSdk 37 /
# build-tools 36.0.0, instead of whatever the action defaults to.
# Persists in $HOME on this self-hosted runner, so it's a one-time cost.
- name: Set up Android SDK
run: |
set -eu
SDK="$HOME/android-sdk"
if [ ! -d "$SDK/cmdline-tools/latest" ]; then
mkdir -p "$SDK/cmdline-tools"
curl -sSLo /tmp/cmdline-tools.zip \
https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
unzip -q /tmp/cmdline-tools.zip -d "$SDK/cmdline-tools"
mv "$SDK/cmdline-tools/cmdline-tools" "$SDK/cmdline-tools/latest"
rm -f /tmp/cmdline-tools.zip
fi
yes | "$SDK/cmdline-tools/latest/bin/sdkmanager" --licenses >/dev/null 2>&1 || true
"$SDK/cmdline-tools/latest/bin/sdkmanager" \
"platform-tools" "platforms;android-37.0" "build-tools;36.0.0" >/dev/null
echo "ANDROID_HOME=$SDK" >> "$GITHUB_ENV"
echo "ANDROID_SDK_ROOT=$SDK" >> "$GITHUB_ENV"
- name: Cache Gradle
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: gradle-${{ hashFiles('**/*.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: gradle-
- name: Build debug APK
run: ./gradlew assembleDebug --no-daemon
- name: Unit tests
run: ./gradlew testDebugUnitTest --no-daemon
# Hard constraint from android-client-spec.md §7: nothing Google-
# dependent, including transitive pulls. Cheap to assert here, and far
# easier than noticing a library dragged it in three months from now.
- name: Assert no Play Services or Firebase
run: |
if ./gradlew :app:dependencies --configuration releaseRuntimeClasspath --no-daemon \
| grep -iE 'play-services|firebase|com\.google\.android\.gms'; then
echo "::error::Play Services/Firebase found in the dependency tree"
exit 1
fi
echo "Dependency tree is clean."