mirror of
https://github.com/D-Modem/app.git
synced 2026-11-28 17:38:05 -08:00
The terminal's VT/xterm emulator, its screen, Sixel, the character sets, the keys, the characters' widths and the themes move to shared/'s common Kotlin (the same package: the app's code as it was), their JVM-only calls in common Kotlin's ways (code points, ISO 8859-1, copyInto, Base64.Mime). The Android app has its JVM side; iOS its framework, DModemShared (iOS devices, simulator); Linux native runs the common tests too. TerminalEmulatorTest in common Kotlin (kotlin.test): on the JVM and native; XtermFeaturesTest on the JVM. CI: the shared tests on Linux (JVM, native) and on an iOS simulator (apple.yml). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
133 lines
4.1 KiB
YAML
133 lines
4.1 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: OpenSSH, PuTTY, mksh (the interop tests), gawk (proot's build)
|
|
run: sudo apt-get install -y -q openssh-client openssh-server putty-tools gawk mksh && sudo mkdir -p /run/sshd
|
|
- name: Build, unit tests, lint
|
|
run: ./gradlew assembleDebug assembleDebugAndroidTest testDebugUnitTest lintDebug :shared:jvmTest :shared:linuxX64Test
|
|
|
|
- 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
|
|
|
|
# (Apple's ways on Linux: the portable fallbacks the iOS build has)
|
|
- name: Engine test, Apple's fallbacks
|
|
run: |
|
|
cmake -S native-test -B build-fallback -G Ninja \
|
|
-DCMAKE_CXX_FLAGS=-DDMODEM_PORTABLE_FALLBACKS -DCMAKE_C_FLAGS=-DDMODEM_PORTABLE_FALLBACKS
|
|
cmake --build build-fallback
|
|
ctest --test-dir build-fallback --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: gawk (proot's build)
|
|
run: sudo apt-get install -y -q gawk
|
|
|
|
- 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
|