refactor(ci): ♻️ make the justfile the single source of build commands - #326
Merged
Conversation
|
Docs preview: https://pr-326.monoprop-docs.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #326 +/- ##
=======================================
Coverage 97.70% 97.70%
=======================================
Files 14 14
Lines 742 742
Branches 98 98
=======================================
Hits 725 725
Misses 12 12
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more. |
robertodr
force-pushed
the
refactor/ci-justfile-single-source
branch
2 times, most recently
from
September 2, 2026 06:31
b6aaa2c to
8bfe617
Compare
robertodr
marked this pull request as ready for review
September 2, 2026 06:32
robertodr
requested review from
diagonal-hamiltonian,
fpietra and
ludmilaasb
as code owners
September 2, 2026 06:32
robertodr
requested review from
matteoacrossi
and removed request for
diagonal-hamiltonian and
fpietra
September 2, 2026 06:33
Workflows kept their own copies of the dependency install, the uv sync, and the build-info dump, which had drifted into five package lists and four sync spellings. A composite setup action now bootstraps just and uv and installs from the shared package lists, and every job builds through `just build`. Assisted-by: Pi:gpt-5.6-sol
Every test leg was spelled out in a workflow step: the sanitizer option sets, the MPI oversubscription variables, the ctest label filters and the rank loop. The legs are recipes now, so a developer runs what CI runs. The legs use --no-sync, so a test run cannot rebuild a differently configured wheel, and the serial Python leg drops -m "not mpi", which pytest-mpi already skips without --with-mpi. Assisted-by: Pi:gpt-5.6-sol
The find_package(monoprop) check was a heredoc that wrote a CMake project and a main.cpp into the runner, so it could not be run locally and its API exercise had already drifted from the in-tree link-export probe. It is a tracked standalone project now, compiling the probe's source so the in-tree and external consumers cannot diverge. That also compiles the probe's explicit instantiations against the installed headers. Assisted-by: Pi:gpt-5.6-sol
The recipe and the docs workflow passed lychee different flags, so the check a contributor ran was not the check CI ran. The flags live in .lychee.postbuild.toml now, which both read. lychee resolves a relative root_dir against the working directory, so the config needs no absolute path. The recipe was the wrong one of the two: its --index-files made lychee demand an index inside the asset directory the export writes beside each page, rather than fall back to the page itself. The config drops it. The workflow keeps calling lychee through its action: the runner images carry no lychee package. Assisted-by: Pi:gpt-5.6-sol
The macOS runners still ship bash 3.2, where mapfile does not exist and the
${var,,} expansion is a syntax error, so every macOS lane failed in the setup
action before it built anything.
Assisted-by: Pi:gpt-5.6-sol
A command pasted back into a run: block works until it drifts from the recipe it duplicates, and then a failing lane cannot be reproduced locally. Nothing caught that. The hook fails a workflow step that runs the build, test, coverage or packaging tools directly. Version probes are exempt, and the deliberate exceptions carry a reason. They are keyed by step name, and an entry matching no step is an error, so renaming an exempt step forces its exception to be reconsidered. Assisted-by: Pi:gpt-5.6-sol
robertodr
force-pushed
the
refactor/ci-justfile-single-source
branch
from
September 2, 2026 06:44
8bfe617 to
9eb9f30
Compare
diagonal-hamiltonian
previously approved these changes
Sep 2, 2026
diagonal-hamiltonian
left a comment
Collaborator
There was a problem hiding this comment.
Approve, but needs a comment sweep
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
robertodr
commented
Sep 2, 2026
Co-authored-by: Roberto Di Remigio Eikås <robertodr@users.noreply.github.com> Signed-off-by: Roberto Di Remigio Eikås <robertodr@users.noreply.github.com>
diagonal-hamiltonian
approved these changes
Sep 2, 2026
|
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.



🤖 AI text below 🤖
Summary
The workflows kept their own copies of commands a developer also runs: five dependency installs, four
uv syncspellings, the build-info dump, the sanitizer option sets, the MPI oversubscription variables, the CTest label filters, the rank loop, a 70-linefind_packageconsumer heredoc, and a second set of link-checker flags. They drifted, and a failing lane could not be reproduced locally without transcribing YAML. This makes the justfile the single source of truth for commands; workflows choose matrices, environment and artifacts. No library code changes.Changes
.github/actions/setup: installsjustand uv (cache keyed per build configuration) and the system packages. Replaces the dependency block in eight jobs.tools/packages/{apt,apt-mpi,brew,brew-mpi}.txt: the package lists as data, read by the action and by.devcontainer/Dockerfile(which installsjustitself, so it can share the data but not a recipe). The compiler package is derived fromCXX, so a matrix lane carries no list of its own.just build *ARGSis the onlyuv syncfor the package, spelled once in theuv_syncvariable.just inforeplaces the build-info heredoc.monoprop_ENABLE_MPIis now the only MPI switch: C++ build, mpi4py build requirement,mpiruntime extra, and the MPI packages CI installs. Serial builds drop the extra, sinceimport mpi4py.MPIraises with no runtime.test-py,test-cpp,test-cpp-mpi,test-py-mpi, plustest-cpp-asan,test-py-asan,sanitizer-reports,test-cpp-tsan.test,test-wideandtest-mpiare build bodies with dependencies on those legs.build_dirfollowsSKBUILD_CMAKE_BUILD_TYPE, so a sanitizer or coverage tree is found through the environment that built it. The two oversubscription variables are exported once instead of four times.cpp/tests/find_package_smoke/is a tracked standalone project, run byjust test-find-package, replacing the consumer programtest.ymlwrote inline. It compiles the in-treelink_export_probesource, so the exercised consumer and the in-tree probe cannot drift, and it links onlymonoprop::monoprop, as a downstream user does..lychee.postbuild.toml, read by bothjust check-doc-linksand the docs workflow. The recipe's--index-filesturned out to be the wrong half of that drift: it made lychee demand an index inside the asset directory the export writes beside each page instead of falling back to the page.tools/check-workflow-commands.py, a prek hook, fails any workflow step whoserun:block invokes the build, test, coverage or packaging tools directly. Version probes are exempt; the deliberate exceptions carry a reason and are keyed by step name, so an entry matching no step is itself an error.--no-sync, so a test run cannot silently rebuild a differently configured wheel; and the serial Python leg drops-m "not mpi", which pytest-mpi already skips without--with-mpi(what CI relied on).mapfileand${var,,}, neither of which exists in the bash 3.2 the macOS runners ship.AGENTS.md,README.md,cpp/tests/README.md,docs/content/docs/{building,testing,how-to-contribute}.mdx, including a stale reference to ajust test-mpi-matrixrecipe that never existed.qa-analysis.yml's clang-tidy invocation anddeploy.yml's packaging commands are deliberately left in the workflows, as recorded exceptions.Checklist
docs/,CONTRIBUTING.md) if neededCHANGELOG/ release notes updated if applicableAI/LLM disclosure