.github/ — CI, Workflows, and Repo Metadata
See
AGENTS.mdfor the canonical agent guide (build/test/lint commands, coding conventions). This doc covers CI layout and conventions. Composite actions are indexed inactions/README.mdand CI Python helpers intools/ci/README.md.
Contents
- Layout
- Workflows
- Actions and Scripts
- Build Configuration
- Dependency Management
- Runners
- Change Detection and Release Gating
- Caching
- Builds and Tests
- Publishing and Reporting
- Lint, Docs, and Security Checks
- Tests
Layout
.github/
├── workflows/ # Platform builds, reusable workflows, and repo automation
├── actions/ # Composite actions and external-action policy (see actions/README.md)
├── runner-images/ # Packer definitions and managed-runner provisioning
├── runs-on.yml # Repository-level RunsOn images and runner pools
├── build-config.json # Centralized version numbers and build settings
├── build-config.schema.json # JSON Schema for build-config.json
├── dependabot.yml # Dependabot config (workflow actions only)
├── renovate.json # Renovate config (code, tooling, and dev-environment dependencies)
└── zizmor.yml # Workflow security-lint policy
Workflows
| Workflow | Purpose |
|---|---|
linux.yml, macos.yml, windows.yml |
Desktop builds, tests, and packages (linux.yml also builds the custom-example plugin) |
android.yml, ios.yml |
Mobile builds, emulator/simulator smoke tests, and store uploads |
docker.yml |
Builder images and containerized Linux/Android builds |
vm-builds.yml |
Builds inside the Multipass and Vagrant developer VMs |
flatpak.yml |
Manual Flatpak build |
_detect-changes.yml |
Reusable: decide whether a platform builds (should_build) and plan Android's and Docker's build legs (matrix) |
build-results.yml |
PR build-results comment, compared with the PR base's own builds (workflow_run trigger) |
release.yml |
Draft a GitHub Release with git-cliff notes for a pushed vX.Y.Z tag (assets are uploaded by hand) |
analysis.yml |
Code Analysis: clang-tidy and Clazy; manual IWYU, qmllint, and ThreadSanitizer |
codeql.yml |
CodeQL for Actions, Java/Kotlin, and Python |
clusterfuzzlite.yml |
MAVLink parser fuzzing on PRs |
pre-commit.yml |
pre-commit hooks (run by prek) on changed files, including docs prose and translation placeholders |
ci-scripts.yml |
Runs the CI Python tests on Linux and Windows (see Tests); lint and config validation run in pre-commit.yml |
check-links.yml |
Markdown link validation (lychee) |
pr-checks.yml |
PR title validation and size/file labels |
dependency-review.yml |
Dependency security review |
scorecard.yml |
OpenSSF Scorecard |
docs.yml, doxygen.yml |
User/developer guide and Doxygen API docs build and deployment (Doxygen runs weekly; pull requests only when its configuration changes; master runs keep their HTML artifact eight days for pages.yml) |
pages.yml |
The GitHub Pages site: CI health dashboard of master builds, JSON schemas, master downloads, and the API docs |
crowdin.yml, lupdate.yml |
Crowdin sync and weekly source-string extraction |
px4-metadata.yml |
Daily PX4 airframe and parameter metadata update PR |
build-gstreamer.yml, mirror-gstreamer.yml |
Build GStreamer SDKs; mirror upstream GStreamer releases to the QGC S3 bucket |
build-profile.yml |
Manual CMake build profiling |
runner-images.yml |
Build, smoke-test, and promote QGC's managed RunsOn AMI (manual and weekly) |
cache-cleanup.yml |
GitHub Actions cache cleanup (scheduled, on PR close, and manual) |
stale.yml |
Stale-issue labeling and closing |
welcome.yml |
New contributor welcome |
copilot-setup-steps.yml |
Copilot cloud agent environment: Qt, system and Python dependencies, restored caches, and just configure (Copilot uses it only from the default branch; run it by hand to check the setup). Sessions (event dynamic) restore only the default branch's GitHub caches and cannot save, so they skip every save; daily and input-changing master runs save the apt download and Qt caches they restore, which master's RunsOn builds keep in S3 instead (sessions download CMake and Ninja). In sessions each slow step times out within Copilot's roughly 20-minute setup budget, so a stall fails that step and Copilot starts without the remaining steps rather than cancelling the session |
Actions and Scripts
- Composite actions: one-line index, external-action reference policy, and behavior notes in
actions/README.md. Platform jobs typically chainbuild-setup,install-dependencies,cmake-configure,cmake-build, tests, packaging,verify-executable, andattest-and-upload. - Python helpers live in the
tools/ci/package, grouped by concern (planning,cache,compile,publish,reporting, ...); workflows run them by path. Index, bootstrap rules, and the one-test-per-script rule (tests intools/tests/ci/; workflow and action contracts intools/tests/ci/contracts/) are intools/ci/README.md. Reusable code lives intools/common/. - Scripts reach the GitHub API through the
ghCLI viacommon.gh_actions(gh()calls without an explicittimeoutstop after 120 s; artifact downloads set their own) and write step outputs withcommon.gh_actions.write_github_output(). Third-party dependencies come from thescriptsgroup intools/pyproject.toml. Job summaries share one layout (see Job summaries). - Scripts that can run before
setup-pythonuse only the standard library and stdlib-onlytools/common,tools/qgc_tools, and sharedtools/cilibrary modules such asreporting/workflow_runs.py. Jobs withoutsetup-pythonrunrun_multipass.py,run_vagrant.py,read_config.py,update_px4_metadata.py, andtools/ci'sgh_cache_cleanup.py,mirror_gstreamer.py,analysis_matrix.py,plan_platform.py,deploy_docs.py,collect_build_status.py,download_artifacts.py,gh_pr_size_label.py,report_context.py,apt_install_retry.py,enable_kvm.py,install_multipass.py, andrunner_image.py. Steps ahead of a later or conditionalsetup-pythonalso runrelease_branch_check.py(release tag check),gstreamer/ci_plan.py(Build GStreamer's plan),gstreamer_archive.pyandbuild_gstreamer.py(Android/iOS GStreamer builds),install_dependencies_helper.pyandtools/setup/install_dependencies(install-dependencies),build-setup'sbuild_setup.pyplanner,setup-python's owncache_backend.pyprobe, plus theinstall_python.pyandinstall_uv.pyinstallers.tools/tests/test_stdlib_only.pyimports each underpython -I -S, and every module of the packages inSTDLIB_ONLY_PACKAGES, and fails when a job withoutsetup-pythonruns an unlisted script. - CI, Docker, VM, sysroot, and packaging glue uses Python entrypoints; shell remains only for installing Python itself and loading container login profiles.
- In GitHub Actions, an uncaught exception in a CI Python entrypoint becomes an error annotation
(
tools/_bootstrap.py); for a failed command it names the command and quotes the last ten lines of its captured stderr (else stdout), with URL credentials andAuthorizationvalues hidden, and stdout escapes characters that the Windows code page cannot encode.common.proc.run_with_retrylogs the same before raising its final failure. SetRUNNER_DEBUG=1(re-run with debug logging) orQGC_CI_DEBUG=1to add the fault handler, line-buffered output, and annotations for unraisable exceptions. - Routine timings ("Configure completed in 12s", "Tests completed in 71s") are plain log lines, not notices: the job summary already reports them, and annotations are kept for problems.
Build Configuration
build-config.jsoncentralizes versions and settings (Qt, Android, Apple/Xcode, CMake minimum and platform workflow list, GStreamer, analysis toolchain pins, and intoolsthe ccache, mold, sccache, Grype, Packer, RunsOn CLI, and ClangBuildAnalyzer releases with their SHA-256 digests and the Bloaty commit thattools/ciscripts andbuild_profile.pyinstall), validated againstbuild-config.schema.json(just validate-configs).- CMake and Ninja: every CI build job runs the
build.cmake_versionandbuild.ninja_versionthatbuild-setupinstalls withlukka/get-cmake, aftersetup-pythonso they precede any CMake intools/.venv;install-dependenciesinstalls neither, nor the distro ccache and mold (CI_PROVIDED_TOOLSininstall_dependencies_helper.py;cacheinstalls pinned ccache and mold). Local development uses thebuildgroup's CMake, Ninja and just (install_dependenciessyncs it on Linux). get-cmake resolves versions from the catalog bundled in its release, so the CMake pin cannot exceed the action's tag. - Read values with
tools/setup/read_config.py --get <dotted.path>,common.build_config.get_build_config_value(), or, as step outputs,read_config.py --github-output <dotted.path>...(dots become underscores).build-setup's planner outputs the versions its steps need, andqt-installreads the Qt version itself, so its callers pass none. - Qt installer:
qt-installrunsinstall_qt.py, which installs Qt with QGC's installer (tools/setup/qt_installer, standard library pluscmake -E tar); aqtinstall stays as the fallback throughQGC_QT_INSTALLER. Every job reachingqt-installhas CMake:build-setupinstalls it first,pre-commit.ymlsyncs thedevgroup, andlupdate.ymluses the GitHub-hosted image's (tools/README.md).
Dependency Management
Dependency updates are split between two bots to avoid overlapping PRs:
- Dependabot (
.github/dependabot.yml) owns action references in.github/workflows, grouped weekly. Merge with@dependabot merge. - Renovate (
.github/renovate.json) ownsnpm, Python (pep621/uv), pre-commit, devcontainer, Dockerfile, Node (docs/.nvmrc), Android Gradle, and composite-action dependencies, including Docker variant base images, the uvrequired-versionfloor, and the CI CMake (following get-cmake's tags) and Ninja pins inbuild-config.jsonvia regex managers. Workflow paths are excluded so the bots do not open overlapping action updates. Updates arrive as weekly grouped PRs; major updates wait for approval on the Dependency Dashboard issue.androidx.coreis not updated because newer releases require a compileSdk newer than Qt supports. A new release of abuild-config.jsontoolspin also waits for approval there and then opens its own PR, which must add the release's SHA-256 digests before its checksum checks pass.
Runners
RunsOn runners
- Upstream jobs (
github.repository_owner == 'mavlink', which includes PRs from forks) run on RunsOn pools defined in.github/runs-on.yml; workflows in independent forks fall back to GitHub-hosted runners and GitHub's cache. macOS, iOS, Windows arm64, and Android's macOS leg always use GitHub-hosted runners. - Every RunsOn job requests one label,
runs-on=<run_id>-<job id>-<run_attempt>-<matrix entry>/runner=<pool>. GitHub hands a runner to any queued job with an identical label, so shared labels let matrix siblings steal each other's runners. The job id is written literally (github.jobis empty outside steps) and the matrix entry isstrategy.job-index, which matrix values cannot read, so every label is built in the job'sruns-on;linux.ymlmatrix entries supply only the pool and GitHub-hosted fallback. - Pools list exact instance types in on-demand priority order, and every event, pull requests included, uses on-demand capacity: a reclaimed Spot instance discards a whole build (three Windows PR builds were lost at once on 2026-10-23). The event type never changes a job's label.
- RunsOn reads
runs-on.ymlonly from the default branch, so an unknownrunner=fails to launch and labels repeat settings that must apply before aruns-on.ymlchange merges (for example the Windows builder's 130 GB volume). Theruns-on-linthook runsroc linton the config when it changes, andtest_runs_on_config.pykeeps labels and pools in sync. runs-on/actionenables Magic Cache and the cost summary (plus sccache's S3 settings inlinux.ymlRelease legs when the repository variableQGC_COMPILER_CACHEissccache; see the sccache pilot), and skips itself off RunsOn, so jobs call it without a condition; RunsOn's built-in resource charts appear in each job's "Complete runner" step, so paid CloudWatch metrics stay off. The Harden-Runner community tier audits GitHub-hosted runners only, so jobs that can run on RunsOn skip it there.- apt mirror:
apt_install_retry.py --updatepoints the Ubuntu archive (archive.ubuntu.com, orports.ubuntu.comon arm64) at the region's EC2 mirror (${RUNS_ON_AWS_REGION}.ec2.archive.ubuntu.comor.ec2.ports.ubuntu.com), because the public archive sometimes served RunsOn jobs at about 200 kB/s or stalledapt-get updatefor minutes. Security entries stay on their original host, as on Canonical's EC2 images, and apt still verifies the signed release files over plain HTTP. A mirror that doesn't resolve is not used; if the mirror's first update fails, the original sources are restored and the normal retries run. Off RunsOn it does nothing; laterapt-getcalls in the job, the Multipass installer, and the Vagrant step reuse it.--updatewithout packages only refreshes, and the apt download cache key does not depend on the mirror.
Managed runner images
runner-images.yml(manual, plus a weekly schedule onceRUNS_ON_AMI_SUBNET_IDis set) builds a QGC Ubuntu 24 x64 AMI from the RunsOn base image, smoke-tests the candidate by AMI ID, and promotes it only from the default branch. It uses the same dependency and Qt setup helpers as CI, andqt-installreuses the preinstalled SDK only when its Qt version, architecture, and module manifest satisfy the job's request. Thepacker-validatehook validates the Packer template on pull requests that change it, without AWS credentials.- The managed image (
RUNS_ON_LINUX_BUILDER) and the organization-level Windows warm pool (RUNS_ON_WINDOWS_POOL) are opt-in repository variables; unset, workflows keep the standard RunsOn runners. See runner-images/README.md for AWS prerequisites, activation, rebuild cadence, retention, and the warm-pool example. - The Windows builder uses
windows25-full-x64, which ships the MSVC toolchain (windows22-full-x64does not). The dependency installer skips Visual Studio Build Tools when an existing instance already provides every required component. The image takes about 75 GB, so the builder's volume is 130 GB, about 55 GiB free for the build (100 GB, 24.6 GiB free, ran out).
Build timelines and runner debugging
- Linux (including its custom-plugin job), Windows, macOS, Android, iOS, and Docker jobs register
Kesin11/actions-timelinebefore checkout, adding runner queueing and step timing to the job summary. Each timeline is a snapshot at that job's completion; matrix siblings may still be running, and nested composite steps stay collapsed. - To inspect a failed runner, manually dispatch one of those workflows on a branch with
debug_runnerenabled. Each failed matrix job opens its own actor-onlymxschmitt/action-tmatesession after its normal reporting steps; connect with the SSH command in the step log and a key registered to the dispatching account, and runtouch continuein the checkout to finish. Setup and session share a 15-minute step timeout, bounded by the remaining job timeout. - Successful builds, PRs, tag runs, and cancelled jobs never open a session. A checkout failure can prevent the local action from loading; post-job cleanup failures and exhausted job timeouts cannot be inspected. Windows installs MSYS2 and tmate only when a session opens.
Change Detection and Release Gating
Change detection
- Platform workflows (Linux, macOS, Windows, iOS, Android, Docker) call
_detect-changes.yml(jobchanges / Detect Changes): one sparse checkout and oneplan_platform.py --platform <name>call that runsdetect_changes.detect_builds()once and outputsshould_buildandmatrix. For Android (android_matrix.py) and Docker (plan_docker_builds.py),matrixis the JSON include-list of build legs andshould_buildis whether it has any; other platforms get[]and define their own matrices. - Pull requests build a platform only when its inputs changed (patterns in
detect_changes.py); pushes, merge queues, and dispatches build everything; tags follow Release tags. - PR files come from
common.git.pr_diff_refs, like the lint checks: the detection checkouts fetch depth 2 and compare GitHub's merge commit with its first parent, so a PR that is behind its base branch does not build for the base branch's newer changes. Files are listed withgit diff --no-renames: a moved file counts at both paths, so moving it out of a watched directory such assrc/still triggers the builds that used it. If the diff can't be computed, builds run anyway. - Docker PRs build Ubuntu 24.04 plus Android when affected (PRs touching only
android/ordeploy/android/run Docker Android). Toolchain, dependency, and packaging changes, unknown diffs, pushes, and dispatches build every variant. The full-matrix list inplan_docker_builds.pynames Docker actions, scripts, dependency installers, and build inputs explicitly; unrelated GitHub metadata, analyzer scripts, tool tests, and VM provisioners do not expand the matrix.
Required checks
- Linux, Windows, MacOS, Android, and iOS end with an
if: always()gate job named after the workflow (re-actors/alls-green) that fails if change detection or any build leg fails or is cancelled; builds may be skipped only by change detection. Branch protection should require these five names, not build jobs: a skipped matrix job reports its unexpanded name (for exampleRelease ${{ matrix.arch }}), and Android's legs differ by event.tools/tests/ci/contracts/test_required_check_gates.pypins the names and checks that each gate needs every other job in its workflow. - These workflows run on every pull request and merge group. Path-filtered workflows (pre-commit, CI Scripts, Code Analysis, Docker, ...) can't be required: when a PR doesn't trigger them, their check never reports and the merge stays blocked.
- GitHub starts no workflows for pull requests opened with
GITHUB_TOKEN, solupdate.ymlandpx4-metadata.yml(upstream only) open theirs with thePX4BUILDBOT_ACCESSTOKENsecret, which also opens the Crowdin pull requests. Without it they fall back toGITHUB_TOKEN, and the required checks of those pull requests never report until someone pushes to the branch or closes and reopens the PR.
Release tags
Platform workflows trigger on push of tags matching v[0-9]+.[0-9]+.[0-9]+ only. Release tags
are cut on Stable_V* branches. Change detection (_detect-changes.yml, which also plans the
Android and Docker legs) skips every build for a tag ref that is not an exact vX.Y.Z name reachable from an
origin/Stable* branch (the name check also covers workflow_dispatch on a tag, which bypasses
the push.tags glob), so nothing is built, signed, or pushed (TestFlight, Play Store, Docker Hub).
aws_upload.py publish independently refuses to publish such a tag to the S3 latest/ folder or
invalidate CloudFront. Both use qgc_tools.release_tag_check.check_release_tag(), which fails the
job if git cannot answer. Version-marker tags on master (e.g. v5.2.0-dev, consumed by
git describe for daily-build version numbers) do not match the trigger glob and never start a
build. Release tags are created and pushed by hand; the push also runs release.yml, which
stops with an error unless an origin/Stable* branch contains the tag
(tools/ci/publish/release_branch_check.py), so no release is drafted for a tag that is never
built. It then drafts the tag's GitHub Release with git-cliff notes (release_notes.py,
tools/configs/cliff.toml; just release-notes vX.Y.Z prints them locally) and writes them to the
job summary. A tag that already has a release, draft or published, keeps it unchanged; a manual
dispatch with the tag input drafts an older tag with the dispatching branch's tooling. Release
assets are uploaded by hand.
TestFlight releases
ios.yml builds a Release device bundle and a Debug x86_64 simulator bundle, installing Qt's separate
ios_device and ios_simulator_x86_64 SDKs. The simulator stays on x86_64 because Qt's bundled FFmpeg
has no arm64 simulator slice. Pull-request and branch builds remain unsigned. A release tag selects the
Xcode App Store preset, imports an Apple Distribution certificate and provisioning profile, verifies the
signed bundle, packages an IPA, and uploads it to TestFlight. The job's APPSTORE_RELEASE requires every
variable and secret below except the bundle ID; a tag without them builds the unsigned IPA, skips
TestFlight with a notice, and does not fail (ios_package.py package verifies the signature only when
APPSTORE_RELEASE is true).
Configure these repository variables before publishing a tag:
APPSTORE_BUNDLE_ID(defaults toorg.mavlink.qgroundcontrol)APPSTORE_TEAM_IDAPPSTORE_ISSUER_IDAPPSTORE_API_KEY_IDAPPSTORE_PROVISIONING_PROFILE_NAME
Configure these repository secrets:
APPSTORE_API_PRIVATE_KEY— App Store Connect API private key in PKCS#8.p8formatAPPSTORE_CERTIFICATES_FILE_BASE64— base64-encoded Apple Distribution.p12APPSTORE_CERTIFICATES_PASSWORD— password for the distribution.p12
Secrets on pull requests
Same-repository PRs, including Renovate's, receive repository secrets even though they run
PR-controlled code. Signing and registry secrets therefore resolve empty on pull_request
events: Android PR builds sign with a throwaway debug keystore, macOS PR bundles are never
signed or notarized, and PR Docker builds do not log in to Docker Hub. Publishing steps
(AWS uploads, TestFlight, Play Store, docs deploys) are gated to pushes, tags, or dispatch.
Caching
Backends and planning
- Two backends: GitHub's cache, and RunsOn's S3 cache backend for upstream RunsOn jobs. They are separate; matching keys and paths cannot bridge them.
setup-pythonrunstools/ci/cache/cache_backend.pyfrom a JavaScript action, where the runner injects the cache URLs cache actions actually use (shell steps do not see them), and exportsQGC_ACTIONS_CACHE_BACKEND. S3 requires the RunsOn proxy and its original GitHub endpoint, so a configured bucket alone (or a Windows stack before RunsOn 3.1) keeps GitHub limits. S3 backends also enable uv/Python caching withUV_PYTHON_PREFERENCE=only-managed, so uv caches standalone CPython instead of the image's Python.- The
cacheaction runscache_plan.pyonce to resolve the save policy, cache scope, every key, and the compiler/moc/CPM environment. Default-branch pushes, schedules, and manual builds share thesharedscope; PRs usepr-<number>.pull_request_targetnever saves under the defaultautopolicy. - Compiler, moc, CPM, and workspace Qt archives use workspace-relative paths (CPM sources live in
.cache/CPM; CMake still receives an absoluteCPM_SOURCE_CACHE), so keys match across hosted and RunsOn checkouts. There are no dedicated cache-warming builds, so a warm default-branch compiler cache is not guaranteed. - Post-job saves (CPM, uv/Python) read environment values: nested composite step outputs are gone during post-job cleanup.
Compiler and moc caches
cacheinstalls compiler tools in one step:ccache_helper.py installinstalls the pinned, SHA-256-verified ccache for the runner's OS and architecture (Linux under/usr/localplus mold; macOS and Windows underRUNNER_TEMP, added toPATH). Docker jobs skip it (install-tools: false).save-build-cachesaves after a successful build or analysis autogen step, before packaging, tests, or scanners can fail; Docker saves when its report confirms successful compilation. Oneccache_helper.py save-planstep runs the save gate below, packs the compiler/moc snapshot, and names the caches to save; the action uploads the snapshot or, when the upload fails or there is none, saves those caches.- Pull requests on GitHub storage restore the default branch's compiler, moc, CPM, and GStreamer SDK
caches but save none of their own (
scoped_save_policyincache_plan.py): those copies cost upload time and, for CPM, evicted shared entries from GitHub's size-limited cache. Merge-queue runs save none on either backend: their temporary ref is deleted after the run, so nothing could restore them. On S3, PRs (forks included) save to their PR scope, but skip a compiler or moc save when the build missed that cache fewer than 20 times (PR_SAVE_MIN_MISSESincache_plan.py). Each save uploads a multi-GB archive (a PR build with 99.7% hits re-uploaded 4.7 GB: 44 s on Linux, 159 s on Windows). The save gate inccache_helper.py save-planreadsccache --print-stats(Docker: the container's stats indocker-build-report.json) and the moc stats log, and saves if it can't read them or fails. Other events always save. - On GitHub storage, compiler/moc snapshots are kept as one-day workflow artifacts
(
build_cache_artifact.py; seeactions/README.md). Restores warn and fall back to the dependency cache on API errors, malformed responses, or timeouts (60 s per API attempt, 15 min for the download). - GitHub compiler-cache budgets are 3 GB for Windows, coverage, and sanitizer builds, 2 GB for other
Debug and macOS builds, and 1 GB for remaining Release builds; S3 backends use the
ccache.confceiling, including PRs. Coverage's 3 GB budget is a trial: compare hits, LRU evictions, and transfer time on warm runs. - Keys roll per run with a distinct suffix per matrix leg. moc save keys include the
coverage/sanitizer variant while restore prefixes stay shared, so the shared moc cache holds every
variant; the launcher's default
MOCCACHE_MAX_SIZEis 1G (entries are mostly well-compressing include manifests). The job summary's Build section shows compiler and moc cache hit rates; amiss-cache-evictedrow in its collapsed moc cache events means the limit is too small. - Coverage keeps the compiler launcher (ccache stores
.gcnofiles alongside objects). macOS passes the installed ccache binary to CMake so Homebrew discovery cannot select another version. - Configure-check results (
check_include_file,check_symbol_exists, and similar; about 650try_compileruns, mostly libarchive and SDL3) ride in the ccache archive underqgc-configure-checks/.cmake/modules/CheckResultCache.cmakeseeds a fresh configure with the results saved for the same toolchain, flags, and QGC options, salted with the CPM dependency fingerprint and runner image (QGC_CHECK_RESULT_CACHE_SALT) plus, at configure time, the installed system packages and include paths (system_header_digestincmake_helper.py: SDL3 and libarchive probe headers such aslibudev.hunconditionally), and saves them after a successful configure; a local fresh configure dropped from 29 s to 7 s with byte-identical generated config headers. sccache pilot legs run the checks.
sccache pilot
A trial, off by default: setting the repository variable QGC_COMPILER_CACHE to sccache moves
the two linux.yml Release legs (not coverage, sanitizers, or other workflows) from the ccache
archive to sccache on RunsOn's S3 cache bucket. Deleting the
variable restores ccache.
runs-on/action(sccache: s3) exports the bucket, region, and a per-repository, per-platform prefix (cache/sccache/<repository id>/<os>-<arch>/v1) that the stack's cache lifecycle expires.cache_plan.pythen selects sccache (QGC_COMPILER_CACHE_TOOL), skips the ccache archive restore and save, and configures the server (SCCACHE_BASEDIRS,SCCACHE_IDLE_TIMEOUT=0, an error log inRUNNER_TEMP); without the bucket, as on GitHub-hosted runners, it warns and keeps ccache.ccache_helper.py installadds the pinned, SHA-256-verified sccache and passes it to CMake asQGC_CACHE_PROGRAM. moccache keeps its own archive.- Every branch shares the prefix, so pull requests only read it (
SCCACHE_S3_RW_MODE=READ_ONLY); pushes, merge-queue, and manual runs write it. RunsOn's branch-scopedremote_cache: sccache(RunsOn 3.6.0 or later) would let pull requests write their own entries. - CMake disables precompiled headers whenever sccache is the launcher: sccache keys a GCC PCH by its
preprocessed text, which omits macro definitions, so an edited header can reuse a stale PCH
(mozilla/sccache#2562, reproduced with sccache
0.18.0 and GCC 13). Each compiled source that used
pch.hthen costs about 1.8 s more CPU with Release flags, which slows cold builds. - With remote storage, sccache preprocesses every source before its lookup (direct mode needs a
local cache), about 0.4 s of CPU per hit where a ccache direct hit takes milliseconds. That offsets
the archive transfer it removes (a warm
masterbuild restored 4.4 GB in 22 s and saved it in 50 s).
To evaluate, set the variable and run linux.yml twice on the same commit with workflow_dispatch
(the second run measures warm hits). Compare each leg's Build step and job durations, and the job
summary's sccache statistics (hit rate, cache writes, errors, server error log), with recent ccache
runs. sccache reaches S3 directly, so the Magic Cache traffic line in RunsOn's "Complete runner"
step leaves it out.
CPM and GStreamer SDK caches
- CPM uses immutable dependency-fingerprint keys (computed by
cpm_helper.pyforcache_plan.py): CMake files that declare a dependency (CPMAddPackage,CPMDeclarePackage,CPMFindPackage,FetchContent_Declare), option defaults, presets,build-config.json, and the CPM modules and patches, so ordinary build-script edits reuse the default branch's snapshot. Only Release jobs save; PR and branch Release jobs first try an exact restore of the default-branch snapshot and skip their scoped copy when it exists. Unchanged snapshots are not saved again. Keys follow host and target, so Debug legs (the iOS simulator, Linux's custom plugin) restore their platform's Release snapshot; acache-key-suffixsplits them (Android legs), and suffixed legs fall back to the unsuffixed platform's sources. A managed runner image's CPM seed fills an empty cache when its fingerprint matches. - GStreamer SDKs have separate immutable caches, excluded from CPM archives. Only Windows, Android,
and iOS jobs use them (desktop Linux and macOS use the system GStreamer), keyed on the
gstreamersection ofbuild-config.json(fingerprinted incache_plan.py),cmake/GStreamer/Download.cmake, andcmake/GStreamer/platform/*.cmake. They hold the extracted SDK trees without the downloaded archives; configure uses a tree stamped with the pinned checksums as is.
Other caches
- Qt SDKs, including iOS and Android target SDKs, are cached by host, target, architecture, version, and a digest of the modules, archive subset, and (except for aqt) installer; PRs from forks only restore.
- apt: Linux
install-dependenciescaches downloaded.debs per distro, architecture, month, and package-list hash (apt-debs-…, planned byinstall_dependencies_helper.py plan); acategoryinstall uses its ownapt-debs-<category>-…family, so it never restores into or replaces the full set's cache. It saves right after a successful install, except in Copilot sessions, which cannot write the cache. - Gradle: Android jobs cache Gradle User Home through
setup-gradle's open-sourcebasicprovider, keyed on the Gradle build files, only on the S3 backend; on GitHub's cache it evicted compiler caches (#14474), so GitHub-hosted legs such as Android on macOS don't cache it. Saves follow theautopolicy, so pull requests save too. The key hashes every**/*.gradle*file in the workspace, sobuild-setupruns it before restoring the CPM cache and installing Qt: Windows cannot statandroid_openssl's directory symlinks there, and those Gradle files aren't QGC's. - pre-commit restores prek's hook environments (
prek-v1-*:~/.cache/prekwithout its download and build caches) keyed on.pre-commit-config.yaml, falling back to an earlier configuration's environments. prek installs only the environments of hooks that run, so a push that misses the key first runspre_commit.py --prepare-cache, which prepares every hook (prek prepare-hooks, except TruffleHog and the Renovate validator) and then prunes unused environments (prek cache gc, which only warns on failure), and saves; PRs only restore. Docs Lint and Copilot Setup Steps restore the same entry read-only. - lychee restores and saves
.lycheecachewith a three-day entry lifetime; fork PRs only restore. - Docker BuildKit layers use
type=gha,version=2, scoped by variant and target. On RunsOn,runs-on/actioninitializes Magic Cache before Buildx to store layers in S3. Only non-PR jobs export layer caches. - Not cached: Android emulator AVDs (each run creates a fresh AVD), Flatpak, and uv/Python on GitHub-hosted backends.
Cleanup
cache-cleanup.yml (gh_cache_cleanup.py, built-in gh cache commands) runs every six hours,
when a PR closes, and on demand; the script reads each trigger's settings from the event:
- Scheduled cleanup removes superseded PR build-cache generations even below the storage threshold, keeping the newest run/attempt per PR and matrix cache family. Above the threshold it evicts least recently used archives first, so newly populated larger caches survive, while protecting the latest default-branch generation of each build and dependency cache family, the prek hook environments, and the lychee link cache.
- Closing a PR removes that PR's merge-ref caches, without a job summary.
- Manual runs default to a dry-run prune;
dry-run: falsedeletes, andmode: wipelists (or deletes) every cache of the selected branch, or of all branches. - Deletions are scoped to the selected ref; failed deletions and an unreachable size target are reported. Cleanup affects GitHub storage, not the RunsOn S3 backend.
Builds and Tests
Compiler settings
- Unity builds: Linux coverage and sanitizer builds and the iOS simulator build inherit the
hidden
lean-debugpreset (-g1plusQGC_UNITY_BUILD=ON); the macOS Debug leg passes-DQGC_UNITY_BUILD=ON. Unity batches halve compile CPU. Bundled third-party code, the GPS protocol and GStreamer libraries, and files markedSKIP_UNITY_BUILD_INCLUSIONstay per-file; Release jobs stay per-file. A redefinition or ambiguity error means two.ccfiles in one batch share file-local names or a file-scopeusing namespace: rename them or mark the file, and reproduce with-DQGC_UNITY_BUILD=ON. Apple builds batch a different source list than Linux, and adding or removing a source shifts later batches, so such errors can appear in files a PR did not touch (and the shifted batches miss the compiler cache once). - Line-table debug info (
-g1) is all gcov and sanitizer stacks need: it cuts objects by ~70% and compile CPU by ~17% against full-g, and keeps the iOS simulator objects within the compiler-cache budget. - rcc launcher: CMake routes
Qt6::rccthrough a launcher that pins the file timestamps rcc embeds, so fresh checkouts keep generatedqrc_*.cppobjects cacheable (an exportedQT_RCC_SOURCE_DATE_OVERRIDEorSOURCE_DATE_EPOCHstill wins), and lowers rcc's default zstd level from 19 to 9 (about 10x faster for ~2% more resource data) when QtCore supports zstd. - CMake entrypoint:
cmake-configurerequiresqt-cmakeby default. Android is the exception and supplies its target Qt toolchain and prefix to plain CMake. Every caller names a configure preset, which sets the build type andQGC_BUILD_TESTING. A failed configure annotates its firstCMake Errorand uploadscmake-configure.log,CMakeCache.txt, andCMakeFiles/CMakeConfigureLog.yaml(CMake 4 no longer writesCMakeOutput.logorCMakeError.log); a failed build annotates its first compiler, linker, or Gradle errors. - Android javac warnings:
setup-java'sjavacproblem matcher made each deprecation warning in the Gradle build an annotation;android.ymlremoves it afterbuild-setup, andcmake-buildannotates javac errors itself. - Windows Qt architecture: aqt architecture names are explicit package identifiers;
test_cmake_presets.pyrequires every workflow matrix to use the same MSVC generation. - Windows linker: Debug dispatches of
windows.ymlpassQGC_USE_LLD_LINK=ONto link withlld-linkwhen the runner has it. Release builds keeplink.exe: lld-link cannot link the IPO (/GL) objects they use.
Unit and integration tests
test-phaseruns the Unit and Integration suites for Linux Debug (coverage and sanitizers) and macOS Debug. Call it only after a successful build. Failures keep JUnit, logs, and each suite's job-summary section (junit_report.py: counts, failures with their first report lines, slowest tests; failed tests also become error annotations) and do not suppress the other suite. There are no blanket until-pass retries, and empty test selections fail. Seeactions/README.md.- Unit tests run one CTest process per CPU, including coverage (GCC merges
.gcdacounters under file locks). Integration tests use two processes by default and for coverage, where instrumented tests otherwise hit their timeouts; Linux sanitizers use one per CPU. - Set the repository variable
CODECOV_TEST_ANALYTICS=trueto upload JUnit results from the Linux test jobs (including the custom plugin's) to Codecov test analytics (OIDC, informational). JUnit artifacts and job summary reports are produced either way. - Sanitizers:
Linux-sanitizers(ASan + UBSan, leak detection on) excludes theNoSanitizerlabel. Runtime options come from CTest:cmake/QGCTest.cmakesets*SAN_OPTIONS(halt_on_error=1) on every test, overriding the shell environment. ThreadSanitizer runs only on manual Code Analysis dispatch. - Coverage: GCC uses atomic counter updates for worker threads; gcovr tolerates the known GCC
negative-counter bug and reports discarded counters. Codecov receives only the Cobertura
coverage.xml, over OIDC (fork PRs upload tokenless); the step summary, threshold check, and build-results comment read gcovr'scoverage-summary.json.coverage_report.pyfails before generating them when the tests wrote no.gcdacounters.verify_coverage_thresholds.py --build-dirreads thresholds fromCMakeCache.txtand compares exact covered/total counts, not gcovr's rounded percentages. Manual Linux coverage dispatches also run the normally excludedNetwork|Flakytests serially against the same build after the coverage report; they have separate reports and still fail the job. - Reproduce either Linux lane with
cmake --workflow --preset Linux-sanitizersor--preset Linux-coverage(just coverageusesLinux-coverage). - Portable tests: Windows x64 and the macOS Release leg build and run ten standalone portable
utility executables (
QGC_BUILD_PORTABLE_TESTS=ON, CTest labelPortable). They share test bodies with the full harness and do not enable test hooks in the packaged application. There is no separate Extended Tests workflow.
Platform notes
- macOS: the Debug leg builds for arm64 only and runs the Unit and Integration suites; only the
universal (x86_64h + arm64) Release leg packages and uploads the DMG. The job's
MACOS_SIGNgates signing and notarization (CMake option, certificate import, and secrets) to non-PR Release legs inmavlinkrepositories or forks that setMACOS_SIGNING_IDENTITY; other forks build an unsigned DMG instead of failing inSignMacBundle.cmake.verify_executable.py --type dmgmounts the image, verifies the bundle, and always detaches it. On a boot-test timeout it captures the hung process's stacks before killing it and prints them after the captured output, and itslipo/hdiutil/AppImage helper calls time out after 120 s. The boot test forces QGC's log to stderr (a Windows GUI app otherwise logs to the debugger) and enables the startup categories with--logging, so a slow, hung or crashed boot shows where it stopped; a passing boot folds that log into a collapsed group. A crash is named by its signal or NTSTATUS (-11 SIGSEGV,0xC0000005 STATUS_ACCESS_VIOLATION) and the step exits 1: Python 3.10 cannot exit with a status above 2^31 on Windows, and MSYS bash reported the result as 127. On Windows QGC's unhandled-exception filter prints the code, address, and module+RVA to stderr and, withQGC_CRASH_DUMP_DIRset, has a thread started at launch write a minidump there (not the crashed thread, which may hold the loader lock or have no stack left), renamed from.partonly when complete; failure diagnostics are uploaded as described inactions/README.md. On Windows a build tree boots with only the GStreamer plugins the package ships (configure records them asQGC_GST_SHIPPED_PLUGINS;verify_executable.pycopies them toboot-test-gstreamer-plugins/): the whole SDK's ~270 plugins took ~40 s to scan and hung or crashed QGC on exit. - iOS: simulator builds run
ios_boot_test.py, which launches with--simple-boot-testand requires QGC's success marker. Cold boots have a 600-second deadline and at most two fresh-device attempts (--boot-timeout1–900 s,--boot-attempts1–2). Boot and installation failures, and a launch that times out before QGC prints anything, are retried on a fresh device; QGC failures are not. Install and launch each have a 600-second deadline (--timeout), and every attempt's simulator commands share a 1500-second budget (--total-timeout) that ends them before the step's 30-minute timeout. A shutdown/delete failure after a passing test is reported as a warning and does not fail the job; after a failed attempt it prevents the retry. Each attempt keeps command output; a failed attempt in any phase saves the simulator state, the last 10 minutes of the simulator's and CoreSimulator's logs, and QGC's new crash reports beside the log before cleanup. A failure ends in an error annotation naming the phase and attempt; every run writes a Boot test summary section, and theios-boot-testartifact is linked below it. - Windows: installer verification lives in
deploy/windows/verify-installer.ps1. - Android: legs are Linux (primary), macOS, Windows (not on PRs), and a Linux emulator smoke
test. PRs build
arm64-v8aonly; other events buildarm64-v8a+armeabi-v7aon the primary leg. Android jobs install only thecoreapt category. The Linux leg runs Android Lint (android_lint.py,gradlew lintReleaseinandroid-build): up to ten Error and Fatal issues from lint's XML report become error annotations titled with the issue id, at theandroid/source that androiddeployqt copied (QGC_ANDROID_PACKAGE_SOURCE_DIR; a copy that differs, like the rewrittenAndroidManifest.xml, keeps the file but not the line), or Gradle's errors when lint wrote no report; an Android Lint job-summary section follows the Build section, and a failure uploads the HTML and XML reports and the Gradle log for seven days, linked below it. Master pushes also build a signed multi-ABI App Bundle on the primary leg throughcmake-build(target: aab, logged toqgc-aab-build.logwith its own "Build (aab)" section and failure annotations; it saves no build caches), uploaded as its own attested GitHub artifact (QGroundControl-linux-<abis>-aab) but not to AWS or the Play Store. Tags start a staged Play Store production rollout; master pushes complete a beta release. - Custom plugin (
linux.yml'scustom-pluginjob, behind the Linux gate): thecustom-exampleoverlay changes the app name and feature set, global compile definitions, so it is its own build: one Debug build that runs the Unit suite (excludingStockUI) and boots the build tree; the stock Linux legs run the integration suites and cover Release compiles. Outside pull requests it also installs the build stripped (cmake --install --strip; the Debug binary carries ~800 MB of debug info) into an AppImage and boots that.custom-example/changes trigger the Linux workflow. - ClusterFuzzLite: PR runs use the bundled seed corpus without querying historical artifacts
(
NO_CLUSTERFUZZ_DEPLOYMENT=true), which also disables previous-build crash comparison: reproducible crashes fail the PR whether or not they predate it. Crash files and SARIF diagnostics are uploaded separately. The workflow runs only on pull requests: nothing reads uploaded fuzzer builds, so there is no continuous build.
Docker
- One multi-stage
deploy/docker/Dockerfilebuilds every variant indeploy/docker/variants.json. Base images come from the ECR Public mirror of Docker's official images (public.ecr.aws/docker/library/<image>:<tag>@<digest>, same digests as Docker Hub), so PR builds, which don't log in to Docker Hub, avoid its anonymous pull limit. Buildx'smoby/buildkitimage and thedocker/dockerfile:1frontend still come from Docker Hub. No QEMU: every target builds for the x86_64 runner, and aarch64 cross-compiles. - Application builds use the shared
cacheaction (separate from the BuildKit layer cache) with keys that separate image variants and compiler identities. The action skips host tool installation and resets/reports statistics inside the container. The workspace mount exposes.cache/ccache,.cache/moccache, and.cache/CPMat/project/source; only cache budgets and statistics settings are forwarded from the host environment. - Each job uploads
docker-build-report.json(configure/build/package timings, cache statistics, CPM source size) with its Ninja build profile. Checkout keeps full history for package versioning; measured checkouts take 13–22 s, which doesn't warrant a repository mirror. - x86_64 Linux variants also produce a native package (
.deb,.rpm, or.pkg.tar.zst).docker_helper.py execruns repository scripts in the builder image from the read-only workspace mount, translating host paths to container paths; as root it runstools/ci/packaging/validate_native_package.py --install, which validates, installs, smoke-tests, and always uninstalls the package.attest_helper.py checksumrequires and verifies CPack's.deb/.rpmchecksum sidecar and writes Arch's. - Pushes and manual runs generate CycloneDX SBOMs for CPM dependencies and the builder image and scan them with Grype (SARIF to code scanning); PRs skip SBOMs and scans. CPM metadata is read inside the builder, with the build tree mounted where it was built, so container-local dependency paths resolve. Master pushes submit the Ubuntu builder's CPM SPDX snapshot to the dependency graph.
- The planner gives every leg the builder image's push target (
resolve_push_target()inqgc_tools/docker_variants.py): upstream pushes publish master andStable*builds to GHCR and release tags to Docker Hub; pull requests, forks, and manual runs push nothing. The build, registry logins, and theattest-imagesjob, which attests provenance and SBOM for each published image digest, followmatrix.push_target. Thedockeraction keeps the pushed image's registry name as its local tag (imageoutput).
VM builds
vm-builds.ymlbuilds QGC inside the Multipass and Vagrant (libvirt) developer VMs on the nested-virtualizationlinux-x64-vm-builderpool; both jobs open/dev/kvmwithenable_kvm.py. It runs when the VM provisioning inputs change (deploy/multipass,deploy/vagrant, thetools/setupinstallers they call,.github/build-config.json, and the presets)..github/runs-on.ymltriggers pushes only: RunsOn reads it from the default branch, so a pull request run would still use the old pool.- Multipass runs the client as root: the job has no user session, so only root's
snap runcan place the client in the snap cgroup snap-confine requires.multipass launchwaits up to 15 minutes (MP_TIMEOUT) instead of the 5-minute default, which image download and first boot under nested virtualization can exceed. The confined client cannot access the workspace or/tmp, so the source archive and the built AppImage pass through a temporary directory under root's home.install_multipass.py --allow-bridge-forwardingresets the iptablesFORWARDpolicy that Docker sets toDROP, which would leave the guest without network (libvirt adds its own rules for Vagrant). Cleanup only deletes instances it created. The job stayscontinue-on-error. - Vagrant runs
deploy/vagrant/run_vagrant.py(install, thenbuild):vagrant upstops after 150 minutes (QGC_VM_UP_TIMEOUT), the VM is destroyed only after an attempted startup, and a failed destroy fails the job; Vagrant failures fail the workflow. Reproduce locally withpython3 deploy/vagrant/run_vagrant.py install, thenOUTPUT_DIR=artifacts python3 deploy/vagrant/run_vagrant.py. - Vagrant provisioning uses
deploy/vagrant/provision.pyand sharesdeploy/multipass/build_in_vm.pywith Multipass. To rebuild inside a provisioned guest, runBUILD_DIR="$HOME/shadow_build" python3 /vagrant/deploy/multipass/build_in_vm.py --skip-dependenciesas thevagrantuser. Qt versions and modules come from.github/build-config.json.
Code Analysis
analysis.ymlruns on pull requests andmasterpushes over one path list (the&analysis-pathsanchor: compiledsrc/files plusanalysis_matrix.FULL_SCAN_INPUTS); there is no schedule. Manual dispatch runs one job for the selected tool (clazy,clang-tidy,iwyu,qmllint, ortsan).analysis_matrix.pyemits each job'sfamily, packages, CMake configure arguments, andtools/analyze.pyarguments, so one Configure step serves every family. For a PR it estimates the compilation units from the diff and a textual reverse-include scan ofsrc/and allots one shard per 50 units, up to four; it plans none when nothing compiled changed, and full-scan inputs keep all four. Each shard runs clang-tidy then Clazy over one selection and oneclang-scan-depsscan, and reports errors independently; only the first shard saves the shared build caches. Upstream jobs use the 16-vCPUlinux-x64-analyzerpool; forks use GitHub-hosted runners.- Each
masterpush runs one job over every unit and saves.cache/analysis-results; every other run restores it read-only. Keys cover the tool binary and version, arguments and config, compile commands without output flags, and every scanned dependency's contents; tool or compiler errors, timeouts, and crashes are never stored; entries unused for 14 days or beyond 256 MiB are pruned. To force a full recompute, bump theanalysis-results-v1cache key. - clang-tidy comes from the PyPI wheel pinned by version and SHA-256 in
analysis.clang_tidy_*(build-config.json);tools/ci/runner/analysis_tools.pyreads those pins, installs it, verifies.clang-tidy, and puts it ahead of LLVM's own onPATH. Clazy andclang-scan-depsstay onllvm_version; Clazy is built from the pinned source revision bytools/setup/build_clazy.pyand cached, and LLVM-devpackages install only to rebuild it. - Compiler analysis uses Ninja, disables PCH and autogen's inherited link dependencies, and builds
only
qgc-analysis-headers; it does not compile or link QGC (autogenruns only for IWYU). qmllint and ThreadSanitizer keep full builds; ASan and UBSan run inlinux.yml. - Source-only PRs scan changed compilation units active in the build. Header changes use a fresh
clang-scan-depsscan to include transitive dependents, falling back to all active project sources if the scanner is unavailable or incomplete; analysis/build configuration changes scan every active unit. - Warnings are advisory; error diagnostics, missing tools, invalid databases, timeouts, and
compiler-driver failures fail the job (
shell: bashadds pipefail, so the log'steekeepsanalyze.py's status;test_workflow_shells.pyrequires it for every| teestep). Manual IWYU runs are advisory (continue-on-error); their uploaded report is the result. Each tool's job-summary section counts the unique errors and lists the first 20 ahead of its diagnostics listing (cut at 300 lines), and the first 10 errors are annotated on their lines.misc-include-cleaneris an advisory clang-tidy warning; it leaves Qt, MAVLink, GStreamer/GLib, and Qt-generated includes alone (IgnoreHeadersin.clang-tidy), because it would suggest their internal headers. Jobs upload*-timings.json,*-progress.jsonl,*-diagnostics.json(each unique diagnostic's file, line, column, severity, and check, and on pull requests those on changed lines), and*-raw.txt(every unit's full output; identical diagnostic blocks are shown once in the log). Per-check profiling (profile_checksdispatch input) is described intools/analyzers/README.md.
Publishing and Reporting
Attestation and upload
attest-and-uploadrunsattest_helper.py prepare(verifies or writes the artifact's.sha256sidecar and writes the CPM dependency SBOM and a.build.jsonmanifest with producer identity, checksum, and selected CMake configuration), scans an SPDX SBOM, attests provenance and SBOM withactions/attest(separate invocations), and uploads the GitHub artifact.preparealso outputspublish-aws: true on pushes and tag dispatches inmavlinkrepositories when the caller keepsupload-awsand passes credentials (the action passes only whether it has them). The action then configures AWS credentials once and runs oneaws_upload.py publish: artifacts go tobuilds/<ref>/(the runner's ref), and release tags also go tolatest/with one CloudFront invalidation. Credentials come only from the environment.
GitHub Pages site
pages.yml builds and deploys https://mavlink.github.io/qgroundcontrol/ with
tools/ci/publish/pages_site.py build --out _site. Each deploy replaces the whole site, so every
build regenerates all four parts:
- CI health dashboard (
index.html): each workflow's latest 60 master push runs as inline SVG charts (no scripts or external assets), every chart followed by a table of its latest values: wall time and Build-step durations (jobs API), distributable artifact sizes, JUnit test counts, failures and time per suite,src/line coverage (coverage-summary.json, as in the build-results comment), and Code Analysis's unique warnings per tool (*-diagnostics.json), plus the tests that failed on master in the last 30 days with their failed and total runs. Each chart column and table row links its run. - History:
data/history.jsonis versioned JSON with one record per (commit, workflow), read back from the live site on every build, so there is no data branch and the workflow never writes to the repository. Each build collects the last 10 completed master push runs of every platform workflow and Code Analysis that it lacks (or holds an earlier attempt of), newest first; records are dropped only past 1,000 commits or 365 days. Collection stops after 15 minutes and gives up on an artifact after two stalled 120-second attempts, so a slow artifact store skips runs, which the next build collects while they remain among the latest 10, instead of cancelling the 30-minute build job; the site still deploys with every stored record. A history fetch error fails the build rather than deploy a truncated history. So does HTTP 404 once apages.ymlrun has succeeded, since every successful run deployed the site and a Pages outage or unpublish also answers 404; only before the first deploy does the history start empty and backfill the last 30 runs per workflow whose artifacts remain. To start over after losing the deployed history, dispatchpages.ymlwithnew_history. Artifacts are read from their zip archives, extracting only the reports needed. - Schemas (
schemas/):src/FactSystem/factmetadata.schema.json, whose$idmust be its URL there (the build andtest_pages_site.pycheck it), with an index page. - Downloads (
downloads/): the packages inqgc_tools/build_artifacts.py'sPUBLISHED_BUILDSunder S3builds/master/(test_published_builds.pykeeps the list in sync with the workflows'attest-and-uploadsteps and the user guide), with the SHA-256 from each.sha256sidecar ("—" when missing) and the commit and run named by the package's provenance attestation, looked up by digest, plusgh attestation verifyinstructions. - API docs (
api/): thedoxygen_buildartifact of the latest successful non-PR Doxygen run on master, else (or when its download stalls past two 150-second attempts) a page linking https://api.qgroundcontrol.com. The Doxygen workflow still deploys that domain; moving it to the Pages site is a later admin step.
It runs on workflow_run completion of the platform workflows, Code Analysis, and Doxygen on
master, on master pushes that change the schema or the site tooling, daily, and on dispatch;
never on pull requests, whose artifacts must not reach the site (CI Scripts tests the tooling).
The build job runs only in mavlink/qgroundcontrol and, for workflow_run, only for a master
push run of this repository (Doxygen's scheduled or manual runs for Doxygen); it checks out the
default branch's tooling with contents: read and actions: read. The deploy job alone has
pages: write and id-token: write, in the github-pages environment. One pages concurrency
group serializes deploys without cancelling them. Pages must be enabled with source "GitHub
Actions" (Settings → Pages) before the first deploy.
Build results
build-results.ymlruns onworkflow_runcompletion of every workflow with apull_requesttrigger: the platform workflows, pre-commit, Code Analysis, and the other checks (GitHub runs only the default-branch copy;test_platform_workflow_names.pykeeps the list in sync with the workflow files andbuild.platform_workflows), and only for pull request builds. Onereport_context.pylookup resolves the PR number and the base commit the comparisons use: the base branch's tip when the triggering run was created (commits?sha=<base ref>&until=<created_at>), approximating the commit GitHub merged the PR head into for the build (a re-run builds the same merge and keepscreated_at).pull_request.base.shacan be weeks older, since pushes to the PR need not update it, and would credit every later base-branch commit to the PR; it is used only when the lookup fails or finds nothing, which the step logs.- The reporting scripts take the repository, commit, and event from the
workflow_runpayload (workflow_runs.triggering_run()), the platform workflows frombuild.platform_workflowsin the sparse-checked-outbuild-config.json(failing when it is missing), and the run snapshot thatcollect_build_status.pysaves in$RUNNER_TEMP/workflow-runs-cache.json; the comment generator reads each input from the path the earlier steps write (INPUT_PATHS). Steps pass only their own flags, andtest_build_results_workflow.pyreplays them under fake payloads. - Every trigger updates one comment (fork PRs included), so finished workflows and their failures
show while others still run; the last one to complete renders the final state.
collect_build_status.py(stdlib only, before Python dependencies install) writes each workflow's state, latest attempt's duration, attempt number, and wall time since the run was created, and its jobs with failed-step log links, from one jobs-API call per run (--status-out). A failed job whose runner was lost (a step left unfinished, or GitHub's "lost communication with the server" annotation, read only for a failed job without a failed step) names that step and its start and end. Every other workflow of the commit (CI Scripts, Docker, CodeQL, ...) is listed with its state, and its jobs only when it failed; each one's completion also triggers the comment, so a late failure still reaches the verdict. download_artifacts.py(one directory per artifact, plus a manifest naming its workflow and whether it downloaded) fetches the completed runs' test results, coverage, and distributable artifact listings (size, id, expiry), the pre-commit results, and Code Analysis's per-tool*-timings.jsonand*-diagnostics.json; runs still in progress are skipped. The same script then fetches the base commit's ownpushbuilds (--head-sha "$BASE_SHA" --event pushwith an empty--runs-cache): their test results, coverage, and artifact listings are what the comment compares with, each platform on its own, so a failed or missing base build only blanks its rows. Every download step continues on error, and the comment names artifacts that failed to download apart from those past retention, which the manifest marksexpiredand the comment notes. The comment is also the job summary.- The comment (
generate_build_results_comment.py) leads with a verdict (❌ failed, naming every failed workflow including other checks; ⏳ in progress; 🚫 cancelled; ⏭️ nothing to build; ✅ passed), the linked head commit, how many platform workflows are done, pending, or skipped by change detection (every build job skipped), and how many other checks still run. A table gives each workflow's status, duration (with the attempt and total wall time after a re-run), test or hook counts, size change from the base, and run link; Code Analysis shows its warnings on lines the pull request changed. Lines follow for the other checks (problems linked first) and for the base commit with each platform's base run. A Failures section lists each failed job with links to its failing steps' logs (or the step its runner was lost during), failed tests with their first report lines (QtTestFAIL!blocks, sanitizer reports, else the output tail) from the JUnit XML, failed pre-commit hooks, and failed other checks. Collapsed sections cover per-suite test results with the tests each suite added or removed versus the base build;src/line, function, and branch coverage with changes in percentage points (test code is left out, as on Codecov, which the section links for the changed lines' coverage); artifact downloads with their size change (B, KB, or MB; ⚠️ above 1% and 1 MiB growth) and expiry; pre-commit counts when a hook failed; and Code Analysis's warnings on changed lines (changedin each*-diagnostics.json), linked at the commit the analysis checked out (commit, GitHub's merge commit on a pull request, whose line numbers can differ from the head's; the head commit for reports without one), with every unique warning counted only in a per-tool table. Lists are truncated with "…and N more", and longer reports shrink to stay under GitHub's comment limit. Names from pull requests (tests, jobs, hooks, artifacts) are escaped or shown as code. Android artifact names include their ABIs, so single-ABI PR APKs are not compared with multi-ABI release APKs; unmatched variants show—for their change. report_context.py --comment comment.mdrechecks that the PR head is still the build's commit, then creates or updates the PR's comment marked<!-- build-results -->(or the marker of the commentsthollander/actions-comment-pull-requestposted before) throughgh api.
Job summaries
Scripts build each job-summary section with common.markdown.summary_section: an H3 title, an
Item | Value facts table, an optional body, and collapsed <details> for long listings, with
numbers, durations, and sizes from common.format. A build job reads top-down:
| Section | Written by |
|---|---|
| Setup | build-setup (setup_summary.py, also after a failed setup step, which it names): runner, image (RunsOn image and AMI, or the hosted ImageOS and ImageVersion), RunsOn instance type, lifecycle, zone and ID, CPUs and RAM, Qt version, installer and source, CMake and Ninja, compiler, Xcode, JDK, Android NDK, Python groups, cache backend, and each build cache's restore result with ccache's primary key, and the key a fallback (restore-keys) hit came from |
| Configure | cmake-configure (cmake_helper.py configure, also after failures): result, duration, preset, generator, configure-check reuse; after a failure the first CMake error and the end of the output collapsed, and a link to the configure logs |
| Build | cmake-build (cmake_helper.py build, also after failures): result, duration, toolchain, this build's compiler (ccache or sccache) and moc cache hit rates; failed targets and first errors, slowest steps, time by kind, and moc cache events collapsed; a link to the Ninja reports |
| Android Lint | android_lint.py on Android's Linux leg (also after failures): result, duration, error and warning counts; the first errors collapsed; after a failure a link to the lint reports |
| Unit Tests / Integration Tests (suite) | run-unit-tests (junit_report.py): counts, failures with their first lines, slowest tests and failure output collapsed; a link to the results artifact |
| Coverage, Binary size | coverage_report.py --step-summary, size_analysis.py |
| Boot test, Artifact | verify_executable.py (result with the crash's signal or NTSTATUS name, package, size, duration; after a failure the last log line, the last 40 lines collapsed, and a link to the diagnostics artifact) or, for the iOS simulator, ios_boot_test.py (result with the failing phase and attempt, simulator, attempts, duration, and the end of the boot log); and attest_helper.py prepare (file, size, SHA-256) |
| Disk | disk-watch's post step, at the end of every build-setup and Docker job: the workspace volume's size and its start, peak (with free space and time), and end use, sampled every 10 s; a peak whose free space is below 10% of the volume, kept between 5 and 10 GiB, gets ⚠️ and a "Disk nearly full" warning annotation |
Docker builds write one Docker build section (docker_helper.py summary); pre-commit,
Code Analysis (analyze.py --step-summary), cache cleanup, GStreamer, release-notes, and Build
Profile jobs use the same layout. RunsOn's cost table and the build timeline come from their own
actions after these sections.
Lint, Docs, and Security Checks
- Pull request diffs in pre-commit and Code Analysis come from
common.git.pr_diff_refs: GitHub's merge checkout is compared with its first parent, the base tip it merged into (pull_request.base.shacan be older and would add newer base-branch changes), so these checkouts fetch depth 2. pre-commit pushes fetch full history to diff againstbefore; a base with no merge base in the fetched history checks everything. pre-commit.ymlruns on every path andtools/pre_commit.py --ci --changed(prek) on the pull request's or push's changed files, and uploadspre-commit-results.jsonandpre-commit-output.txtfor the build-results comment. The C++ formatting hook checks modified regions against the PR merge base (orHEADlocally), followingCODING_STYLE.md; new files and unchanged files supplied in a full sweep are checked in full. Compiler-aware Clazy and clang-tidy hooks are manual locally; CI runs them inanalysis.yml. TruffleHog runs only as a local commit hook (--cidefaultsSKIPtotrufflehog). Qt is installed only when the selection includes QML for qmllint (pre_commit.py --needs-qt).check-renovateschema-checks.github/renovate.jsonin every run.pre_commit.py --cialso runs the manual-stage validators that download pinned tools, each only when its own files change: Renovate'srenovate-config-validator(.github/renovate.jsonor.pre-commit-config.yaml),packer-validate(the runner image template) andruns-on-lint(.github/runs-on.yml); Packer and the RunsOn CLI are thebuild-config.jsonpins, verified and cached in.cache/tools/.editorconfig-checkerenforces.editorconfig; the gersemi, yamlfmt, and qmlformat formatter trials are manual-stage checks (tools/README.md).prek installalso installs acommit-msghook enforcing Conventional Commits;default_stageskeeps the other hooks out of that stage.- English docs get the Markdown, spelling, and prose hooks (markdownlint, typos, vale) through
pre-commit like any changed file; when their configuration (
.vale.ini,.markdownlint*,.typos.toml,.pre-commit-config.yaml,tools/pre_commit.py) changes, the same run also checks every English page with those hooks, so new rules reach unchanged pages.just lint-docsruns only those hooks locally (tools/pre_commit.py --docs). The Docs workflow checks English internal links without exemptions before building all locales. Its build setsBRANCH_NAMEto the ref name, whichdocs/.vitepress/config.mjsuses as the site base (/<branch>/), matching the directorydeploy-docspublishes to. VitePress is pinned to a 2.0 prerelease because the stable 1.x dependency chain prevents patched Vite updates; its native theme navigation replacesvp-dynamic-nav, andnpm run docs:buildruns its Node regression test first. - Check Links runs lychee on PRs,
masterpushes, and manual dispatch; exact legacy URL exceptions intools/configs/lychee.tomlexpire on their recorded review date (checked bytools/validate_configs.py). - The
qt-translation-placeholdershook checks new or changed TS messages against the PR merge's first parent or the push baseline (prek passes it asPRE_COMMIT_FROM_REF) without installing Qt. Unchanged legacy placeholder defects do not block unrelated imports; malformed XML and newly introduced placeholder mismatches fail.ci-scripts.ymlruns the validator's tests. - CodeQL scans Actions, Java/Kotlin, and Python (including
tools/,deploy/, tests, and CI scripts); C++ is not scanned by CodeQL. It runs onubuntu-latestwith a 10-minute timeout: onubuntu-22.04about one PR run in seven failed checkout and then hung in harden-runner's post step until the 30-minute timeout cancelled the check.
Tests
ci-scripts.yml runs on changes to .github/, tools/, deploy/, CMake files, and other tooling
configuration:
- the full Python suite (
pytest -q -n auto tools/tests, including the CI script tests intools/tests/ci) on Python 3.10 and 3.12 with thereleasegroup's git-cliff for the release-notes tests (the 3.12 leg adds theterraingroup so the terrain pipeline tests run), plus the tests markedwindows(pytest -q -n 2 --durations=15 -m windows tools/tests: platform detection, subprocess, network, file I/O and checksum sidecars, Qt and dependency setup, configure, cache planning and artifacts, attestation and AWS upload tests) on Windows, with two xdist workers as a trial (revert to serial if CI shows it slower). Linux tests run in parallel; all run in random order, with a 60 s per-test timeout; a failing run prints the--randomly-seedthat reproduces its order (seetools/ci/README.md).
Python and workflow lint run as pre-commit.yml hooks: Ruff check and format, Pyright (over the
whole project whenever a Python file changes, so a break in an unchanged module still fails), the
tools/ import-linter layers (ci on top, common at the base), tools/validate_configs.py, and
actionlint (which reads .github/actionlint.yml, listing the repository vars) with zizmor.
The test jobs use sparse checkouts. empty_parameter_set_mark = "fail_at_collect" in
tools/pyproject.toml makes a test that parametrizes over repository files (such as the
*.VehicleConfig.json pages) fail collection when it finds none, so add such inputs to both
checkouts and to the workflow's paths.
Run the same suite locally with just test-python, and the lint hooks with just lint.
Python environment
setup-python synchronizes frozen dependency groups from tools/uv.lock into tools/.venv
(narrower calls keep already-installed groups) and adds that environment to PATH. CMake uses the
same interpreter, and MAVLink generation uses its preinstalled dependencies without installing
packages during a build. Ruff, Pyright, clang-format, and import-linter hooks run from the locked
lint group, so the hooks and tools/.venv share one version.