Allow external libneo_ref trigger in CI#87
Conversation
632b0f4 to
d5f5c1b
Compare
d5f5c1b to
176345c
Compare
Add a libneo_ref workflow_dispatch input so an upstream libneo release can build NEO-2 against a candidate ref. Run the full golden-record job (incl. PAR and exact-vs-main checks) on dispatch, and scope LIBNEO_REF to the current-version build so the reference builds keep their own libneo and the golden-record comparison stays valid.
176345c to
6d2959e
Compare
A libneo-gate dispatch (workflow_dispatch without full) now builds NEO-2 against the candidate libneo and runs only the unit tests (make test). The reference builds, golden-record comparisons, QL performance and slow PAR steps run on push/PR as before and on a nightly 'full=true' dispatch. Keeps the per-PR gate under a minute of test time.
GeorgGrassler
left a comment
There was a problem hiding this comment.
@krystophny might I really advice to split the workflows in this case? The whole test-on-pr.yml is basically skip for your main use case. Could we not make an extra workflow just for the unit tests, that is always triggered? Would be in general an improvement and maybe easier to trigger from libneo. Then you can maybe skip the slow workflow completely and dont need to make those complicated combinations of triggers for each "long" job.
Move the libneo gate trigger out of the monolithic golden-record workflow. unit-tests.yml builds and runs make test on push, PR, and workflow_dispatch, honoring libneo_ref so the libneo per-PR gate can build NEO-2 against a candidate libneo. test-on-pr.yml reverts to the golden-record/performance/PAR suite on push/PR only, dropping the full flag and the per-step dispatch conditionals.
|
Done, split as you suggested.
libneo side (itpplasma/libneo#278): the gate now dispatches |
|
Merge order: this PR first, then itpplasma/libneo#278. |
|
@krystophny is the |
Rename the override from LIBNEO_GIT_TAG to LIBNEO_REF throughout.
cmake/Util.cmake now checks ${DEPENDENCY_UPPER}_REF (a CMake cache
variable) instead of _GIT_TAG; no $ENV{} read ever existed there, so
removing _GIT_TAG from the -D forwarding path is the complete fix.
Makefile unexports LIBNEO_REF, LIBNEO_PATH, LIBNEO_GIT_TAG, and
LIBNEO_BRANCH so that ambient shell values cannot reach cmake via
make's implicit env import. An explicit make LIBNEO_REF=<ref> still
forwards -DLIBNEO_REF=<ref> to cmake.
unit-tests.yml removes the env: LIBNEO_GIT_TAG block and passes the
ref directly as make LIBNEO_REF=${{ inputs.libneo_ref }} so the gate
contract is explicit, not env-mediated.
test-on-pr.yml: rename make LIBNEO_GIT_TAG= to make LIBNEO_REF=, and
remove the redundant "Run unit tests" step (make test) that duplicated
what unit-tests.yml already covers on every push/PR.
Readme.md: document make LIBNEO_REF=<ref> and -DLIBNEO_REF=<ref>.
|
Yes, the redundant |
find_or_fetch no longer reads $ENV{CODE}: libneo and other deps are
always fetched by default. A local checkout is selected only via the
explicit -D<DEP>_SOURCE_DIR= or -D<DEP>_PATH= cache option.
FGSL likewise drops the $ENV{CODE} prebuilt-path branch. It builds via
the bundled ExternalProject by default; -DFGSL_PATH= selects a local
prebuilt FGSL.
The reference build checks out the latest released NEO-2 whose Makefile and cmake/Util.cmake predate the LIBNEO_GIT_TAG->LIBNEO_REF rename. That release only honors LIBNEO_GIT_TAG, so passing only LIBNEO_REF left libneo unpinned, falling back to main where the LIBNEO::MyMPILib target was removed, breaking the reference build. Pass both names so the pin holds regardless of release age; the current Makefile unexports LIBNEO_GIT_TAG, so it is harmless there.
|
@krystophny what is the indent behind the last three commits? I though this was all done? |
|
Right, the split was done at
Done now. |
cmake find_or_fetch takes a local checkout only via -D<dep>_SOURCE_DIR; the LIBNEO_PATH alias is gone. The Makefile no longer references the pre-rename LIBNEO_GIT_TAG/LIBNEO_BRANCH; it just ignores an ambient LIBNEO_REF. The golden-record reference build still passes LIBNEO_GIT_TAG, which the old released Makefile needs. Remove the orphaned TEST/cmake/test_libneo_tag.sh that exercised the dropped name.
Wires NEO-2 into libneo's per-PR reverse-dependency gate (libneo branch feat/release-downstream-gate). NEO-2 is a fast-only downstream in the gate manifest: the gate dispatches this workflow with
-f libneo_ref=<sha>and never passesfull.This PR implements that dispatch contract:
unit-tests.yml(new): the workflow the gate dispatches. It must live onmainto be dispatchable.workflow_dispatchacceptslibneo_ref. The build step exports it asLIBNEO_GIT_TAG; the Makefile forwards-DLIBNEO_GIT_TAG=to cmake, andfind_or_fetch(libneo)incmake/Util.cmakeuses it as the FetchContentGIT_TAG, so NEO-2 builds against the candidate libneo. On push and PRlibneo_refis empty and the pinned libneo resolves as before.make testrunsctest --test-dir TEST, which covers only the fast unit tier (nrutil, mympilib, er_rotation; 30 s timeouts). The golden-record and PAR/QL reconstruction suites live inNEO-2-PAR/NEO-2-QLand stay intest-on-pr.ymlon push/PR only, so a gate dispatch runs the sub-minute set.Normal push/PR runs are unchanged.
Hermetic dependency fetching
Dependency resolution no longer reads
$ENV{CODE}, so the build is hermetic regardless of the ambient environment:cmake/Util.cmake:find_or_fetchdropped the$ENV{CODE}/<dep>bypass. libneo (and any other dep) is now always fetched via FetchContent by default. A local checkout is selected only through the explicit-D<DEP>_SOURCE_DIR=<path>cache option, or its alias-D<DEP>_PATH=<path>(e.g.-DLIBNEO_PATH=). The-DLIBNEO_REF=pin path is unchanged.COMMON/ProjectConfig.cmake.in: FGSL dropped the$ENV{CODE}/external/fgsl-1.6.0/prebuilt-path branch. FGSL builds via the bundled ExternalProject by default;-DFGSL_PATH=<dir>selects a local prebuilt FGSL. FGSL remains a live dependency on this branch; its removal is owned by the fortnum/drop-gsl migration, not this PR.Verification:
rg -i '\$ENV\{CODE\}'over the cmake sources returns nothing. A freshcmake -S . -B <dir> -G NinjawithCODEexported and a decoy$CODE/libneopresent logsUsing libneo branch main from https://github.com/itpplasma/libneo.gitand populates_deps/libneo-srcfrom the remote, confirming$CODEis ignored.-DLIBNEO_PATH=<path>switches to the local checkout (Using local libneo in <path>).Merge order: merge this PR first, then itpplasma/libneo#278.
unit-tests.ymlmust exist on NEO-2mainbefore libneo's gate can dispatch it. This PR is otherwise standalone (the workflow runs on its own push/PR), so it is safe to merge first.