Skip to content

One build story: presets + scripts shared by CI and local - #49

Merged
emir-hasanbegovic merged 3 commits into
mainfrom
feat/unified-build
Sep 2, 2026
Merged

One build story: presets + scripts shared by CI and local#49
emir-hasanbegovic merged 3 commits into
mainfrom
feat/unified-build

Conversation

@emir-hasanbegovic

Copy link
Copy Markdown
Contributor

Completes the fleet-wide build unification (satellite's landed inside TinkerNorth/satellite#88, dish-windows in TinkerNorth/dish-windows#67): local builds and CI share the same entry points so they cannot drift. This repo already had the fleet's best piece (ci_local.sh, build-appimage.sh); this converges the rest.

CMakePresets.json (new) holds debug/release/package configures, with QT_QPA_PLATFORM=offscreen moving into the test presets; scripts/build.sh rides the presets; ci_local.sh becomes scripts/ci-local.sh (old name forwards) and closes its known gaps against CI: the missing DISH_REQUIRE_TRANSLATIONS=ON, the missing qmllint -I $QT_ROOT_DIR/qml include, and single-compiler blindness (new --compiler gcc|clang). scripts/install-deps.sh lands with a --ci-qt flag for CI's aqtinstall 6.9.3, since distro lupdate under 6.9 breaks the translation gate. The three near-identical inline cmake+cpack blocks (PR package job, release deb, release rpm) become scripts/build-deb.sh + build-rpm.sh over a shared package preset. The pre-commit hook and docs pointed clang-tidy at build-debug while CI used build; everything now agrees on CI's tree names.

Compiler matrix and ccache stay workflow-side by design (a preset naming a compiler would break the other matrix leg); sanitizer/coverage instrumentation stays lane-specific, mirrored by ci-local's --with-sanitizers.

No Linux toolchain exists on the dev box, so beyond bash -n, YAML/preset validation, the pin-lint awk, and a real check-format.sh run, the preset plumbing proves out on this PR's CI.

Stacked on #48 (both edit linux-ci.yml); will be rebased onto main once that merges.

Base automatically changed from feat/controller-audio to main September 2, 2026 18:18
dish-linux was the closest to the contract already (its ci_local.sh is the
fleet's model), so this wave is convergence: CMakePresets.json (new) carries
the three configure lines CI runs (debug -> build/, release -> build-release/
with tests ON exactly like linux-ci.yml, package -> build-package/ with the
/usr prefix the .deb/.rpm jobs use), and the scripts drive those presets.
The test presets carry QT_QPA_PLATFORM=offscreen so a local ctest and CI's
agree without remembering an env var. Deliberately NOT in the presets: the
compiler (CI's gcc/clang matrix sets CC/CXX in the environment, which CMake
respects natively, so a preset naming one would break the other leg), the
ccache launcher (workflow-side, a local box need not have ccache), and the
sanitizer/coverage configures (matrix-injected and lane-specific
instrumentation).

  scripts/build.sh [debug|release|test|clean]
      same interface, rewritten onto cmake --preset; the debug tree is now
      build/ (CI's name) instead of build-debug/, and the pre-commit hook's
      and setup-hooks' clang-tidy -p target follows
  scripts/ci-local.sh (renamed from ci_local.sh; a forwarder keeps the old
      name) with the known gaps closed: the Debug and Release configures now
      carry DISH_REQUIRE_TRANSLATIONS=ON like CI always did, qmllint gains
      CI's -I "$QT_ROOT_DIR/qml" include when QT_ROOT_DIR is set, and
      --compiler gcc|clang reproduces either side of CI's matrix (one run
      covers one compiler). --no-tidy/--with-package/--with-sanitizers/
      --allow-missing are unchanged; the optional legs now run after the
      core ci-job mirror
  scripts/check-format.sh
      the clang-format gate as one file shared by the workflow and ci-local
  scripts/install-deps.sh
      the README apt list plus CI's pinned clang-format 22.1.4; --ci-qt adds
      the exact Qt 6.9.3 CI builds against (aqtinstall 3.3.0, mirroring
      .github/actions/setup-qt), because distro lupdate below 6.9 resolves
      namespaced classes differently and can fail the translation gate on
      diffs CI does not see
  scripts/build-deb.sh / build-rpm.sh
      the packaging jobs' configure + cpack path (the package preset),
      satellite's build-deb.sh interface

dist/ joins .gitignore now that the packaging scripts can produce it
locally.
The workflows carried their own copies of the configure, build, test, format
and packaging commands; those inline copies are exactly what drifted from
ci_local.sh (which lacked the translations flag and the Qt qmllint include
CI had). Each lane now calls the same single source the local scripts call:

  * linux-ci ci job: clang-format via scripts/check-format.sh, Debug and
    Release configure/build/ctest via the debug and release presets (the
    ccache launcher layered on top workflow-side; CC/CXX still from the
    matrix env). QT_QPA_PLATFORM=offscreen moves into the test presets.
    qmllint, the literal scanner, the translation gate, clang-tidy, the
    hardening asserts and the uploads stay workflow-side as before,
    mirrored by ci-local.
  * linux-ci package job and release deb/rpm jobs: configure + build +
    cpack via scripts/build-deb.sh / build-rpm.sh (the package preset,
    tree build-package/). The validate/lintian/contents/install-and-launch
    assertions are untouched and keep reading dist/.
  * codeql: configure via the release preset. Deltas stated in-line: the
    tree is build-release, tests and translations are configured ON like
    the ci job (the traced build still compiles only Dish), and catch2
    joins the apt list so the tests-on configure stays off the FetchContent
    network fallback.
  * The sanitizer and coverage configures stay inline on purpose: their
    flags are matrix-injected or lane-specific instrumentation, not
    commands a local dev runs verbatim (ci-local's --with-sanitizers
    mirrors them by hand).

Runner setup, composite actions, caches, matrix, artifact uploads, and all
release signing/manifest/publish logic are untouched.
README's Build from source section now tells the install-deps -> build ->
ci-local story, names the preset directories (debug -> build/, replacing
build-debug/), and spells out the distro-Qt vs CI-Qt tradeoff for the
translation gate (lupdate below 6.9 resolves namespaced classes
differently; install-deps.sh --ci-qt installs CI's exact 6.9.3). The
Testing section drives ctest through the preset. CONTRIBUTING's setup
section adds install-deps and ci-local, names CMakePresets.json as the
single source of configure truth, documents ci-local's new --compiler flag
and the ci_local.sh forwarder, and moves the clang-tidy reproduce recipe
onto the debug preset. CHANGELOG records the convergence.
@emir-hasanbegovic
emir-hasanbegovic enabled auto-merge (squash) September 2, 2026 19:01
@emir-hasanbegovic
emir-hasanbegovic merged commit 4c42122 into main Sep 2, 2026
13 of 26 checks passed
@emir-hasanbegovic
emir-hasanbegovic deleted the feat/unified-build branch September 2, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant