Behind the game

How Dune City is built and tested

Dune City is developed on one Mac mini, tested in GitHub Actions and on two on-demand AWS machines, and released from a pre-qualified, tagged commit. AI coding agents share a single staging checkout and a single build. A home-grown scheduler, dunecity-queue, fans test games and test suites out to the AWS workers and switches them off when the work is done.

As of 22 November 2026. The current stable release is 1.0.875, published 21 November 2026.

At a glance

The Mac mini is the hub; GitHub builds and AWS plays the test games The Mac mini holds a GitHub runner, the staging checkout, the coding agents and the queue scheduler. It exchanges signing jobs with GitHub and pushes batches to it. The scheduler sends jobs to two AWS workers and gets results back. GitHub sends green builds to staging and tagged builds to the stable release channels: desktop, browser and mobile. The Mac mini is the hub; GitHub builds and AWS plays the test games Mac mini: development hub GitHub: source and CI AWS workers, started on demand Release channels signing jobs push a batch jobs out, results back green build to staging, tag to stable GitHub runnersigns Mac and iOSbuilds; qualification Staging checkoutone branch, one buildCMake, Ninja, ccache Coding agentsedit the checkout,submit test jobs Queue schedulerdunecity-queue: oneunit per game or test Actions CILinux, Windows,macOS and browser Qualificationnightly suite, onceper frozen commit awsSydney, 32 vCPU32 game slots aws-mel2Melbourne, 64 vCPU96 game slots Stagingdev pre-releases,/play-staging DesktopGitHub Releases,SourceForge mirror Browserdunelegacy.com/play,WebAssembly build MobileTestFlight, Android;separate approvals
Agents edit one checkout on the Mini. Pushes go to GitHub for builds, test games go to AWS, and only a qualified, tagged commit reaches the stable channels.

Infrastructure

The Mac mini is the hub: it holds the source, runs the scheduler and signs releases. Everything else is rented or optional.

ComponentWhat it isWhat it does in the pipeline
Mac miniApple M4, 10 cores, 16 GB, always onDevelopment host. Holds the staging checkout and its build, runs the queue scheduler, and is the self-hosted GitHub Actions runner (dunecity-builder) for Mac signing and notarising, iOS builds and release qualification. Also runs the four tests that need a real window or calibrated timing.
GitHubPublic repo dunecity-project/dunecitySource of record, four Actions workflows, and GitHub Releases for staging and stable packages.
GitHub-hosted runnersUbuntu, Windows Server 2022, macOS 15Build and test each platform on every integration push: Linux, Windows, macOS and the browser (WebAssembly via Emscripten).
AWS worker awsc8g.8xlarge Graviton (32 vCPU), Ubuntu 24.04 arm64, Sydney, Spot32 game slots and the Linux reference build. Off unless a job needs it.
AWS worker aws-mel2c8g.16xlarge Graviton (64 vCPU), Melbourne, Spot96 game slots. Off unless a job needs it.
CloudWatch alarmsOne per AWS workerBackstop: stop a worker whose CPU stays under 1% for 15 minutes, in case the scheduler is down.
Guest workersA MacBook Pro, a MacBook Air and a Windows PCOptional extra capacity, never required. AWS carries the load.
Website serverOne Apache host serving dunelegacy.comHosts this website, the browser build (/play and /play-staging) and the multiplayer signalling and relay services.
SourceForgeFiles mirrorSecond download location, synced automatically after a stable release.
SecretsA password manager and GitHub Actions secretsHold SSH keys, cloud tokens and signing credentials. Nothing secret lives in the repo.

Development workflow

All work lands in one checkout and one build, so every agent tests the same binary.

  1. Edit. Coding agents (Claude Code, Codex and OMP) work in the staging checkout on branch integrate/feature-batch. Each claims the files it will touch, so two agents never edit the same file.
  2. Build. There is one build tree: CMake and Ninja, C++17, libraries from Homebrew, compiler output cached by ccache. A shared lock allows only one build, local test run or Git change at a time.
  3. Switch. Any change to AI or game behaviour goes behind an on/off config switch. Tests then compare OFF and ON in the same binary instead of building one tree per idea.
  4. Commit and test. Tests run against a committed, full SHA, never the working tree. Headless tests go to the AWS queue; only the Mini-only tests run locally.
  5. Integrate. One integrator combines accepted changes and pushes the batch to GitHub, which starts CI.

The stack is a C++17 and SDL2 game engine, Python for test harnesses and packaging, Emscripten for the browser build, and Node and PHP for the multiplayer services. CI builds get their libraries from vcpkg rather than Homebrew.

Test frameworks and gates

CTest is the single registry: 242 tests, each labelled by what it needs (headless or gui) and by tier. 238 are headless and run on Linux; 4 need a real Mac window and stay on the Mini.

