LifeMate — Personal, Family & Learning Companion

docs/owner-guide-and-delivery-plan
chore/phase1-repository-cleanup deploy/stable-web-apk deployment-static design/mobile-accessibility-v2 design/mobile-navigation-review docs/child-education-access-decision docs/offline-data-rescue-options docs/owner-guide-and-delivery-plan docs/phase1-policy-options docs/public-review-live-2026-10-15 feat/aparat-learning-library feat/child-device-safety feat/child-identity-schema feat/flutter-mobile-navigation feat/learning-content-operations feat/local-signing-preflight feat/online-family-stage0 feat/personal-encrypted-recovery feat/private-planner-series-api feat/public-review-page feat/standalone-weekly-planner feat/weekly-planner-android final-feature-1/iran-family-school fix/auth-abuse-expiry-safety fix/auth-expiry-after-lock fix/backend-request-safety fix/lifeguide-bootstrap-naming-ci fix/lifeguide-pages-qa-base-preflight fix/lifeguide-qa-pages-env-deployment fix/local-task-persistence fix/managed-child-session-boundary fix/personal-jalali-dates fix/personal-notification-controls fix/personal-upgrade-delivery-guard fix/sms-approval-gates fix/study-duration-display infra/cloudflare-neon-migration infra/lifeguide-cloudflare-qa infra/lifeguide-github-pages-qa infra/lifeguide-supabase-qa main phase-1/foundation-completion phase-2/product-foundation-identity phase-3/planner-school-family-core phase-4/ai-learning-wellbeing phase-5/hardening-observability-release test/android-reminder-acceptance test/personal-notification-settings test/personal-recovery-acceptance test/role-entry-apk
yml 85 lines 4.12 KB
Raw
1 name: LifeGuide personal Android APK (device-only)
2 on:
3 pull_request:
4 paths:
5 - '.github/workflows/standalone-personal-apk.yml'
6 - 'apps/lifemate/lib/standalone/**'
7 - 'apps/lifemate/lib/standalone_main.dart'
8 - 'apps/lifemate/test/standalone*'
9 - 'apps/lifemate/tool/*standalone*'
10 - 'apps/lifemate/android/**'
11 - 'apps/lifemate/pubspec*'
12 workflow_dispatch:
13 permissions:
14 contents: read
15 concurrency:
16 group: lifeguide-personal-${{ github.ref }}
17 cancel-in-progress: true
18 jobs:
19 personal-apk:
20 runs-on: ubuntu-latest
21 timeout-minutes: 35
22 defaults:
23 run:
24 working-directory: apps/lifemate
25 env:
26 ORG_GRADLE_PROJECT_lifeguideDevicePlanner: 'true'
27 steps:
28 - uses: actions/checkout@v4
29 - uses: actions/setup-java@v4
30 with: {distribution: temurin, java-version: '17'}
31 - uses: subosito/flutter-action@v2
32 with: {flutter-version: '3.47.6', channel: stable, cache: true}
33 - run: flutter pub get
34 - name: Verify personal edition and test-tool safety
35 run: |
36 dart format --output=none --set-exit-if-changed lib/standalone lib/standalone_main.dart test/standalone* tool/standalone_acceptance_fixture.dart
37 flutter analyze
38 flutter test
39 python3 -m unittest discover -s tool -p '*standalone*test.py' -v
40 - name: Build actual user APK (no fixture and no INTERNET permission)
41 run: |
42 flutter build apk --debug --target=lib/standalone_main.dart --dart-define=LIFEGUIDE_STANDALONE=true --build-name=0.7.2-personal.1 --build-number=9
43 cp build/app/outputs/flutter-apk/app-debug.apk build/LifeGuide.apk
44 mkdir -p exports
45 python3 tool/check_standalone_apk.py build/LifeGuide.apk > exports/standalone-apk-manifest.json
46 SIGNER=$(find "$ANDROID_HOME/build-tools" -type f -name apksigner | sort -V | tail -1)
47 "$SIGNER" verify --verbose --print-certs build/LifeGuide.apk > exports/standalone-apk-signature.txt
48 sha256sum build/LifeGuide.apk > exports/standalone-apk-sha256.txt
49 - name: Build same-signature synthetic fixture (never distributed)
50 run: |
51 flutter build apk --debug --target=tool/standalone_acceptance_fixture.dart --dart-define=LIFEGUIDE_STANDALONE=true --dart-define=LG_STANDALONE_ACCEPTANCE=true --build-name=0.7.2-personal.1 --build-number=9
52 cp build/app/outputs/flutter-apk/app-debug.apk build/standalone-private-fixture.apk
53 python3 tool/check_standalone_apk.py build/standalone-private-fixture.apk
54 - name: Enable KVM for fresh synthetic emulator
55 run: |
56 test -c /dev/kvm
57 echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
58 sudo udevadm control --reload-rules
59 sudo udevadm trigger --name-match=kvm
60 - name: Launch real user APK; verify SQLite and actual OS alarms
61 uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d
62 with:
63 api-level: 35
64 target: google_apis
65 arch: x86_64
66 profile: pixel_6
67 emulator-port: 5554
68 avd-name: lifeguide-personal-synthetic
69 force-avd-creation: true
70 emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -wipe-data -noaudio -no-boot-anim -camera-back none
71 working-directory: apps/lifemate
72 script: python3 tool/test_standalone_android.py --serial emulator-5554 --user-apk build/LifeGuide.apk --fixture-apk build/standalone-private-fixture.apk --allow-synthetic-emulator-reset --output exports/standalone-android.json
73 - name: Deliver user APK only after acceptance passes
74 uses: actions/upload-artifact@v4
75 with:
76 name: LifeGuide-personal-Android-0.7.2-9
77 path: apps/lifemate/build/LifeGuide.apk
78 if-no-files-found: error
79 - name: Preserve sanitized verification output
80 if: always()
81 uses: actions/upload-artifact@v4
82 with:
83 name: LifeGuide-personal-verification
84 path: apps/lifemate/exports/standalone-*
85 if-no-files-found: warn