CI / check (push) Canceled after 0s
- Engine: sherpa-onnx 2.0.1 keyword spotter (Apache-2.0) with the English zipformer-gigaspeech-3.3M KWS model (Apache-2.0, int8), fetched hash-pinned by scripts/fetch-wakeword.py into app/libs and src/full/assets (gitignored); CI and release run it. `full` flavour only (abiFilters arm64-v8a, armeabi-v7a, x86_64); `fdroid` has a stub engine and Settings says why. ProGuard keeps com.k2fsa.sherpa.onnx (JNI reads fields by name). - WakeWordService (foregroundServiceType microphone): persistent notification with Stop; audio only to the engine in memory; pauses while the sheet is up (AssistPresence), in battery saver, and with the screen off unless Settings says otherwise. On the word: the sheet opens listening through LembasAssistService.showSession when LLeMbas is the assistant, else the activity, else a "tap to ask" notification. - No microphone service at boot: WakeBootReceiver posts "tap to listen again"; MainActivity restarts a service the phone stopped. - Settings › Assistant › Wake word: switch (off), four built-in English phrases (BPE-tokenized with the model's bpe.model), screen-on only, battery-optimisation page; privacy and cost text. - The sheet's "no wake word" line now points at the setting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
89 lines
3.2 KiB
YAML
89 lines
3.2 KiB
YAML
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
|
||
|
||
- uses: gradle/actions/wrapper-validation@v4
|
||
|
||
- uses: gradle/actions/setup-gradle@v4
|
||
|
||
- name: Unit tests and both builds
|
||
run: ./gradlew --no-daemon testFullDebugUnitTest assembleFullDebug assembleFdroidDebug
|
||
|
||
- name: Android lint (report only, for now)
|
||
run: ./gradlew --no-daemon lintFullDebug
|
||
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. `full` is the one to
|
||
# use; `fdroid` is the same app without the updater.
|
||
- name: Name the test builds
|
||
run: |
|
||
mkdir test-builds
|
||
short="${GITHUB_SHA::7}"
|
||
cp app/build/outputs/apk/full/debug/app-full-debug.apk "test-builds/llembas-android-debug-$GITHUB_RUN_NUMBER-$short.apk"
|
||
cp app/build/outputs/apk/fdroid/debug/app-fdroid-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
|