Daily workflow¶
Every command below also exists in the TUI (ditx with no arguments), which shows the exact
command line before running it.
Develop¶
ditx sync # clone / fast-forward all domains (ditx.repos)
ditx build -d localization # incremental build in the dev container
ditx test -d localization # unit tests (colcon test)
ditx test --integration # all domains together: handshake + contract check
ditx lint --fix # format; CI runs `ditx lint` without --fix
ditx index # compile_commands.json for clangd (Ctrl+click works)
ditx shell # a shell in the dev container, everything sourced
- Builds run in
eurobot-devwith the workspace mounted at the same path. Paths in errors, test reports andcompile_commands.jsontherefore work on the host. -j auto(the default) pickscolcon workers × make -jfrom your RAM and caps the container at 80% of it. A big build can no longer OOM-kill your desktop session. The machine stays usable, and in the worst case only the build dies.- ccache is kept in the
eurobot-ccachedocker volume, so rebuilding afterditx cleanis fast.
Try it on a robot¶
ditx deploy -d localization -r white # build → overlay → restart → verify
ditx overlays -r white # who pushed what, from which commit
ditx logs -r white -d localization -f
ditx rollback -d localization -r white # back to the stable image
- What gets pushed is your build output only (
install/) plus a manifest. The robot never sees source and never compiles. - If the container does not come up healthy, deploy rolls back automatically
(
--no-rollbackkeeps it for debugging). - An overlay is gone after a reboot (back to the image CI built) unless you pass
--persist. Match day therefore always starts from something reproducible. -r simruns the same thing on your laptop: everything under.sim-robot/, no robot needed. It needs runtime images:ditx imagebuilds them locally with taglocal.
Merge and release¶
flowchart LR
feat("feat/#lt;topic#gt;") -- PR --> develop("<b>develop</b><br/><small>images :develop</small>")
develop -- "release PR" --> main("<b>main</b><br/><small>images :stable</small>")
main -- tag --> release("<b>vX.Y.Z</b><br/><small>images :vX.Y.Z</small>")
- Branch from
develop, commit with Conventional Commits (feat(localization): fuse lidar beacons). Thecommit-msghook checks it (pre-commit install --hook-type commit-msg). - Open a PR. CI runs lint → build → test, then starts the robot stack the way a robot runs it (runtime images, subnet discovery, a uid without a home) and checks it against the contract. Review starts only when it is green.
- Merging to
developmakes it the source of:developimages, which test robots build and run. - A release PR
develop → mainis what:stableis built from. Competition robots runtag = stable(or a pinnedvX.Y.Z) fromconfig/robots.ini. After the checks pass, CI publishes the images to GHCR (:develop,:stable,:vX.Y.Z, amd64 + arm64), soditx up -r white --pullupdates a robot. A version that is not published (a feature branch) is built on the robot instead (tutorial 14). A weekly job (ghcr-cleanup.yml) keepsdevelop,stable, everyvX.Y.Zand the 10 newestsha-*tags per image, and deletes the rest. - Pin the domain versions in
ditx.reposon the release commit. Shell tag + that file = the whole robot software, reproducible.
When you change an interface¶
base/ (msgs, srvs, contract.yaml) is shared by everyone:
- Edit it, then run
ditx build --base(a local base layer) andditx build(every domain on top). ditx test --integration.ditx contract mdregeneratesdocs/contract.md.- PR to the shell, reviewed by the code owners (
.github/CODEOWNERS). - After merge, domains rebuild against the new base, and robots rebuild their images (tutorial 14, step 3). Overlays built against the old base are refused with a clear message.