LayerFramework or toolWhat it checksWhere it runs
Unit testsCatch2 v3, one binary (dunelegacy_tests), about 100 suitesGame rules, AI policies, network protocol, save compatibilityAWS, hosted Linux CI, any dev machine
Headless game probesPython drivers plus small C++ probes compiled against the real engine, run on SDL's dummy video driverMenus, skirmish, save and load, unit behaviour, pathfinding, multiplayer commandsAWS, through dunecity-queue ctest
AI regression gatesPython harnesses that play full AI-versus-AI games on fixed seeds (run-all-against-atreides.py, scenario-matrix.py, run-ffa-army-deploys.py)The AI must still win, or deploy its army, inside fixed game-time limits. Mandatory for every AI or unit change.AWS
AI research matchesformation-duel.py, vanilla-match.py and scenario-matrix.py, scored by match_score.pyWhether a candidate (switch ON) beats the control (switch OFF). It becomes the default only if the 95% interval of the paired score difference is above zero.AWS, through dunecity-queue submit, one game per slot
Performanceperf_regressionSimulation CPU per game cycle and AI update time, against budgets calibrated on the MiniMini only
Native GUI and inputPointer-mapping and mouse-control probes, GPU renderer testsReal window, real mouse events, accelerated rendererMini only
Multiplayer servicesnpm test for the room relay, Python unittest driving the real PHP signalling service, Node scripts comparing native and browser message framingRelay, signalling and native-to-browser protocol agreementHosted Linux CI; two PHP network probes also run on AWS
Release toolingPython unittest under scripts/testsUpdate feeds, packaging, release automation, qualification routingHosted Linux CI

Three tiers decide how much runs. integration (56 tests) is the quick gate on every change. nightly (all 242) is the broad regression run and collects every result rather than stopping at the first failure. release-smoke checks the actual packaged app before a release.

AWS test queue

AWS workers run only while a job needs them On the Mac mini the scheduler takes a submitted job pinned to a commit, freezes the source and splits it into one unit per game or test. It sends the source and a start call to the AWS workers, which start, build once and play the units. Results flow back to the scheduler, which collects and reports them. When idle, the workers stop two minutes after the last unit finishes. AWS workers run only while a job needs them Mac mini: dunecity-queue scheduler AWS workers Backstops: queued work with nothing running for 10 minutes stops the worker; a CloudWatch alarm stops any worker under 1% CPU for 15 minutes. source and start call results when idle Submit jobpinned to a fullcommit SHA Freeze and splitone unit per gameor per test Collect, reportresults merged aseach unit finishes Workers startfirst game about2 minutes later Build and playbuild once per SHA,then run the units Workers stop2 minutes after thelast unit finishes
A job is accepted against a committed SHA, split into one unit per game or test, and played on workers that start for it and stop two minutes after the last unit.

Accepted is not passed: the result comes from dunecity-queue report JOB --follow.

Two commands cover most use. dunecity-queue ctest --rev SHA --machines aws aws-mel2 -L integration runs registered tests, and dunecity-queue submit --rev SHA -- python3 tests/ai/vanilla-match.py ... plays a batch of AI games.

Release path

A release is a commit that has already passed qualification, tagged and then published channel by channel.

  1. CI. Every push to integrate/feature-batch runs the Build Dune Legacy workflow: tests on Linux, plus Windows, macOS, Linux and browser builds.
  2. Staging packages. A green batch becomes an immutable staging pre-release on GitHub (two-hour debounce, daily safety net). Staging builds carry a dev version label, never become Latest, and their browser copy goes to /play-staging, separate from the stable /play.
  3. Qualification. Green CI also triggers Qualify release candidate: the broad nightly headless suite, once per frozen commit, on the Mini with a GitHub-hosted Mac as fallback. On the Mini it sends its test games to AWS.
  4. Tag. Pushing vX.Y.Z builds the official packages. The Mini signs and notarises the Mac build and signs the update feeds.
  5. Publish. The release job publishes to GitHub; SourceForge and the browser build follow automatically. A channel counts as done only after its live destination is checked.
ChannelHow it is produced
Windows, macOS, LinuxTag build on GitHub Releases: Windows EXE and ZIP, macOS DMG and ZIP, Linux AppImage, DEB, RPM and tar.gz
SourceForgeSync SourceForge release workflow, automatic after the stable build
BrowserPublish browser build workflow commits to the website repo, which then deploys to the web server
WebsiteLinks and changelog updated by the release job; the "New in" text is written by hand
iPhone and iPadscripts/build-ios.sh --testflight on the Mini, then TestFlight review
AndroidSeparate version line; needs the existing upgrade signing key, a phone test and explicit approval to publish

Where things live

WhatWhere
Game source and CIdunecity-project/dunecity; workflows in .github/workflows/ (build.yml, qualify-release.yml, web.yml, sourceforge.yml)
Integration branchintegrate/feature-batch; stable releases are tagged vX.Y.Z
Test registration and labelstests/CMakeLists.txt; AI harnesses in tests/ai/
Release runbookdocs/release-operations.md
Which test runs where, and whydocs/ai-scenario-matrix.md, section "Where the gates run"
Mac signing runnerdocs/macos-release-runner.md
Queue scheduler and workspace rulesOn the Mac mini, outside the game repo