Files
gui/.github/workflows/build.yml
T
Claude fe56f25743 Windows and macOS: SSH by libdmodemssh, built in
The Windows app runs libdmodemssh on a thread that posts its events to
the main window, with a login dialog that fits its questions; the
Windows 95 build keeps Windows' ssh.exe in a pseudo console.  The macOS
app's SSHConnection polls it on a thread for the main queue, with
SwiftUI alerts for a new host, a password or the server's questions;
PtySpawn goes.  libssh and mbedTLS are built universal for macOS by the
repository's CMake.  Linux CI logs in to a real sshd; docs follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSV65geuGd6zMt2V6r
2026-11-12 13:09:00 +00:00

106 lines
3.4 KiB
YAML

# Builds and tests the three apps and the library they share
name: Build
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
linux:
name: Linux (GTK 4)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Packages
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
cmake ninja-build pkg-config libgtk-4-dev libadwaita-1-dev \
libvte-2.91-gtk4-dev libpulse-dev libsndfile1-dev
- name: Build
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
- name: Test with the sanitizers
run: |
cmake -S . -B build-asan -G Ninja -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-sanitize-recover=all"
cmake --build build-asan --target dmodemctl_test
ctest --test-dir build-asan --output-on-failure -R dmodemctl
- name: SSH against a real sshd
run: |
sudo apt-get install -y --no-install-recommends openssh-server
sudo useradd -m dmtest
echo 'dmtest:Sesame-42' | sudo chpasswd
ssh-keygen -q -t ed25519 -N '' -f "$RUNNER_TEMP/key"
sudo install -d -m 700 -o dmtest ~dmtest/.ssh
sudo install -m 600 -o dmtest "$RUNNER_TEMP/key.pub" ~dmtest/.ssh/authorized_keys
sudo mkdir -p /run/sshd
sudo /usr/sbin/sshd -p 2222 -o ListenAddress=127.0.0.1 -o PasswordAuthentication=yes
DMODEM_SSH_TEST=127.0.0.1:2222:dmtest:Sesame-42 DMODEM_SSH_TEST_KEY="$RUNNER_TEMP/key" \
build/ssh/dmodemssh_test
windows-9x:
name: Windows 95 and later (Open Watcom)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: open-watcom/setup-watcom@v0
with:
version: "2.0"
- name: Build
run: sh windows/build-watcom.sh build/watcom
- uses: actions/upload-artifact@v4
with:
name: dmodem-windows-9x
path: build/watcom/dmodem.exe
windows:
name: Windows (MSVC)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -S . -B build -A Win32
cmake --build build --config Release
- name: Test
run: ctest --test-dir build -C Release --output-on-failure
- uses: actions/upload-artifact@v4
with:
name: dmodem-windows
path: build/windows/Release/dmodem.exe
macos:
name: macOS (SwiftUI)
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Library tests
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=13.0
cmake --build build
ctest --test-dir build --output-on-failure
- name: Project
run: |
brew install xcodegen
cd macos && xcodegen
- name: Build
run: |
cd macos
xcodebuild -project DModem.xcodeproj -scheme DModem \
-configuration Release -derivedDataPath ../build/xcode \
CODE_SIGN_IDENTITY=- build
- uses: actions/upload-artifact@v4
with:
name: dmodem-macos
path: build/xcode/Build/Products/Release/D-Modem.app