One build story: presets + scripts shared by CI and local - #67
Merged
Conversation
emir-hasanbegovic
force-pushed
the
feat/unified-build
branch
from
September 2, 2026 12:30
66fb0ea to
6325e36
Compare
Local builds and CI ran different command lines: build.ps1 wrote to
build-debug/ while CI's Debug tree is build/, build.ps1 forced
DISH_BUILD_TESTS=ON into release trees where CI configures them OFF, and it
left DISH_REQUIRE_TRANSLATIONS off where every CI lane requires it, so a
local green proved less than it looked. CMakePresets.json (new) now carries
the two configure lines CI runs (debug -> build/, release -> build-release/,
the release build preset paired with CI's Dish + dish_setup_image targets),
and the scripts drive those presets:
scripts/install-deps.ps1
the five idempotent steps install-dependencies.bat ran (VS Build
Tools, CMake + Ninja, LLVM, Python + Qt 6.7.3, vcpkg) plus the
clang-format 22.1.4 pin CI actually checks with, which the .bat
never installed; the .bat now forwards here
scripts/build.ps1 [debug|release] [test]
same interface and the same vcvars/Qt/vcpkg discovery preamble,
rewritten onto cmake --preset / --build --preset / ctest --preset.
release test is refused: tests are a Debug concern, exactly like CI
scripts/ci-local.ps1 [-AllowMissing] [-WithInstaller]
every windows-ci.yml gate in CI's order; a missing tool fails unless
-AllowMissing, because a green run that silently skipped a gate is
worse than no run; -WithInstaller opts into the steps that really
install Dish on this machine
scripts/check-format.ps1 / check-qml.ps1 / check-tidy.ps1
the format, qmllint and clang-tidy gates as single sources shared by
the workflow and ci-local (check-tidy keeps CI's four-wide pwsh
recipe verbatim and adds a Windows PowerShell 5.1 fallback)
scripts/stage-bundle.ps1
the one bundle-staging path; see the workflow commit for the drift
it ends
The pre-commit hook and setup-hooks note follow the debug tree to build/
(the preset's binaryDir), and artifact/ joins .gitignore now that ci-local
stages it locally.
The workflows carried their own copies of the configure, build, test, lint
and staging commands, and those copies are exactly what drifted from the
local scripts and from each other. Each lane now calls the shared source:
* windows-ci: configure/build/ctest via the debug and release presets,
format via scripts/check-format.ps1, qmllint via check-qml.ps1,
clang-tidy via check-tidy.ps1 (the same four-wide recipe, relocated),
artifact staging via stage-bundle.ps1, installer compile via
scripts/build-installer.ps1
* codeql: configure via the release preset (still before CodeQL init, so
vcpkg builds stay untraced). Two deliberate deltas: the tree is
build-release, and DISH_REQUIRE_TRANSLATIONS is now ON like every other
lane (this lane's install-qt-action already provides Linguist)
* release: configure/build via the release preset (tree moves from build/
to build-release/, the iscc /DImageDir follows), bundle staging via
stage-bundle.ps1
Staging had real drift, not just duplication: release.yml's portable zip
shipped WITHOUT libcrypto-3-x64.dll, which dish.exe imports directly for
the Moonlight crypto, while windows-ci's artifact staged it. The release
portable-bundle smoke test never caught the difference because GitHub
runners carry a libcrypto-3-x64.dll on PATH via Strawberry Perl, so the
staged exe silently borrowed the runner's copy and the shipped zip could
not start on a clean machine. In the other direction, only release.yml
staged the licence texts, though the CI artifact is a downloadable
Combined Work under LGPLv3 s4(b) too. stage-bundle.ps1 stages the union
for both lanes.
Runner setup, caches, artifact uploads, signing, SHA256SUMS, latest.json,
harden, provenance and publish are untouched: only steps that duplicated a
local command moved.
README's Build from source section now tells the four-command story (install-deps, build, ci-local, build-installer) and names the preset directories (debug -> build/, CI's tree, replacing the old build-debug/); the Testing section drives ctest through the preset. CONTRIBUTING's setup and long-form sections move onto cmake --preset (keeping the vcvars import snippet), document ci-local and its -AllowMissing / -WithInstaller semantics, record that presets set DISH_REQUIRE_TRANSLATIONS=ON on purpose (local == CI) with the preset-less escape hatch for a box without Linguist, and the What CI runs list names the shared script or preset behind each step. CHANGELOG records the unification and the libcrypto-3-x64.dll fix to the released portable zip.
emir-hasanbegovic
force-pushed
the
feat/unified-build
branch
from
September 2, 2026 19:00
6325e36 to
b9c0a87
Compare
emir-hasanbegovic
enabled auto-merge (squash)
September 2, 2026 19:00
emir-hasanbegovic
added a commit
to TinkerNorth/dish-linux
that referenced
this pull request
Sep 2, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the fleet-wide build unification (satellite's landed inside TinkerNorth/satellite#88): local builds and CI now run through the same entry points, so they cannot drift. CMakePresets.json (new here) holds both configure lines; scripts/ gains install-deps, ci-local, check-format, check-qml, check-tidy, and stage-bundle; build.ps1 rides the presets; windows-ci.yml, codeql.yml, and release.yml call the shared scripts and keep only cache/artifact/signing glue.
Drift this killed: the local debug tree was build-debug while CI's was build (hook and clang-tidy now agree on build); local release builds forced tests ON where CI builds them OFF; DISH_REQUIRE_TRANSLATIONS differed; the local clang-format was unpinned. The staging unification also found a real shipping bug: the release zip never staged libcrypto-3-x64.dll (dish.exe imports it directly) and its smoke test passed only because GitHub runners carry one on PATH via Strawberry Perl - both lanes now stage the identical bundle from scripts/stage-bundle.ps1, which also brings the licence texts into the CI artifact.
scripts/ci-local.ps1 ran end to end on the dev box: format (456 files), pins, debug preset build, 2087/2087 ctest, qmllint (72), literal scanner, translations 6x1082, clang-tidy (93), release build, staged bundle (160 files, 14 portable-smoke checks), and build-installer produced dish-setup.exe 1.1.0. The installer round-trip stays CI-only by design (it really installs).
Stacked on #66 (both edit windows-ci.yml); will be rebased onto main once that merges.