From 3312236e50f6b2506fe9a3be461b6077b39fcefe Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Mon, 21 Sep 2026 15:48:42 -0500 Subject: [PATCH 1/7] ENH: Declare the three functions that have a published counterpart FslGetHdrImgNames and FslSetIntensityScaling are defined here but declared nowhere, while FslGetIntensityScaling and FslInit are already published. axml_recur_find_xml sits beside axml_recur in afni_xml.h the same way. The upstream fslio was deleted in 2015 in favor of a C++ replacement, so this copy is the surviving one and its header is ours to correct. Additive; no symbol changes. --- cifti/afni_xml.h | 2 ++ fsliolib/fslio.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/cifti/afni_xml.h b/cifti/afni_xml.h index b48758af..ecc4ab3e 100644 --- a/cifti/afni_xml.h +++ b/cifti/afni_xml.h @@ -88,6 +88,8 @@ int axml_free_xlist(afni_xml_list * axlist); char * axml_attr_value(afni_xml_t * ax, const char * name); int axml_recur(int(*func)(FILE*,afni_xml_t*,int), afni_xml_t * ax); +afni_xml_t * axml_recur_find_xml(int (*func)(afni_xml_t *, int), afni_xml_t * ax, + int depth, int max_depth); /* control API */ diff --git a/fsliolib/fslio.h b/fsliolib/fslio.h index d979fd48..ab1edbd5 100644 --- a/fsliolib/fslio.h +++ b/fsliolib/fslio.h @@ -206,6 +206,8 @@ FSL_API int FslReadRawHeader(void *buffer, const char* filename); /* simple creation and clone/copy operations */ FSL_API FSLIO *FslInit(void); +FSL_API void FslGetHdrImgNames(const char* filename, const FSLIO* fslio, + char** hdrname, char** imgname); FSL_API void FslInitHeader(FSLIO *fslio, short t, size_t x, size_t y, size_t z, size_t v, float vx, float vy, float vz, float tr, @@ -233,6 +235,7 @@ FSL_API void FslGetTimeUnits(FSLIO *fslio, char *units); FSL_API void FslSetDataType(FSLIO *fslio, short t); FSL_API size_t FslGetDataType(FSLIO *fslio, short *t); FSL_API int FslGetIntensityScaling(FSLIO *fslio, float *slope, float *intercept); +FSL_API void FslSetIntensityScaling(FSLIO *fslio, float slope, float intercept); FSL_API void FslSetIntent(FSLIO *fslio, short intent_code, float p1, float p2, float p3); FSL_API short FslGetIntent(FSLIO *fslio, short *intent_code, float *p1, float *p2, float *p3); From 5b001aec9179cc23faeed70c77e4ae436ffe0191 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Mon, 21 Sep 2026 16:00:29 -0500 Subject: [PATCH 2/7] COMP: Give the fsliolib internal functions static linkage Nine functions in fslio.c have external linkage and no declaration in any header. Nothing in the tree calls them across a translation unit, AFNI's vendored copy never calls them, and no public source outside a vendored copy of this file references them, so a caller would have had to declare them itself. Seven of them are used within fslio.c and become static, with their prototypes collected in one block so the boundary between internal and published is visible in one place. FslSetVoxUnits and FslGetVoxUnits have no caller at all and are deleted. Removes nine exported symbols from libfslio. --- fsliolib/fslio.c | 54 ++++++++++++++---------------------------------- 1 file changed, 16 insertions(+), 38 deletions(-) diff --git a/fsliolib/fslio.c b/fsliolib/fslio.c index 39a9c3ea..2c81fb9b 100644 --- a/fsliolib/fslio.c +++ b/fsliolib/fslio.c @@ -28,6 +28,15 @@ #include "fslio.h" #include "assert.h" +/* Internal: no header declares these and nothing outside this file calls them. */ +static int FslIsValidFileType(int filetype); +static int FslGetFileType2(const FSLIO *fslio, int quiet); +static int FslFileType(const char *fname); +static int FslGetReadFileType(const FSLIO *fslio); +static void FslInit4Write(FSLIO* fslio, const char* filename, int ft); +static int fsl_fileexists(const char* fname); +static int check_for_multiple_filenames(const char* filename); + static int FslIgnoreMFQ=0; static int FslOverrideOutputType=-1; @@ -56,7 +65,7 @@ const char* FslFileTypeString(int filetype) } -int FslIsValidFileType(int filetype) +static int FslIsValidFileType(int filetype) { if ( (filetype!=FSL_TYPE_ANALYZE) && (filetype!=FSL_TYPE_ANALYZE_GZ) && (filetype!=FSL_TYPE_NIFTI) && (filetype!=FSL_TYPE_NIFTI_GZ) && @@ -85,7 +94,7 @@ int FslBaseFileType(int filetype) } -int FslGetFileType2(const FSLIO *fslio, int quiet) +static int FslGetFileType2(const FSLIO *fslio, int quiet) { if (fslio==NULL) FSLIOERR("FslGetFileType: Null pointer passed for FSLIO"); if ( (fslio->file_mode==FSL_TYPE_MINC) || (fslio->file_mode==FSL_TYPE_MINC_GZ) ) { @@ -188,7 +197,7 @@ int FslGetEnvOutputType(void) } -int FslFileType(const char* fname) +static int FslFileType(const char* fname) { /* return type is FSL_TYPE_* or -1 to indicate undetermined */ /* use name as first priority but if that is ambiguous then resolve using environment */ @@ -222,7 +231,7 @@ int FslFileType(const char* fname) /************************************************************ * FslGetReadFileType ************************************************************/ -/*! \fn int FslGetReadFileType(const FSLIO *fslio) +/*! \fn static int FslGetReadFileType(const FSLIO *fslio) \brief return the best estimate of the true file type This function is used to return the best estimate of the true file type once @@ -387,7 +396,7 @@ void FslSetInit(FSLIO* fslio) -void FslInit4Write(FSLIO* fslio, const char* filename, int ft) +static void FslInit4Write(FSLIO* fslio, const char* filename, int ft) { /* ft determines filetype if ft>=0*/ int imgtype; @@ -500,7 +509,7 @@ void FslCloneHeader(FSLIO *dest, const FSLIO *src) } -int fsl_fileexists(const char* fname) +static int fsl_fileexists(const char* fname) { znzFile fp; fp = znzopen( fname , "rb" , 1 ) ; @@ -557,7 +566,7 @@ int FslCheckForMultipleFileNames(const char* filename) -int check_for_multiple_filenames(const char* filename) +static int check_for_multiple_filenames(const char* filename) { char *basename, *tmpname; char *otype; @@ -1362,37 +1371,6 @@ void FslSetAuxFile(FSLIO *fslio,const char *aux_file) } -void FslSetVoxUnits(FSLIO *fslio, const char *units) -{ - int unitcode=0; - if (fslio==NULL) FSLIOERR("FslSetVoxUnits: Null pointer passed for FSLIO"); - if (fslio->niftiptr!=NULL) { - if (strcmp(units,nifti_units_string(NIFTI_UNITS_METER))==0) { - unitcode = NIFTI_UNITS_METER; - } else if (strcmp(units,nifti_units_string(NIFTI_UNITS_MM))==0) { - unitcode = NIFTI_UNITS_MM; - } else if (strcmp(units,nifti_units_string(NIFTI_UNITS_MICRON))==0) { - unitcode = NIFTI_UNITS_MICRON; - } - fslio->niftiptr->xyz_units = unitcode; - } - if (fslio->mincptr!=NULL) { - fprintf(stderr,"Warning:: Minc is not yet supported\n"); - } -} - - -void FslGetVoxUnits(FSLIO *fslio, char *units) -{ - if (fslio==NULL) FSLIOERR("FslGetVoxUnits: Null pointer passed for FSLIO"); - if (fslio->niftiptr!=NULL) { - strcpy(units,nifti_units_string(fslio->niftiptr->xyz_units)); - } - if (fslio->mincptr!=NULL) { - fprintf(stderr,"Warning:: Minc is not yet supported\n"); - } -} - void FslSetTimeUnits(FSLIO *fslio, const char *units) { int unitcode=0; From 6bc54a49d59889f6411326788f53f44e43174642 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Mon, 21 Sep 2026 16:00:38 -0500 Subject: [PATCH 3/7] COMP: Declare nifti_fileexists where it is defined nifti1_io.c and nifti2_io.c each define nifti_fileexists with external linkage, so libniftiio and libnifti2 export the same name and ELF link order decides which one a caller linking both resolves to. Declaring it locally silences the warning without choosing between publishing it and making it static; that choice needs the duplication settled first, and it covers a hundred names, not this one. The duplicate definition is left for a later change, because removing either copy or making it static alters the exported API. --- nifti2/nifti2_io.c | 3 +++ niftilib/nifti1_io.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/nifti2/nifti2_io.c b/nifti2/nifti2_io.c index 04f87771..c63f471a 100644 --- a/nifti2/nifti2_io.c +++ b/nifti2/nifti2_io.c @@ -475,6 +475,9 @@ static const nifti_type_ele nifti_type_list[] = { }; /*---------------------------------------------------------------------------*/ +/* also defined in libniftiio; both export it */ +int nifti_fileexists(const char* fname); + /* prototypes for internal functions - not part of exported library */ /* extension routines */ diff --git a/niftilib/nifti1_io.c b/niftilib/nifti1_io.c index 1c843bfd..7d60db05 100644 --- a/niftilib/nifti1_io.c +++ b/niftilib/nifti1_io.c @@ -414,6 +414,9 @@ static const nifti_type_ele nifti_type_list[] = { }; /*---------------------------------------------------------------------------*/ +/* also defined in libnifti2; both export it */ +int nifti_fileexists(const char* fname); + /* prototypes for internal functions - not part of exported library */ /* extension routines */ From ad5dfadc04e85bef30423ef761f5c6ecaf44cb83 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Fri, 6 Nov 2026 09:17:51 -0600 Subject: [PATCH 4/7] COMP: Label nifti2's dsets test as needing the test data nifti2's dsets_test runs nifti_tool against the fetched regression data, like its neighbors, but was the one test in that group without the NEEDS_DATA label. With DOWNLOAD_TEST_DATA=OFF, "ctest -LE NEEDS_DATA" therefore ran it against an empty data path and it failed writing //new_epi.nii. --- nifti2/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/nifti2/CMakeLists.txt b/nifti2/CMakeLists.txt index 758df0b9..020db6c3 100644 --- a/nifti2/CMakeLists.txt +++ b/nifti2/CMakeLists.txt @@ -160,6 +160,7 @@ if(NIFTI_BUILD_TESTING AND NIFTI_BUILD_APPLICATIONS) add_test( NAME ${TEST_PREFIX}_newfiles_test COMMAND sh ${NIFTI_TEST_SCRIPT_DIR}/newfiles_test.sh $ ${fetch_testing_data_SOURCE_DIR}/nifti_regress_data ) set_tests_properties(${TEST_PREFIX}_dci_test PROPERTIES LABELS NEEDS_DATA) + set_tests_properties(${TEST_PREFIX}_dsets_test PROPERTIES LABELS NEEDS_DATA) set_tests_properties(${TEST_PREFIX}_comment_test PROPERTIES LABELS NEEDS_DATA) set_tests_properties(${TEST_PREFIX}_newfiles_test PROPERTIES LABELS NEEDS_DATA) From eb90e6bd1a4372ecf1b67bbe41607b621c30e0f1 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Mon, 21 Sep 2026 13:43:13 -0500 Subject: [PATCH 5/7] COMP: Finish the migration from Travis to GitHub Actions The 2025 conversion to GitHub Actions replaced .travis.yml with two workflows but left the dashboard script untouched, so it still required a Travis environment. The workflow that drives it named the wrong branch and never ran, which is why nothing surfaced the mismatch. Rename travis_dashboard.cmake to github_dashboard.cmake and take its inputs from the runner that actually exists. CTEST_SITE now comes from RUNNER_OS rather than the required TRAVIS_APP_HOST, whose absence aborted the script before it configured anything, and the build name carries RUNNER_OS in place of TRAVIS_OS_NAME. Compare the branch name against its value rather than against the literal string "ENV{BUILD_SOURCEBRANCHNAME}", and give the workflow a branch name on push events as well as on pull requests. Test the pull request variables for a value rather than for being defined, since the workflow sets them empty on push events. A push to master is now Continuous and a pull request Experimental; Nightly still needs a scheduled trigger, which the workflow does not have. Set dashboard_loop to 0, since a Continuous run otherwise polls for 12 hours and would hold every master job until the runner timeout. Restore what .travis.yml built: interprocedural optimization on the coverage, use_prefix, and release entries, and NIFTI_PACKAGE_PREFIX test_ on use_prefix. The dashboard script now passes the prefix into the cache; under Travis it was set but never read. Apply the same corrections to local_dashboard.cmake, whose build name starts with "local" when RUNNER_OS is unset. --- .github/workflows/build.yml | 9 +++++++-- ...dashboard.cmake => github_dashboard.cmake} | 19 ++++++++++++------- cmake/local_dashboard.cmake | 17 ++++++++++------- 3 files changed, 29 insertions(+), 16 deletions(-) rename cmake/{travis_dashboard.cmake => github_dashboard.cmake} (84%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bdbbab90..26e02b43 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,7 @@ jobs: cxxflags: "-g -O0 -Wall -Wextra -m64 -W -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage" ldflags: "-fprofile-arcs -ftest-coverage -lgcov" bldprefix: coverage + interprocedural_optimization: "ON" bname: system_gcc with_coverage: "ON" with_memcheck: "OFF" @@ -49,6 +50,8 @@ jobs: cxxflags: "" ldflags: "" bldprefix: use_prefix + interprocedural_optimization: "ON" + package_prefix: "test_" bname: system_gcc with_coverage: "OFF" with_memcheck: "OFF" @@ -75,6 +78,7 @@ jobs: cxxflags: "-O3 -Wall -Wextra -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Wwrite-strings" ldflags: "" bldprefix: rel + interprocedural_optimization: "ON" bname: osx_clang with_coverage: "OFF" with_memcheck: "OFF" @@ -86,7 +90,7 @@ jobs: AGENT_BUILDDIRECTORY: ${{ github.workspace }}/NIFTIworkspace BUILD_SOURCESDIRECTORY: ${{ github.workspace }} SYSTEM_PULLREQUEST_SOURCEBRANCH: ${{ github.head_ref }} - BUILD_SOURCEBRANCHNAME: ${{ github.head_ref }} + BUILD_SOURCEBRANCHNAME: ${{ github.head_ref || github.ref_name }} BUILD_BUILDID: ${{ github.run_id }} SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.pull_request.number }} CTEST_SCRIPT_DIRECTORY: ${{ github.workspace }}/cmake @@ -118,6 +122,7 @@ jobs: echo "WITH_COVERAGE=${{ matrix.with_coverage }}" >> $GITHUB_ENV echo "WITH_MEMCHECK=${{ matrix.with_memcheck }}" >> $GITHUB_ENV echo "NIFTI_SHELL_SCRIPT_TESTS=${{ matrix.shell_tests }}" >> $GITHUB_ENV + echo "NIFTI_PACKAGE_PREFIX=${{ matrix.package_prefix }}" >> $GITHUB_ENV echo "SCANBUILD_EXE=${{ matrix.scanbuild }}" >> $GITHUB_ENV - name: Show Environment Info @@ -131,5 +136,5 @@ jobs: - name: Run CTest run: | - eval $SCANBUILD_EXE ctest -S ${CTEST_SCRIPT_DIRECTORY}/travis_dashboard.cmake -V -j 4 + eval $SCANBUILD_EXE ctest -S ${CTEST_SCRIPT_DIRECTORY}/github_dashboard.cmake -V -j 4 diff --git a/cmake/travis_dashboard.cmake b/cmake/github_dashboard.cmake similarity index 84% rename from cmake/travis_dashboard.cmake rename to cmake/github_dashboard.cmake index 680e0031..d42eec39 100644 --- a/cmake/travis_dashboard.cmake +++ b/cmake/github_dashboard.cmake @@ -21,9 +21,12 @@ function(set_from_env var env_var) endif() endfunction() -set_from_env(CTEST_SITE "TRAVIS_APP_HOST" REQUIRED) -set(CTEST_SITE "travis.${CTEST_SITE}") +# RUNNER_OS is set by GitHub Actions ("Linux", "macOS", "Windows"). +set_from_env(CTEST_SITE "RUNNER_OS" DEFAULT "unknown") +set(CTEST_SITE "github.${CTEST_SITE}") set(CTEST_UPDATE_VERSION_ONLY 1) +# One pass per CI job; the Continuous model would otherwise poll for 12 hours. +set(dashboard_loop 0) # https://gitlab.kitware.com/cmake/community/wikis/doc/ctest/Scripting-Of-CTest find_program(CTEST_GIT_COMMAND NAMES git) @@ -47,19 +50,20 @@ set_from_env(BUILD_SHARED_LIBS "BUILD_SHARED_LIBS" DEFAULT "ON") set_from_env(BUILD_EXAMPLES "BUILD_EXAMPLES" DEFAULT "ON") set_from_env(INTERPROCEDURAL_OPTIMIZATION "INTERPROCEDURAL_OPTIMIZATION" DEFAULT "ON") set_from_env(NIFTI_SHELL_SCRIPT_TESTS "NIFTI_SHELL_SCRIPT_TESTS" DEFAULT "ON") +set_from_env(NIFTI_PACKAGE_PREFIX "NIFTI_PACKAGE_PREFIX" DEFAULT "") set_from_env(dashboard_do_coverage "WITH_COVERAGE" DEFAULT "OFF") set_from_env(dashboard_do_memcheck "WITH_MEMCHECK" DEFAULT "OFF") if(NOT CTEST_BUILD_NAME) - if(DEFINED ENV{SYSTEM_PULLREQUEST_SOURCEBRANCH}) + if(NOT "$ENV{SYSTEM_PULLREQUEST_SOURCEBRANCH}" STREQUAL "") set(branch "-$ENV{SYSTEM_PULLREQUEST_SOURCEBRANCH}") set(dashboard_git_branch "$ENV{SYSTEM_PULLREQUEST_SOURCEBRANCH}") set(dashboard_model "Experimental") - elseif(ENV{BUILD_SOURCEBRANCHNAME} STREQUAL "master") + elseif("$ENV{BUILD_SOURCEBRANCHNAME}" STREQUAL "master") set(branch "-master") set(dashboard_git_branch "$ENV{BUILD_SOURCEBRANCHNAME}") set(dashboard_model "Continuous") - elseif(ENV{BUILD_SOURCEBRANCHNAME} STREQUAL "nightly-master") + elseif("$ENV{BUILD_SOURCEBRANCHNAME}" STREQUAL "nightly-master") set(branch "-nightly-master") set(dashboard_git_branch "$ENV{BUILD_SOURCEBRANCHNAME}") set(dashboard_model "Nightly") @@ -69,14 +73,14 @@ if(NOT CTEST_BUILD_NAME) set(dashboard_model "Experimental") endif() - if(DEFINED ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}) + if(NOT "$ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}" STREQUAL "") set(pr "-PR$ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}") else() set(pr "") endif() set(CTEST_BUILD_NAME - "$ENV{BLDPREFIX}_$ENV{TRAVIS_OS_NAME}-$ENV{BUILD_BUILDID}_${pr}_${branch}") + "$ENV{BLDPREFIX}_$ENV{RUNNER_OS}-$ENV{BUILD_BUILDID}${pr}${branch}") endif() set(dashboard_cache " @@ -87,6 +91,7 @@ set(dashboard_cache " CMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=${INTERPROCEDURAL_OPTIMIZATION} NIFTI_BUILD_APPLICATIONS:BOOL=ON NIFTI_SHELL_SCRIPT_TESTS:BOOL=${NIFTI_SHELL_SCRIPT_TESTS} + NIFTI_PACKAGE_PREFIX:STRING=${NIFTI_PACKAGE_PREFIX} USE_FSL_CODE:BOOL=ON USE_CIFTI_CODE:BOOL=ON USE_NIFTI2_CODE:BOOL=ON diff --git a/cmake/local_dashboard.cmake b/cmake/local_dashboard.cmake index a69588c1..8846de60 100644 --- a/cmake/local_dashboard.cmake +++ b/cmake/local_dashboard.cmake @@ -32,9 +32,8 @@ function(set_from_env var env_var) endif() endfunction() -#set_from_env(CTEST_SITE "TRAVIS_APP_HOST" REQUIRED) cmake_host_system_information(RESULT CTEST_SITE QUERY HOSTNAME) -set(CTEST_SITE "travis.${CTEST_SITE}") +set(CTEST_SITE "local.${CTEST_SITE}") set(CTEST_UPDATE_VERSION_ONLY 1) set_from_env(PARALLEL_LEVEL "PARALLEL_LEVEL" DEFAULT 8) @@ -55,15 +54,15 @@ set_from_env(BUILD_EXAMPLES "BUILD_EXAMPLES" DEFAULT "ON") set_from_env(INTERPROCEDURAL_OPTIMIZATION "INTERPROCEDURAL_OPTIMIZATION" DEFAULT "ON") if(NOT CTEST_BUILD_NAME) - if(DEFINED ENV{SYSTEM_PULLREQUEST_SOURCEBRANCH}) + if(NOT "$ENV{SYSTEM_PULLREQUEST_SOURCEBRANCH}" STREQUAL "") set(branch "-$ENV{SYSTEM_PULLREQUEST_SOURCEBRANCH}") set(dashboard_git_branch "$ENV{SYSTEM_PULLREQUEST_SOURCEBRANCH}") set(dashboard_model "Experimental") - elseif(ENV{BUILD_SOURCEBRANCHNAME} STREQUAL "master") + elseif("$ENV{BUILD_SOURCEBRANCHNAME}" STREQUAL "master") set(branch "-master") set(dashboard_git_branch "$ENV{BUILD_SOURCEBRANCHNAME}") set(dashboard_model "Continuous") - elseif(ENV{BUILD_SOURCEBRANCHNAME} STREQUAL "nightly-master") + elseif("$ENV{BUILD_SOURCEBRANCHNAME}" STREQUAL "nightly-master") set(branch "-nightly-master") set(dashboard_git_branch "$ENV{BUILD_SOURCEBRANCHNAME}") set(dashboard_model "Nightly") @@ -73,14 +72,18 @@ if(NOT CTEST_BUILD_NAME) set(dashboard_model "Experimental") endif() - if(DEFINED ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}) + if(NOT "$ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}" STREQUAL "") set(pr "-PR$ENV{SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}") else() set(pr "") endif() + set(runner_os "$ENV{RUNNER_OS}") + if(runner_os STREQUAL "") + set(runner_os "local") + endif() set(CTEST_BUILD_NAME - "$ENV{TRAVIS_OS_NAME}-$ENV{BUILD_BUILDID}${pr}${branch}") + "${runner_os}-$ENV{BUILD_BUILDID}${pr}${branch}") endif() set(dashboard_cache " From 4a0d3e0bed2082128d5f0cd2b05413e705e58158 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Mon, 21 Sep 2026 13:10:46 -0500 Subject: [PATCH 6/7] COMP: Widen CI coverage across platforms, linkage, and configurations Run the Build and Test workflow on this repository's branch. Its trigger named "main" while the branch is "master", so it had never executed on master and did not execute on pull requests; valgrind, AddressSanitizer, UndefinedBehaviorSanitizer, scan-build, gcov coverage, and the only shared-library configuration were all unexercised. Also move its macOS entry off the retired macos-11 image. Its dashboard fails on any compiler warning; the -Wmissing-declarations warnings it would report on master are fixed by the preceding commits. Restructure the per-PR matrix around the axes that change what is compiled: shared BUILD_SHARED_LIBS gates TEST_INSTALL, so the ON legs are the first to run install_linking and cover the install and export path. The matrix checks out the tags, so the installed package carries the version that find_package(NIFTI 3) requires. fslstyle -DFSLSTYLE is not additive. It rewrites behavior in niftilib and nifti2 through global -DFSLSTYLE, -DPIGZ and -DREJECT_COMPLEX, and one site has an #else that changes the pixdim[0] value written to disk. Neither value subsumes the other. build_type One static Debug leg, which is what makes assert() live. Drop both macos gcc legs: /usr/bin/gcc there is a clang shim reporting AppleClang, so they duplicated the macos clang legs exactly. The optional libraries are built everywhere rather than forming an axis, since they are additive. Add four jobs. The default job configures with no options, the configuration a consumer gets out of the box. The minimal configuration builds znzlib and niftilib alone, which is what a downstream project vendoring the core reader selects and which nothing else configures. The oldest supported CMake job guards cmake_minimum_required, invisible to runners that all carry a recent CMake: it installs CMake 3.10.2 from the Kitware release and configures, builds, and runs the tests that need no data, since the test data download uses FetchContent and so needs 3.11. The exported symbol baseline diffs the dynamic symbol set against a committed file, so a change to the ABI has to be updated in the same commit rather than landing unnoticed. Verified on Ubuntu 24.04 with GCC 13.3.0, the compiler the Linux runners use: shared, Release, FSLSTYLE=OFF 345/345, install_linking passed static, Debug, FSLSTYLE=ON 344/344, no assertion aborts minimal configures and builds, no tests CMake 3.10.2 (macOS, no data) 280/280 with -LE NEEDS_DATA The baseline holds 439 symbols across six libraries: the 448 the linkage changes have been asserting, less the nine fsliolib functions the preceding commits made internal. The workflow steps were exercised by running them directly in the runner container image rather than through act, whose image omits cmake. --- .github/workflows/build.yml | 6 +- .github/workflows/cmake-multi-platform.yml | 167 ++++++-- cmake/collect_exported_symbols.sh | 60 +++ cmake/exported_symbols_linux.txt | 439 +++++++++++++++++++++ 4 files changed, 638 insertions(+), 34 deletions(-) create mode 100755 cmake/collect_exported_symbols.sh create mode 100644 cmake/exported_symbols_linux.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26e02b43..8be60b85 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Build and Test on: push: - branches: [ main ] + branches: [ master ] pull_request: - branches: [ main ] + branches: [ master ] jobs: build: @@ -71,7 +71,7 @@ jobs: shell_tests: "ON" - name: rel-clang-macos - os: macos-11 + os: macos-latest compiler: clang scanbuild: "" cflags: "-O3 -Wall -Wextra -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Wwrite-strings" diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 21d0cad3..7a629f2d 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -1,5 +1,9 @@ -# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml +# Per-PR build and test matrix; one line per axis: +# os / c_compiler GNU, Clang, and AppleClang (macOS gcc is a clang shim). +# shared BUILD_SHARED_LIBS=ON also enables the install and export test. +# fslstyle -DFSLSTYLE changes behavior and on-disk output, so both values run. +# build_type one static Debug leg makes the library's assert() sites live. + name: CMake on multiple platforms on: @@ -10,73 +14,174 @@ on: jobs: build: + name: ${{ matrix.os }} ${{ matrix.c_compiler }} ${{ matrix.build_type }} shared=${{ matrix.shared }} fslstyle=${{ matrix.fslstyle }} runs-on: ${{ matrix.os }} strategy: - # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. fail-fast: false - - # Set up a matrix to run the following 3 configurations: - # 1. - # 2. - # 3. - # - # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. matrix: os: [ubuntu-latest, macos-latest] - build_type: [Release] c_compiler: [gcc, clang] - # 'default' is what a consumer gets with no options; 'all' turns on - # the optional libraries and the FSL parity defines, which are the - # code paths no workflow compiled before. - options: [default, all] + build_type: [Release] + shared: ["OFF", "ON"] + fslstyle: ["OFF", "ON"] include: - - os: macos-latest - c_compiler: clang - cpp_compiler: clang++ - os: ubuntu-latest c_compiler: gcc cpp_compiler: g++ - os: ubuntu-latest c_compiler: clang cpp_compiler: clang++ - exclude: + - os: macos-latest + c_compiler: clang + cpp_compiler: clang++ + # Single Debug leg; FSLSTYLE=ON reaches the asserts behind those defines. - os: ubuntu-latest - c_compiler: cl + c_compiler: gcc + cpp_compiler: g++ + build_type: Debug + shared: "OFF" + fslstyle: "ON" + exclude: + # /usr/bin/gcc on macOS is a clang shim, so this would duplicate the clang leg. + - os: macos-latest + c_compiler: gcc steps: - uses: actions/checkout@v4 + with: + # Tags set the version that install_linking's find_package(NIFTI 3) checks. + fetch-depth: 0 - name: Install optional dependencies - # cifti needs expat; only the 'all' configuration builds it. - if: runner.os == 'Linux' && matrix.options == 'all' + if: runner.os == 'Linux' run: sudo apt-get update && sudo apt-get install -y libexpat1-dev zlib1g-dev - name: Set reusable strings - # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. id: strings shell: bash - run: | - echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + run: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > cmake -B ${{ steps.strings.outputs.build-output-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - ${{ matrix.options == 'all' && '-DUSE_CIFTI_CODE=ON -DUSE_FSL_CODE=ON -DFSLSTYLE=ON' || '' }} + -DBUILD_SHARED_LIBS=${{ matrix.shared }} + -DUSE_CIFTI_CODE=ON + -DUSE_FSL_CODE=ON + -DFSLSTYLE=${{ matrix.fslstyle }} -S ${{ github.workspace }} - name: Build - # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} - name: Test working-directory: ${{ steps.strings.outputs.build-output-dir }} - # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest --build-config ${{ matrix.build_type }} --output-on-failure + default: + # What a consumer gets from a plain "cmake -B build" with no options. + name: default configuration (no options) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure CMake + run: cmake -B ${{ github.workspace }}/build -S ${{ github.workspace }} + - name: Build + run: cmake --build ${{ github.workspace }}/build + - name: Test + working-directory: ${{ github.workspace }}/build + run: ctest --output-on-failure + + minimal: + # The core-reader-only configuration a vendoring project selects. + name: minimal configuration (znzlib + niftilib only) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure CMake + run: > + cmake -B ${{ github.workspace }}/build + -DCMAKE_BUILD_TYPE=Release + -DUSE_NIFTI2_CODE=OFF + -DUSE_NIFTICDF_CODE=OFF + -DUSE_CIFTI_CODE=OFF + -DUSE_FSL_CODE=OFF + -DNIFTI_BUILD_APPLICATIONS=OFF + -DDOWNLOAD_TEST_DATA=OFF + -S ${{ github.workspace }} + - name: Build + run: cmake --build ${{ github.workspace }}/build + - name: Test + working-directory: ${{ github.workspace }}/build + # No tests are registered without the applications; the job checks configure and build. + run: ctest --output-on-failure --no-tests=ignore + + oldest-cmake: + # Builds with the cmake_minimum_required release; the data tests need FetchContent (3.11). + name: oldest supported CMake (3.10.2, tests without data) + runs-on: ubuntu-24.04 + env: + CMAKE_OLDEST: 3.10.2 + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y libexpat1-dev zlib1g-dev + - name: Install CMake ${{ env.CMAKE_OLDEST }} + run: | + curl -sSfL -o "$RUNNER_TEMP/cmake.tar.gz" \ + "https://github.com/Kitware/CMake/releases/download/v${CMAKE_OLDEST}/cmake-${CMAKE_OLDEST}-Linux-x86_64.tar.gz" + tar -xzf "$RUNNER_TEMP/cmake.tar.gz" -C "$RUNNER_TEMP" + echo "$RUNNER_TEMP/cmake-${CMAKE_OLDEST}-Linux-x86_64/bin" >> "$GITHUB_PATH" + - name: Show CMake version + run: cmake --version | grep -F "cmake version ${CMAKE_OLDEST}" + - name: Configure CMake + run: > + cmake -B${{ github.workspace }}/build + -H${{ github.workspace }} + -DCMAKE_BUILD_TYPE=Release + -DUSE_CIFTI_CODE=ON + -DUSE_FSL_CODE=ON + -DDOWNLOAD_TEST_DATA=OFF + - name: Build + run: cmake --build ${{ github.workspace }}/build -- -j4 + - name: Test + working-directory: ${{ github.workspace }}/build + run: ctest --output-on-failure -LE NEEDS_DATA + + exported-symbols: + # An intended ABI change updates the baseline in the same commit, so review sees it. + name: exported symbol baseline + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y libexpat1-dev zlib1g-dev ninja-build + - name: Configure CMake + run: > + cmake -G Ninja -B ${{ github.workspace }}/build + -DCMAKE_BUILD_TYPE=Release + -DBUILD_SHARED_LIBS=ON + -DUSE_CIFTI_CODE=ON + -DUSE_FSL_CODE=ON + -S ${{ github.workspace }} + - name: Build + run: cmake --build ${{ github.workspace }}/build + - name: Collect exported symbols + run: | + sh cmake/collect_exported_symbols.sh \ + "${{ github.workspace }}/build" \ + /tmp/exported_symbols.txt + - name: Compare against the committed baseline + run: | + if ! diff -u cmake/exported_symbols_linux.txt /tmp/exported_symbols.txt; then + echo "" + echo "The exported symbol set changed." + echo "If that is intended, update cmake/exported_symbols_linux.txt" + echo "in this commit so the ABI change is visible in review:" + echo " sh cmake/collect_exported_symbols.sh cmake/exported_symbols_linux.txt" + exit 1 + fi + echo "Exported symbols match the baseline." diff --git a/cmake/collect_exported_symbols.sh b/cmake/collect_exported_symbols.sh new file mode 100755 index 00000000..b1d884d5 --- /dev/null +++ b/cmake/collect_exported_symbols.sh @@ -0,0 +1,60 @@ +#!/bin/sh +# Collect the dynamic symbols exported by the built shared libraries. +# Linux/ELF only: it reads lib*.so with GNU nm -D. +# +# collect_exported_symbols.sh +# +# The output is sorted " " lines, so a diff against the +# committed baseline names both the library and the symbol that moved. +# +# The library name is reported with any version suffix stripped, so a +# SOVERSION bump does not rewrite every line of the baseline: +# libniftiio.so.3.0.0 is reported as libniftiio.so. +# +# Regenerate the baseline after an intended ABI change: +# cmake -B build -DBUILD_SHARED_LIBS=ON -DUSE_CIFTI_CODE=ON -DUSE_FSL_CODE=ON +# cmake --build build +# sh cmake/collect_exported_symbols.sh build cmake/exported_symbols_linux.txt + +set -eu + +if [ $# -ne 2 ]; then + echo "usage: $0 " >&2 + exit 2 +fi + +build_dir=$1 +output=$2 + +if [ ! -d "$build_dir" ]; then + echo "$0: no such build directory: $build_dir" >&2 + exit 1 +fi + +# Match versioned sonames too (libfoo.so.3.0.0), and resolve symlinks so +# libfoo.so -> libfoo.so.3.0.0 is not counted twice. +find "$build_dir" -name 'lib*.so*' -exec readlink -f {} \; \ + | LC_ALL=C sort -u > "$output.libs" + +if [ ! -s "$output.libs" ]; then + rm -f "$output.libs" + echo "$0: no shared libraries under $build_dir;" \ + "configure with -DBUILD_SHARED_LIBS=ON" >&2 + exit 1 +fi + +: > "$output.tmp" + +# nm writes to a file, not a pipe, so set -e sees its exit status. +while IFS= read -r lib; do + name=$(basename "$lib" | sed -E 's/\.so(\.[0-9]+)*$/.so/') + nm -D --defined-only "$lib" > "$output.nm" + awk -v name="$name" 'NF >= 3 && $3 != "" { print name, $3 }' \ + "$output.nm" >> "$output.tmp" +done < "$output.libs" + +LC_ALL=C sort -u "$output.tmp" > "$output" +rm -f "$output.tmp" "$output.nm" "$output.libs" + +echo "$0: wrote $(wc -l < "$output") symbols from" \ + "$(awk '{print $1}' "$output" | LC_ALL=C sort -u | wc -l) libraries to $output" diff --git a/cmake/exported_symbols_linux.txt b/cmake/exported_symbols_linux.txt new file mode 100644 index 00000000..042959f5 --- /dev/null +++ b/cmake/exported_symbols_linux.txt @@ -0,0 +1,439 @@ +libcifti.so axio_cifti_from_ext +libcifti.so axio_find_map_name +libcifti.so axio_num_tokens +libcifti.so axio_read_buf +libcifti.so axio_read_cifti_file +libcifti.so axio_read_file +libcifti.so axio_show_attrs +libcifti.so axio_show_cifti_summary +libcifti.so axio_show_mim_summary +libcifti.so axio_text_to_binary +libcifti.so axml_add_attrs +libcifti.so axml_attr_value +libcifti.so axml_disp_xlist +libcifti.so axml_disp_xml_t +libcifti.so axml_free_xlist +libcifti.so axml_free_xml_t +libcifti.so axml_get_buf_size +libcifti.so axml_get_dstore +libcifti.so axml_get_indent +libcifti.so axml_get_verb +libcifti.so axml_get_wstream +libcifti.so axml_read_buf +libcifti.so axml_read_file +libcifti.so axml_recur +libcifti.so axml_recur_find_xml +libcifti.so axml_set_buf_size +libcifti.so axml_set_dstore +libcifti.so axml_set_indent +libcifti.so axml_set_verb +libcifti.so axml_set_wstream +libcifti.so new_afni_xml +libfslio.so AvwSwapHeader +libfslio.so FslBaseFileType +libfslio.so FslCheckForMultipleFileNames +libfslio.so FslCloneHeader +libfslio.so FslClose +libfslio.so FslFileExists +libfslio.so FslFileTypeString +libfslio.so FslGetAnalyzeOrigin +libfslio.so FslGetAuxFile +libfslio.so FslGetBufferAsScaledDouble +libfslio.so FslGetCalMinMax +libfslio.so FslGetDataType +libfslio.so FslGetDim +libfslio.so FslGetDimensionality +libfslio.so FslGetEnvOutputType +libfslio.so FslGetFileType +libfslio.so FslGetHdrImgNames +libfslio.so FslGetIgnoreMFQ +libfslio.so FslGetIntensityScaling +libfslio.so FslGetIntent +libfslio.so FslGetLeftRightOrder +libfslio.so FslGetMMCoord +libfslio.so FslGetOverrideOutputType +libfslio.so FslGetRigidXform +libfslio.so FslGetStdXform +libfslio.so FslGetTimeUnits +libfslio.so FslGetVolSize +libfslio.so FslGetVolumeAsScaledDouble +libfslio.so FslGetVoxCoord +libfslio.so FslGetVoxDim +libfslio.so FslGetWriteMode +libfslio.so FslInit +libfslio.so FslInitHeader +libfslio.so FslIsCompressedFileType +libfslio.so FslIsSingleFileType +libfslio.so FslMakeBaseName +libfslio.so FslOpen +libfslio.so FslReadAllVolumes +libfslio.so FslReadHeader +libfslio.so FslReadRawHeader +libfslio.so FslReadRowSeries +libfslio.so FslReadSliceSeries +libfslio.so FslReadTimeSeries +libfslio.so FslReadVolumes +libfslio.so FslSeekVolume +libfslio.so FslSetAnalyzeSform +libfslio.so FslSetAuxFile +libfslio.so FslSetCalMinMax +libfslio.so FslSetDataType +libfslio.so FslSetDim +libfslio.so FslSetDimensionality +libfslio.so FslSetFileType +libfslio.so FslSetIgnoreMFQ +libfslio.so FslSetInit +libfslio.so FslSetIntensityScaling +libfslio.so FslSetIntent +libfslio.so FslSetOverrideOutputType +libfslio.so FslSetRigidXform +libfslio.so FslSetStdXform +libfslio.so FslSetTimeUnits +libfslio.so FslSetVoxDim +libfslio.so FslSetWriteMode +libfslio.so FslWriteAllVolumes +libfslio.so FslWriteHeader +libfslio.so FslWriteVolumes +libfslio.so FslXOpen +libfslio.so convertBufferToScaledDouble +libfslio.so d3matrix +libfslio.so d4matrix +libfslio.so mat44_to_mat33 +libnifti2.so disp_nifti_1_header +libnifti2.so disp_nifti_2_header +libnifti2.so is_nifti_file +libnifti2.so is_valid_nifti_type +libnifti2.so nifti1_magic +libnifti2.so nifti2_magic +libnifti2.so nifti_add_extension +libnifti2.so nifti_alter_cifti_dims +libnifti2.so nifti_compiled_with_zlib +libnifti2.so nifti_convert_n1hdr2nim +libnifti2.so nifti_convert_n2hdr2nim +libnifti2.so nifti_convert_nim2n1hdr +libnifti2.so nifti_convert_nim2n2hdr +libnifti2.so nifti_copy_extensions +libnifti2.so nifti_copy_nim_info +libnifti2.so nifti_datatype_from_string +libnifti2.so nifti_datatype_is_valid +libnifti2.so nifti_datatype_sizes +libnifti2.so nifti_datatype_string +libnifti2.so nifti_datatype_to_string +libnifti2.so nifti_disp_lib_hist +libnifti2.so nifti_disp_lib_version +libnifti2.so nifti_disp_matrix_orient +libnifti2.so nifti_disp_type_list +libnifti2.so nifti_dmat33_colnorm +libnifti2.so nifti_dmat33_determ +libnifti2.so nifti_dmat33_inverse +libnifti2.so nifti_dmat33_mul +libnifti2.so nifti_dmat33_polar +libnifti2.so nifti_dmat33_rownorm +libnifti2.so nifti_dmat44_inverse +libnifti2.so nifti_dmat44_mul +libnifti2.so nifti_dmat44_to_mat44 +libnifti2.so nifti_dmat44_to_orientation +libnifti2.so nifti_dmat44_to_quatern +libnifti2.so nifti_fileexists +libnifti2.so nifti_find_file_extension +libnifti2.so nifti_findhdrname +libnifti2.so nifti_findimgname +libnifti2.so nifti_free_NBL +libnifti2.so nifti_free_extensions +libnifti2.so nifti_get_alter_cifti +libnifti2.so nifti_get_filesize +libnifti2.so nifti_get_int64list +libnifti2.so nifti_get_intlist +libnifti2.so nifti_get_volsize +libnifti2.so nifti_hdr1_looks_good +libnifti2.so nifti_hdr2_looks_good +libnifti2.so nifti_header_version +libnifti2.so nifti_image_free +libnifti2.so nifti_image_from_ascii +libnifti2.so nifti_image_infodump +libnifti2.so nifti_image_load +libnifti2.so nifti_image_load_bricks +libnifti2.so nifti_image_open +libnifti2.so nifti_image_read +libnifti2.so nifti_image_read_bricks +libnifti2.so nifti_image_to_ascii +libnifti2.so nifti_image_unload +libnifti2.so nifti_image_write +libnifti2.so nifti_image_write_bricks +libnifti2.so nifti_image_write_bricks_status +libnifti2.so nifti_image_write_hdr_img +libnifti2.so nifti_image_write_hdr_img2 +libnifti2.so nifti_image_write_status +libnifti2.so nifti_intent_string +libnifti2.so nifti_is_complete_filename +libnifti2.so nifti_is_gzfile +libnifti2.so nifti_is_inttype +libnifti2.so nifti_is_valid_datatype +libnifti2.so nifti_is_valid_ecode +libnifti2.so nifti_looks_like_cifti +libnifti2.so nifti_make_new_n1_header +libnifti2.so nifti_make_new_n2_header +libnifti2.so nifti_make_new_nim +libnifti2.so nifti_make_orthog_dmat44 +libnifti2.so nifti_make_orthog_mat44 +libnifti2.so nifti_makebasename +libnifti2.so nifti_makehdrname +libnifti2.so nifti_makeimgname +libnifti2.so nifti_mat33_colnorm +libnifti2.so nifti_mat33_determ +libnifti2.so nifti_mat33_inverse +libnifti2.so nifti_mat33_mul +libnifti2.so nifti_mat33_polar +libnifti2.so nifti_mat33_rownorm +libnifti2.so nifti_mat44_inverse +libnifti2.so nifti_mat44_mul +libnifti2.so nifti_mat44_to_dmat44 +libnifti2.so nifti_mat44_to_orientation +libnifti2.so nifti_mat44_to_quatern +libnifti2.so nifti_nim_has_valid_dims +libnifti2.so nifti_nim_is_valid +libnifti2.so nifti_orientation_string +libnifti2.so nifti_quatern_to_dmat44 +libnifti2.so nifti_quatern_to_mat44 +libnifti2.so nifti_read_ascii_image +libnifti2.so nifti_read_buffer +libnifti2.so nifti_read_collapsed_image +libnifti2.so nifti_read_header +libnifti2.so nifti_read_n1_hdr +libnifti2.so nifti_read_n2_hdr +libnifti2.so nifti_read_subregion_image +libnifti2.so nifti_set_allow_upper_fext +libnifti2.so nifti_set_alter_cifti +libnifti2.so nifti_set_debug_level +libnifti2.so nifti_set_filenames +libnifti2.so nifti_set_fix_floats +libnifti2.so nifti_set_iname_offset +libnifti2.so nifti_set_skip_blank_ext +libnifti2.so nifti_set_type_from_names +libnifti2.so nifti_short_order +libnifti2.so nifti_simple_init_nim +libnifti2.so nifti_slice_string +libnifti2.so nifti_strdup +libnifti2.so nifti_swap_16bytes +libnifti2.so nifti_swap_2bytes +libnifti2.so nifti_swap_4bytes +libnifti2.so nifti_swap_8bytes +libnifti2.so nifti_swap_Nbytes +libnifti2.so nifti_swap_as_analyze +libnifti2.so nifti_swap_as_nifti1 +libnifti2.so nifti_swap_as_nifti2 +libnifti2.so nifti_test_datatype_sizes +libnifti2.so nifti_type_and_names_match +libnifti2.so nifti_units_string +libnifti2.so nifti_update_dims_from_array +libnifti2.so nifti_valid_header_size +libnifti2.so nifti_validfilename +libnifti2.so nifti_write_all_data +libnifti2.so nifti_write_ascii_image +libnifti2.so nifti_write_buffer +libnifti2.so nifti_xform_string +libnifti2.so old_swap_nifti_header +libnifti2.so swap_nifti_header +libnifti2.so valid_nifti_brick_list +libnifti2.so valid_nifti_extensions +libnifticdf.so E0000 +libnifticdf.so E0001 +libnifticdf.so Xgamm +libnifticdf.so algdiv +libnifticdf.so alngam +libnifticdf.so alnrel +libnifticdf.so apser +libnifticdf.so basym +libnifticdf.so bcorr +libnifticdf.so betaln +libnifticdf.so bfrac +libnifticdf.so bgrat +libnifticdf.so bpser +libnifticdf.so bratio +libnifticdf.so brcmp1 +libnifticdf.so brcomp +libnifticdf.so bup +libnifticdf.so cdfbet +libnifticdf.so cdfbin +libnifticdf.so cdfchi +libnifticdf.so cdfchn +libnifticdf.so cdff +libnifticdf.so cdffnc +libnifticdf.so cdfgam +libnifticdf.so cdfnbn +libnifticdf.so cdfnor +libnifticdf.so cdfpoi +libnifticdf.so cdft +libnifticdf.so cumbet +libnifticdf.so cumbin +libnifticdf.so cumchi +libnifticdf.so cumchn +libnifticdf.so cumf +libnifticdf.so cumfnc +libnifticdf.so cumgam +libnifticdf.so cumnbn +libnifticdf.so cumnor +libnifticdf.so cumpoi +libnifticdf.so cumt +libnifticdf.so dbetrm +libnifticdf.so devlpl +libnifticdf.so dexpm1 +libnifticdf.so dinvnr +libnifticdf.so dinvr +libnifticdf.so dlanor +libnifticdf.so dln1mx +libnifticdf.so dln1px +libnifticdf.so dlnbet +libnifticdf.so dlngam +libnifticdf.so dstinv +libnifticdf.so dstrem +libnifticdf.so dstzr +libnifticdf.so dt1 +libnifticdf.so dzror +libnifticdf.so erf1 +libnifticdf.so erfc1 +libnifticdf.so esum +libnifticdf.so exparg +libnifticdf.so fifdint +libnifticdf.so fifdmax1 +libnifticdf.so fifdmin1 +libnifticdf.so fifdsign +libnifticdf.so fifidint +libnifticdf.so fifmod +libnifticdf.so fpser +libnifticdf.so ftnstop +libnifticdf.so gam1 +libnifticdf.so gaminv +libnifticdf.so gamln +libnifticdf.so gamln1 +libnifticdf.so grat1 +libnifticdf.so gratio +libnifticdf.so gsumln +libnifticdf.so inam +libnifticdf.so ipmpar +libnifticdf.so nifti_cdf2stat +libnifticdf.so nifti_intent_code +libnifticdf.so nifti_rcdf2stat +libnifticdf.so nifti_stat2cdf +libnifticdf.so nifti_stat2hzscore +libnifticdf.so nifti_stat2rcdf +libnifticdf.so nifti_stat2zscore +libnifticdf.so psi +libnifticdf.so rcomp +libnifticdf.so rexp +libnifticdf.so rlog +libnifticdf.so rlog1 +libnifticdf.so spmpar +libnifticdf.so stvaln +libniftiio.so disp_nifti_1_header +libniftiio.so is_nifti_file +libniftiio.so is_valid_nifti_type +libniftiio.so nifti_add_extension +libniftiio.so nifti_compiled_with_zlib +libniftiio.so nifti_convert_nhdr2nim +libniftiio.so nifti_convert_nim2nhdr +libniftiio.so nifti_copy_extensions +libniftiio.so nifti_copy_nim_info +libniftiio.so nifti_datatype_from_string +libniftiio.so nifti_datatype_is_valid +libniftiio.so nifti_datatype_sizes +libniftiio.so nifti_datatype_string +libniftiio.so nifti_datatype_to_string +libniftiio.so nifti_disp_lib_hist +libniftiio.so nifti_disp_lib_version +libniftiio.so nifti_disp_matrix_orient +libniftiio.so nifti_disp_type_list +libniftiio.so nifti_fileexists +libniftiio.so nifti_find_file_extension +libniftiio.so nifti_findhdrname +libniftiio.so nifti_findimgname +libniftiio.so nifti_free_NBL +libniftiio.so nifti_free_extensions +libniftiio.so nifti_get_filesize +libniftiio.so nifti_get_intlist +libniftiio.so nifti_get_volsize +libniftiio.so nifti_hdr_looks_good +libniftiio.so nifti_image_free +libniftiio.so nifti_image_from_ascii +libniftiio.so nifti_image_infodump +libniftiio.so nifti_image_load +libniftiio.so nifti_image_load_bricks +libniftiio.so nifti_image_open +libniftiio.so nifti_image_read +libniftiio.so nifti_image_read_bricks +libniftiio.so nifti_image_to_ascii +libniftiio.so nifti_image_unload +libniftiio.so nifti_image_write +libniftiio.so nifti_image_write_bricks +libniftiio.so nifti_image_write_bricks_status +libniftiio.so nifti_image_write_hdr_img +libniftiio.so nifti_image_write_hdr_img2 +libniftiio.so nifti_image_write_status +libniftiio.so nifti_intent_string +libniftiio.so nifti_is_complete_filename +libniftiio.so nifti_is_gzfile +libniftiio.so nifti_is_inttype +libniftiio.so nifti_is_valid_datatype +libniftiio.so nifti_is_valid_ecode +libniftiio.so nifti_make_new_header +libniftiio.so nifti_make_new_nim +libniftiio.so nifti_make_orthog_mat44 +libniftiio.so nifti_makebasename +libniftiio.so nifti_makehdrname +libniftiio.so nifti_makeimgname +libniftiio.so nifti_mat33_colnorm +libniftiio.so nifti_mat33_determ +libniftiio.so nifti_mat33_inverse +libniftiio.so nifti_mat33_mul +libniftiio.so nifti_mat33_polar +libniftiio.so nifti_mat33_rownorm +libniftiio.so nifti_mat44_inverse +libniftiio.so nifti_mat44_to_orientation +libniftiio.so nifti_mat44_to_quatern +libniftiio.so nifti_nim_has_valid_dims +libniftiio.so nifti_nim_is_valid +libniftiio.so nifti_orientation_string +libniftiio.so nifti_quatern_to_mat44 +libniftiio.so nifti_read_ascii_image +libniftiio.so nifti_read_buffer +libniftiio.so nifti_read_collapsed_image +libniftiio.so nifti_read_header +libniftiio.so nifti_read_subregion_image +libniftiio.so nifti_set_allow_upper_fext +libniftiio.so nifti_set_debug_level +libniftiio.so nifti_set_filenames +libniftiio.so nifti_set_fix_floats +libniftiio.so nifti_set_iname_offset +libniftiio.so nifti_set_skip_blank_ext +libniftiio.so nifti_set_type_from_names +libniftiio.so nifti_short_order +libniftiio.so nifti_simple_init_nim +libniftiio.so nifti_slice_string +libniftiio.so nifti_strdup +libniftiio.so nifti_swap_16bytes +libniftiio.so nifti_swap_2bytes +libniftiio.so nifti_swap_4bytes +libniftiio.so nifti_swap_8bytes +libniftiio.so nifti_swap_Nbytes +libniftiio.so nifti_swap_as_analyze +libniftiio.so nifti_test_datatype_sizes +libniftiio.so nifti_type_and_names_match +libniftiio.so nifti_units_string +libniftiio.so nifti_update_dims_from_array +libniftiio.so nifti_validfilename +libniftiio.so nifti_write_all_data +libniftiio.so nifti_write_ascii_image +libniftiio.so nifti_write_buffer +libniftiio.so nifti_xform_string +libniftiio.so old_swap_nifti_header +libniftiio.so swap_nifti_header +libniftiio.so valid_nifti_brick_list +libniftiio.so valid_nifti_extensions +libznz.so Xznzclose +libznz.so znzopen +libznz.so znzputs +libznz.so znzread +libznz.so znzrewind +libznz.so znzseek +libznz.so znztell +libznz.so znzwrite From 626f8c7a4a1dc5e92e5535a1a2d0ec1236c671f4 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Mon, 21 Sep 2026 13:27:08 -0500 Subject: [PATCH 7/7] COMP: Submit dashboard results over https, at the documented start time The dashboard script restates the CTestConfig.cmake settings because CTest's delayed initialization does not pick them up, and the restated copy had drifted from the original. Submit over https rather than http. my.cdash.org serves plain http without redirecting, so submissions were going unencrypted. Use the 00:00:00 EST nightly start time that CTestConfig.cmake declares, rather than 01:00:00 UTC. The two differ by four hours, so nightly builds were filed under the wrong day on the dashboard. --- cmake/nifti_common.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/nifti_common.cmake b/cmake/nifti_common.cmake index e766f738..ed8f85b9 100644 --- a/cmake/nifti_common.cmake +++ b/cmake/nifti_common.cmake @@ -267,8 +267,10 @@ endif() set(CTEST_CHECKOUT_COMMAND "\"${CMAKE_COMMAND}\" -P \"${ctest_checkout_script}\"") # CTest delayed initialization is broken, so we put the # CTestConfig.cmake info here. - set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") - set(CTEST_DROP_METHOD "http") + # Keep these in agreement with CTestConfig.cmake; a nightly start time + # that disagrees files builds under the wrong day on the dashboard. + set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") + set(CTEST_DROP_METHOD "https") set(CTEST_DROP_SITE "my.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=nifti_clib") set(CTEST_DROP_SITE_CDASH TRUE)