Build and Deployment¶
This page documents the build toolchain, CI/CD workflows, and external dependencies for CyberHUD.
Go Version¶
CyberHUD requires Go 1.26 or later, as specified by the go 1.26.0 directive in go.mod.
Makefile Targets¶
The project Makefile provides the following targets:
| Target | Description |
|---|---|
build |
Compiles cyberhudd (daemon) and cyberhudctl (CLI) binaries for the host platform after running code generation |
build-pi |
Cross-compiles both binaries for Raspberry Pi (linux/arm64) after running code generation |
generate |
Runs code generation for fonts and icons (downloads Material Symbols assets if not cached, then runs go generate) |
test |
Runs go test ./... across all packages after code generation |
vet |
Runs go vet ./... across all packages after code generation |
install |
Builds then installs both binaries to $(DESTDIR)/usr/bin/ with mode 755 |
deb |
Builds an arm64 Debian package using dpkg-buildpackage and copies the .deb to dist/ |
clean |
Removes compiled binaries, generated font/icon source files, caches, and the dist/ directory |
run |
Builds then runs the daemon with sudo (supports DAEMON_FLAGS for extra arguments) |
run-headless |
Builds then runs the daemon with -nodisplay flag (no physical display output) |
CI/CD Workflows¶
Debian Packaging (.github/workflows/deb.yml)¶
Builds an arm64 .deb package and optionally publishes it as a GitHub release asset.
Triggers:
- Push to
mainbranch - Tag push matching
v* - Pull requests (all branches)
- Manual dispatch (with optional version override)
Architecture: arm64
Build steps:
- Check out repository
- Set up Go (version from
go.mod) - Derive package version from tag, manual input, or run number
- Install Debian packaging dependencies (
debhelper,dpkg-dev,fakeroot) - Run code generation (
make generate) - Run tests (
go test ./...) - Build arm64 Debian package (
make deb) - Upload
.debas artifact
Outputs:
- Artifact:
cyberhud-deb-arm64containing the.debfile - On tagged builds (
v*): the.debis uploaded to the corresponding GitHub Release with auto-generated release notes
MkDocs Site Deployment (.github/workflows/docs.yml)¶
Builds and deploys the MkDocs documentation site to GitHub Pages.
Triggers:
- Push to
mainbranch affectingghpages/,display/modes/,tools/docsnap/, or.github/workflows/docs.yml - Pull requests affecting the same paths
- Manual dispatch
Build steps:
- Check out repository
- Set up Go (version from
go.mod) - Set up Python 3.x and install MkDocs dependencies from
ghpages/requirements.txt - Run code generation (
make generate) - Generate mode PNG snapshots (
make snapshots) - Collect snapshots into docs directory (
make collect-snapshots) - Generate gallery page (
make generate-gallery) - Build site with
mkdocs build --strict - Upload pages artifact (push and manual dispatch only)
Deployment target: GitHub Pages (via actions/deploy-pages), deployed on push to main and manual dispatch; pull requests build only
Astro Website Deployment (.github/workflows/website.yml)¶
Builds the Astro marketing site (cyberhud.io) and runs Lighthouse CI.
Triggers:
- Push to
mainbranch affectingwebsite/ - Manual dispatch
Node.js version: 22.x
Build steps:
- Check out repository
- Set up Node.js 22.x with npm cache
- Install dependencies (
npm ciinwebsite/) - Build site (
npx astro buildinwebsite/) - Run Lighthouse CI (desktop and mobile configurations)
External Dependencies¶
Direct dependencies declared in go.mod:
| Module | Purpose |
|---|---|
periph.io/x/conn/v3 |
Hardware abstraction layer providing interfaces for SPI, I2C, and GPIO communication with display panels and peripherals |
periph.io/x/host/v3 |
Host platform initialization that detects and registers available hardware drivers for periph.io interfaces |
github.com/fogleman/gg |
2D graphics rendering library used to draw shapes, text, and composited frames for display modes |
github.com/go-zeromq/zmq4 |
ZeroMQ messaging library enabling the ZMQ display mode to receive and render external data streams |
github.com/mdlayher/wifi |
Wi-Fi station information retrieval for the WiFi display mode (signal strength, SSID, link speed) |
github.com/tarm/serial |
Serial port communication for the Serial display mode, reading data from UART-connected devices |
github.com/fsnotify/fsnotify |
File system event notifications used to watch configuration files for live-reload on changes |
pgregory.net/rapid |
Property-based testing framework used for randomized test generation in policy and protocol tests |
github.com/srwiley/oksvg |
SVG parsing library that loads Material Symbols icon SVGs for rendering on display surfaces |
github.com/srwiley/rasterx |
SVG rasterization engine that renders parsed SVG paths into pixel bitmaps for display output |
golang.org/x/image |
Extended image format support and font rendering used by the graphics pipeline |