Files
LLeMbas-Android/.github/workflows/ci.yml
T
HomerandClaude Fable 5.2 f2a2acf996
CI / check (push) Canceled after 0s
Three APKs: the notification listener leaves the standard builds; releases drop x86_64
Google Play Protect blocked installing beta.7, most likely for the
notification listener (notification summaries).

- A second flavour dimension, `reading`: `standard` declares no listener and
  no permission of it; `notifications` is the full build plus the listener,
  with the same application id and key. Variants: fullStandard,
  fullNotifications, fdroidStandard (no F-Droid build with the listener).
  The listener class and its manifest entry live in src/notifications only.
- Settings in a standard build says where notification summaries went and
  why. The self-updater installs only its own kind: a notifications build
  takes latest.json's optional `notifications {url, sha256}` or nothing.
- Release builds carry arm64-v8a and armeabi-v7a only; debug keeps x86_64
  for the emulator. The engine's unused C and C++ API libraries are left out.
- scripts/check-apk.sh checks the built files (listener only where it may
  be, model stored, no x86 in a release); CI runs it on the three debug APKs
  and on an unsigned release build, release.yml on what it publishes.
- release.yml publishes llembas-android-<version>.apk, -notifications.apk
  and -fdroid.apk with SHA256SUMS.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 09:58:07 +00:00

116 lines
5.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: CI
on:
push:
branches: [main, dev]
pull_request:
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-24.04
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- name: Nothing private in the repository
run: scripts/hygiene.sh
- name: Generated files match their sources
run: |
python3 scripts/fetch-tokens.py # Tokens.kt matches tokens.lock.json
python3 scripts/fetch-contract.py # contract/ matches contract/lock.json
python3 scripts/gen-strings.py --check
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
# ktlint 1.8.0 from Maven Central: the same jar the signed GitHub release wraps in a
# shell header (checked byte for byte), from a host that does not 504 on release assets.
- name: ktlint (hash-pinned)
run: |
curl -sSfL --retry 5 --retry-all-errors -o ktlint.jar https://repo1.maven.org/maven2/com/pinterest/ktlint/ktlint-cli/1.8.0/ktlint-cli-1.8.0-all.jar
echo "369ad2b789f95a011f807e1fcb690ccef80bd7cd014fd139e73ae82dcc0baeab ktlint.jar" | sha256sum -c
java -jar ktlint.jar "app/src/**/*.kt" "*.kts" "app/*.kts"
# The wake-word engine and model for the full build, hash-pinned (never in the repository).
- name: Wake-word engine (hash-pinned)
run: python3 scripts/fetch-wakeword.py
# The wake phrases' token pieces are generated from the model's own tokenizer (bpe.model,
# fetched above); the committed table must be what it gives.
- name: Wake phrases match the model's tokenizer
run: |
python3 -m venv "$RUNNER_TEMP/wake"
"$RUNNER_TEMP/wake/bin/pip" install --quiet --require-hashes --only-binary :all: -r scripts/wake-requirements.txt
"$RUNNER_TEMP/wake/bin/python" scripts/gen-wake-phrases.py --check
- uses: gradle/actions/wrapper-validation@v4
- uses: gradle/actions/setup-gradle@v4
- name: Unit tests and the three builds
run: >
./gradlew --no-daemon testFullStandardDebugUnitTest
assembleFullStandardDebug assembleFullNotificationsDebug assembleFdroidStandardDebug
# The files themselves: only the notifications build declares a notification listener, the
# wake-word model is stored uncompressed, the F-Droid build has no engine.
- name: What the APKs declare
run: |
scripts/check-apk.sh app/build/outputs/apk/fullStandard/debug/app-full-standard-debug.apk standard
scripts/check-apk.sh app/build/outputs/apk/fullNotifications/debug/app-full-notifications-debug.apk notifications
scripts/check-apk.sh app/build/outputs/apk/fdroidStandard/debug/app-fdroid-standard-debug.apk fdroid
# A release as the release workflow builds it, unsigned: shrunk by R8, and without the
# emulator's x86_64 libraries. Found here rather than at a tag.
- name: The release build's shape
run: |
./gradlew --no-daemon assembleFullStandardRelease
scripts/check-apk.sh "$(ls app/build/outputs/apk/fullStandard/release/*.apk)" standard release
- name: Android lint (report only, for now)
run: ./gradlew --no-daemon lintFullStandardDebug
continue-on-error: true
# The test build a tester installs (Actions › this run › Artifacts): debug-signed with the
# repository's public test key, so each one installs over the last. The plain one is the
# one to use; `-notifications` is the same app with the notification listener (it installs
# over the plain one and back); `-fdroid` is the app without the updater and the wake word.
- name: Name the test builds
run: |
mkdir test-builds
short="${GITHUB_SHA::7}"
cp app/build/outputs/apk/fullStandard/debug/app-full-standard-debug.apk "test-builds/llembas-android-debug-$GITHUB_RUN_NUMBER-$short.apk"
cp app/build/outputs/apk/fullNotifications/debug/app-full-notifications-debug.apk "test-builds/llembas-android-debug-$GITHUB_RUN_NUMBER-$short-notifications.apk"
cp app/build/outputs/apk/fdroidStandard/debug/app-fdroid-standard-debug.apk "test-builds/llembas-android-debug-$GITHUB_RUN_NUMBER-$short-fdroid.apk"
(cd test-builds && sha256sum *.apk > SHA256SUMS)
- uses: actions/upload-artifact@v4
with:
name: llembas-android-debug-${{ github.run_number }}
path: test-builds/
if-no-files-found: error
# The screens as the screenshot tests rendered them (app/src/test/.../shots), light and
# dark, at a large and a small phone's size: the design is reviewed from these.
- uses: actions/upload-artifact@v4
if: always()
with:
name: llembas-android-screenshots-${{ github.run_number }}
path: app/build/screenshots/
if-no-files-found: warn
- uses: actions/upload-artifact@v4
if: always()
with:
name: reports
path: |
app/build/reports/
app/build/test-results/
if-no-files-found: ignore