Skip to content

feat(theme): make the dark theme true-black; remove the separate OLED… #548

feat(theme): make the dark theme true-black; remove the separate OLED…

feat(theme): make the dark theme true-black; remove the separate OLED… #548

Workflow file for this run

name: Android CI
# Builds debug APK + runs unit tests on every push and pull request to
# master. The APK is uploaded as a workflow artifact so you can sideload
# it without tagging a release.
#
# Also runs the cross-validation harness: our Kotlin RoundtripGenerator
# emits a JSON document containing fresh identities, an announce, an
# encrypted LXMF, an LRPROOF, and a full link handshake — produced by
# our actual protocol modules. tools/validate_vectors.py then verifies
# every artifact under upstream Python RNS. If our code regresses
# against RNS this job goes red.
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Set up JDK 17
uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5
with:
distribution: temurin
java-version: '17'
# Gradle 8.7 pin: the GHA Linux image (and macos-14) now ships
# Gradle 9.4.1 by default, which removed
# `DefaultArtifactPublicationSet`. The Android Gradle Plugin and
# the KMP iOS-target setup both still reference that class; the
# bootstrap step crashes before it can install our own wrapper.
- name: Set up Gradle 8.7
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4
with:
gradle-version: '8.7'
- name: Bootstrap Gradle wrapper if missing
run: |
if [ ! -f ./gradlew ]; then
gradle wrapper --gradle-version 8.7 --distribution-type bin
chmod +x ./gradlew
fi
- name: Run shared module tests
run: ./gradlew :shared:testDebugUnitTest
- name: Run androidApp unit tests
run: ./gradlew :androidApp:testDebugUnitTest
- name: Assemble debug APK
run: ./gradlew :androidApp:assembleDebug
- name: Upload debug APK
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: reticulum-mobile-debug
path: androidApp/build/outputs/apk/debug/*.apk
if-no-files-found: error
retention-days: 30
- name: Upload test reports on failure
if: failure()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: test-reports
path: |
shared/build/reports/tests/
androidApp/build/reports/tests/
if-no-files-found: ignore
validate-against-rns:
# Runs in parallel with `build` — neither needs the other's
# outputs (this job generates its own vectors via the same Gradle
# toolchain) and the validate path is much shorter, so dropping
# the gate lets us see protocol regressions ~10 minutes earlier
# than waiting for the full APK assembly.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Set up JDK 17
uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5
with:
distribution: temurin
java-version: '17'
- name: Set up Gradle 8.7
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4
with:
gradle-version: '8.7'
- name: Bootstrap Gradle wrapper if missing
run: |
if [ ! -f ./gradlew ]; then
gradle wrapper --gradle-version 8.7 --distribution-type bin
chmod +x ./gradlew
fi
- name: Set up Python 3.11
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: '3.11'
- name: Install upstream RNS reference
run: |
python -m pip install --upgrade pip
pip install rns msgpack
- name: Generate fresh test vectors via RoundtripGenerator
# `--rerun` forces the test to actually execute. Without it,
# Gradle's test-result cache hits on a clean shared/ module
# and the side-effect file (shared/build/roundtrip-vectors.json)
# is never written — so the next step fails on `test -f`.
# Caught when an unrelated shared/build.gradle.kts change
# (linker fix in dfeef0e) didn't invalidate the cached test.
run: |
./gradlew :shared:testDebugUnitTest --tests "io.github.thatsfguy.reticulum.RoundtripGenerator.generateVectors" --rerun
test -f shared/build/roundtrip-vectors.json && \
echo "vectors written:" && head -c 200 shared/build/roundtrip-vectors.json
- name: Validate vectors against Python RNS
run: python tools/validate_vectors.py shared/build/roundtrip-vectors.json
- name: Upload generated vectors on failure
if: failure()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: roundtrip-vectors
path: shared/build/roundtrip-vectors.json
if-no-files-found: ignore