mirror of
https://github.com/D-Modem/app.git
synced 2026-11-28 17:38:05 -08:00
- Gradle 9.8.1, AGP 9.4.1 (its built-in Kotlin, 2.4.21), compileSdk 37, minSdk 26; the native library built by externalNativeBuild for arm64-v8a, armeabi-v7a, x86_64 and x86 (only dmodem_jni, NDK r29), 16 KB page aligned; R8 keeps NativeModem's natives and callbacks. - ModemService: a foreground service (specialUse) that runs the native modem with its DTE on DteHub, sends the init commands (ATX3), holds a wake lock and a low-latency Wi-Fi lock while on, takes the DNS servers from the active network, and starts the modem again when the default network changes (after the call in progress); a notification with the call's state and Stop. - DteHub: the modem's DTE shared by any number of listeners (console, terminal, bridges), kept across the modem's restarts. - ModemState: the run state, the call's status, the log and the console's text, for the UI and the notification. - Settings in DataStore: the SIP account (or user:password@host pasted), incoming calls, T.38, init commands, country, log levels; no backups (the password). - UI (Compose, Material 3): Modem (start/stop, status, an AT command line and the modem's output), Settings, Log. - Tests: DteHub and the settings (JVM, 5 pass); NativeModemTest (instrumented: the library loads, binds, answers AT, ATI3, ATX3, stops, and closing the DTE stops it), compiled here, run by CI on an emulator. - CI: the APK, unit tests and lint; native-test on the runner; the instrumented tests on an x86_64 emulator. The private submodule needs a DMODEM_RE_TOKEN secret. Lint: no issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
120 lines
3.4 KiB
YAML
120 lines
3.4 KiB
YAML
# build: the APK (all four ABIs), the unit tests and lint.
|
|
# native: the native engine on the runner against a dmodemd over loopback
|
|
# SIP (native-test).
|
|
# device: the instrumented tests on an emulator (x86_64): the native library
|
|
# loads, binds and answers AT commands.
|
|
#
|
|
# D-Modem-RE is a private submodule: the DMODEM_RE_TOKEN secret is a token
|
|
# that can read it (a fine-grained personal access token with Contents:
|
|
# read on Neo-Desktop/D-Modem-RE).
|
|
name: Android
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
env:
|
|
NDK_VERSION: "29.0.14206865"
|
|
CMAKE_VERSION: "3.31.6"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
token: ${{ secrets.DMODEM_RE_TOKEN || github.token }}
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: "21"
|
|
|
|
- uses: gradle/actions/setup-gradle@v4
|
|
|
|
- name: SDK packages
|
|
run: |
|
|
yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null
|
|
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
|
|
"ndk;$NDK_VERSION" "cmake;$CMAKE_VERSION" "platforms;android-37.0"
|
|
|
|
- name: Build, unit tests, lint
|
|
run: ./gradlew assembleDebug assembleDebugAndroidTest testDebugUnitTest lintDebug
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: app-debug
|
|
path: app/build/outputs/apk/debug/app-debug.apk
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: reports
|
|
path: |
|
|
app/build/reports
|
|
app/build/test-results
|
|
|
|
native:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
token: ${{ secrets.DMODEM_RE_TOKEN || github.token }}
|
|
|
|
- name: Packages
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends cmake ninja-build g++ libssl-dev
|
|
|
|
- name: Build
|
|
run: |
|
|
cmake -S native-test -B build-host -G Ninja
|
|
cmake --build build-host
|
|
|
|
- name: Engine test
|
|
run: ctest --test-dir build-host --output-on-failure
|
|
|
|
device:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
token: ${{ secrets.DMODEM_RE_TOKEN || github.token }}
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: "21"
|
|
|
|
- uses: gradle/actions/setup-gradle@v4
|
|
|
|
- name: KVM
|
|
run: |
|
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
|
sudo udevadm control --reload-rules
|
|
sudo udevadm trigger --name-match=kvm
|
|
|
|
- name: SDK packages
|
|
run: |
|
|
yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null
|
|
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
|
|
"ndk;$NDK_VERSION" "cmake;$CMAKE_VERSION" "platforms;android-37.0"
|
|
|
|
- name: Instrumented tests
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: 35
|
|
arch: x86_64
|
|
target: google_apis
|
|
disable-animations: true
|
|
script: ./gradlew connectedDebugAndroidTest
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: device-reports
|
|
path: app/build/reports/androidTests
|