Conversation
1526a7a to
24a7e39
Compare
24a7e39 to
c8d48e7
Compare
|
Rebased onto current What
What is still genuinely new here, and is the only reason to keep the PR open:
No overlap with The decision is whether to keep the CDash dashboard path or move these five jobs to direct What changed in this update
Why no testBUILD class. A GitHub Actions workflow has no runtime seam a ctest can observe; it is only exercised by a runner. Per the commit message, the individual |
03b4b67 to
b3c827a
Compare
The 'Build and Test' jobs drive everything through cmake/github_dashboard.cmake, so a failure is reported on CDash rather than in the job log, and the memcheck job does not fail at all: ctest -T memcheck exits 0 even when valgrind reports defects. Each job now configures, builds and tests directly: coverage with an lcov summary, valgrind memcheck followed by a step that fails on any non-zero ERROR SUMMARY or definite or indirect leak, a build with NIFTI_PACKAGE_PREFIX set, ASan and UBSan plus scan-build, and a macOS Release build. The submission to my.cdash.org is dropped; cmake/github_dashboard.cmake is left in place. The workflow cannot be run locally. The YAML parses and every cmake, ctest, valgrind and scan-build invocation in it was run by hand against this tree, but the jobs are unverified until a runner runs them. (cherry picked from commit b3c827a)
b3c827a to
075715d
Compare
The first commit fixes the workflow's trigger: it fires on branch
main, but this repository's default branch ismaster, so not oneof its jobs -- coverage, valgrind memcheck, scan-build, ASan+UBSan --
has ever executed. It also replaces the retired macos-11 runner and
the deprecated actions/checkout@v3.
The trigger alone is not enough to make 'Build and Test' work. Every job invokes cmake/travis_dashboard.cmake, which begins
and aborts with a FATAL_ERROR because GitHub Actions does not set that
variable. The script is a half-migrated hybrid: it wants
TRAVIS_APP_HOST from Travis and AGENT_BUILDDIRECTORY from Azure
Pipelines, and the workflow supplies only the latter. All five jobs
fail in about twenty seconds having compiled nothing.
Each job now configures, builds and tests directly:
coverage --coverage build, tests, an lcov summary
valgrind ctest -T memcheck, then a step that fails on any non-zero
ERROR SUMMARY or any definite or indirect leak
use_prefix builds with NIFTI_PACKAGE_PREFIX set
sanitize ASan and UBSan with -fno-sanitize-recover, then
scan-build --status-bugs
macos Release on macos-14
Three details are recorded in comments so they do not have to be
rediscovered:
valgrind will not start without libc6-dbg -- it reports that it
cannot redirect memcmp and exits;
its memcheck needs --trace-children=yes, because most of these tests
are shell scripts that exec nifti_tool. Without it valgrind
inspects the shell, finds nothing and reports a clean run;
ctest -T memcheck exits 0 even when valgrind reports defects, so the
following step greps the logs. That grep matches the error count
itself rather than the absence of a clean summary: with
--trace-children the concurrent processes share one log and their
lines interleave, and a real run produced
which an absence test would have accepted.
This also drops the submission to my.cdash.org. Posting results to the
project's public dashboard from every pull request, including ones from
forks, is not obviously wanted, and nothing else in the workflow needs
it. cmake/travis_dashboard.cmake is left in place; nothing else refers
to it.
Stated plainly: the workflow itself cannot be run locally. The YAML
parses, and every cmake, ctest, valgrind and scan-build invocation in it
was run by hand against this tree, but the jobs are unverified until
they run on a runner.
Interface impact: none. On the union of all these changes, configured with
USE_FSL_CODE=ONandUSE_CIFTI_CODE=ON: all 448 exported symbols acrosslibniftiio,libnifti2,libznz,libfslio,libnifticdfandlibciftiare identical tomasterundernm -D --defined-only, and all ten installed headers are identical undergcc -E -P. Undergcc -dM -Eone macro definition differs, intentionally and only in text: #61 makesFSL_RADIOLOGICALread(-1)so it is safe inside an expression. Its value is still-1, checked by compiling against each installedfslio.hand printing it.Verification. This branch: builds with gcc 16.1.1,
ctestunchanged frommaster(2 of 345 fail onmasteritself in this environment; #31 and #29 each fix one). The union of all the PRs: 0 errors under both gcc 16.1.1 and clang 22.1.8,ctest345/345 under each, and the whole suite under valgrind memcheck with--trace-children=yesgives 484 traced processes with no invalid access, no uninitialised value and no leak in any nifti binary.Coordination. Every line of every branch was compared, whitespace-normalised, against the diffs of the open PRs (#11, #21, #22, #23, #24). Where one of those already changes a line, the line was left alone, and the few deliberate overlaps are named in the text above. What survives is 17 compiler warnings, all of them on those lines: 9
-Wsign-conversion(5 infslio.cfor #22, 2 innifti2_io.cand 2 innifti_tester001.cfor #24) and 8-Wcalloc-transposed-argsinnifti_findhdrnameandnifti_findimgname, which #11 rewrites. No formatting changes appear anywhere, to stay clear of #10 and #12.One of a set of independent, single-purpose PRs. Each bases on
masterand can be merged on its own, in any order.The full set of PRs (35)
The union of all of them is on the fork as
all-changes, if you want to build and test the lot at once.CI and build
Configuration and documentation
Defects
Warning and check classes