fix(store): exempt contacts with message history from MED-2 eviction #540
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@v5 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@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@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@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@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@v5 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Set up Gradle 8.7 | |
| uses: gradle/actions/setup-gradle@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@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@v5 | |
| with: | |
| name: roundtrip-vectors | |
| path: shared/build/roundtrip-vectors.json | |
| if-no-files-found: ignore |