Files
app/.github/workflows/apple.yml
T
Claude 133d5acb61 iOS app: SwiftUI on DModemKit and the shared terminal
ios/DModem (XcodeGen's project.yml, iOS 16): Home (the modem's state, the
rates and what the CONNECT was, the call's time, start, hang up, stop, an
AT command line and its last words), the terminal (the shared Kotlin
emulator through TerminalBridge, drawn run by run in a Canvas; CP437 and
the VGA colours; the keyboard and a hardware one's arrows and Esc; Esc,
a sticky Ctrl, Tab and the arrows on a bar; pinch for the font), the log
(shared as text) and the settings (the SIP account or user:password@host,
incoming calls, T.38, the speaker, the AT commands at start, the log
levels). The modem's speaker on AVAudioEngine; the audio session (its
sound, or quiet) keeps a call going in the background. The DNS servers
from the resolver's state (SystemDNS.c: iOS has no resolv.conf for the
engine).

shared: TerminalBridge, the terminal for Swift (octets as Latin-1 strings
both ways, rows as runs, keys, replies, the title, the look and the
character set), tested on the JVM and natively; the framework also as an
XCFramework (assembleDModemSharedXCFramework).

CI: the macOS job builds the shared XCFramework, runs DModemKit's tests
and builds the app for the simulator; the Linux job runs DModemKit's
tests on the host engine. Not built here: no Xcode on Linux (DModemKit,
TerminalBridge and SystemDNS.c are).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 02:15:16 +00:00

70 lines
2.2 KiB
YAML

# The modem for Apple's systems, and the Kotlin the apps share on iOS: the engine with D-Modem-RE, libre and
# Mbed TLS built for iOS (devices and simulator) and macOS as an
# XCFramework (ios/build-native.sh), and its Swift tests run on macOS
# (ios/DModemSmoke): the modem through its C API, as the iOS app has it;
# DModemKit's tests, and the iOS app (ios/DModem) built for the simulator.
#
# D-Modem-RE is a private submodule: the DMODEM_RE_TOKEN secret (as
# android.yml's).
name: Apple
on:
push:
pull_request:
jobs:
engine:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.DMODEM_RE_TOKEN || github.token }}
- name: Ninja
run: brew install ninja
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- uses: gradle/actions/setup-gradle@v4
# the Kotlin the apps share (shared/): its common tests on an iOS
# simulator, its framework built
- name: Shared Kotlin on iOS
run: ./gradlew :shared:iosSimulatorArm64Test :shared:linkDebugFrameworkIosArm64
- name: Build the XCFramework
run: ios/build-native.sh
- name: Swift tests (macOS)
run: swift test --package-path ios/DModemSmoke
- name: DModemKit's tests (macOS)
run: swift test --package-path ios/DModemKit
# the iOS app: its project from ios/DModem/project.yml, built for the simulator
- name: The shared Kotlin as an XCFramework
run: ./gradlew :shared:assembleDModemSharedReleaseXCFramework
- name: The iOS app (simulator)
run: |
brew install xcodegen
cd ios/DModem && xcodegen generate
xcodebuild -project DModem.xcodeproj -scheme DModem \
-destination 'generic/platform=iOS Simulator' \
CODE_SIGNING_ALLOWED=NO build
- uses: actions/upload-artifact@v4
with:
name: DModemEngine.xcframework
path: build-apple/DModemEngine.xcframework
- uses: actions/upload-artifact@v4
if: failure()
with:
name: build-logs
path: build-apple/**/_deps/*.log