Conventions for CI configs, build scripts, and platform docs. Part of the repository agent instructions; start from AGENTS.md.
- ci/ — GitLab CI job definitions (
.yml), Dockerfiles, and shared templates (macos.yml,docker.yaml,lint.yml,package.yml). - tools/ — Dependency and packaging scripts (
buildgdk.sh,buildhidapi.sh,test.sh,lint/cpplint.sh, …). - doc/ — Human-facing build and test docs, often mirroring what CI and
tools/do:
Keep OS-specific CI files in sync when a change applies to more than one variant.
| Platform | Typical files to update together |
|---|---|
| macOS | ci/macos-x86_64.yml and ci/macos-arm64.yml (shared base: ci/macos.yml). Universal packaging may also touch ci/macos-universal.yml. |
| Linux | ci/linux-x86_64.yml and ci/linux-x86_64/Dockerfile / ci/linux-x86_64/setup.sh as needed. |
| Windows | ci/windows-x86_64.yml, ci/windows-x86_64/, and ci/x64-windows/ helpers when the same step exists there. |
Example: adding a dependency build step on macOS usually means adding the same tools/build*.sh invocation to both macos-x86_64:depends and macos-arm64:depends (only PREFIX, ARCH, brew paths, and cache keys differ).
The macos-*:depends jobs install Qt with tools/ci/install-qt-macos.sh into ~/Qt/<version> on the runner; the version is QT_VERSION (plus QT_WEBENGINE_ID) in ci/macos.yml. After bumping it, run a macOS depends job before the build jobs.
macos-x86_64:* jobs run on the macos-arm64 runner and cross-compile Intel artifacts (cmake/macos-x86_64-cross.cmake, tools/ci/macos-x86_64-cross-env.sh).
Depends caches must stay separate:
| Job family | Cache key | Cache path |
|---|---|---|
macos-arm64:* |
macos_arm64 |
depends/macos-arm64/ |
macos-x86_64:* |
macos_x86_64_cross |
depends/macos-x86_64/ |
Do not share cache keys between arches. After changing how x86_64 deps are built, bump the x86_64 cache key (or clear the cache) and re-run macos-x86_64:depends once.
If you change how the project is built (new dependency script, new CMake option, new test step, different qt-cmake flags, CI job script, …):
- Update the matching CI YAML under
ci/. - Update the relevant
tools/script(s) if the logic lives there. - Update
doc/**so local builds and CI stay aligned (README steps,doc/*/build.sh,doc/tests/README.md, etc.).
Do not change CI or tools/ alone and leave doc/ describing the old flow.
- Lint:
ci/lint.yml— keep in sync with tools/lint/ if lint commands change. - Release / packages:
ci/package.yml, platform package jobs — follow existing patterns in the same file family.