Skip to content

COMP: Build the optional code paths in the per-PR workflow - #88

Open
hjmjohnson wants to merge 1 commit into
ci/guard-cmp0169from
ci/build-all-codepaths
Open

hjmjohnson wants to merge 1 commit into
ci/guard-cmp0169from
ci/build-all-codepaths

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

Re-submission of #75, reverted from master on 2026-09-24 so it can be
reviewed before merging. Content is unchanged from the original.

Stack position 4 of 10. Base: ci/guard-cmp0169 (#30), not master.
Merge the PRs above it in this stack first, or the diff shown here will
include their commits too.

Ordering for this stack

# PR branch base
1 #29 ci/install-linking-srcdir master
2 #28 ci/test-output-on-failure ci/install-linking-srcdir
3 #30 ci/guard-cmp0169 ci/test-output-on-failure
4 #75 <- this PR ci/build-all-codepaths ci/guard-cmp0169
5 #77 ci/widen-coverage ci/build-all-codepaths
6 #37 pr/fix-missing-prototypes ci/widen-coverage
7 #78 fix/buildyml-jobs pr/fix-missing-prototypes
8 #81 ci/missing-declarations fix/buildyml-jobs
9 #82 ci/windows ci/missing-declarations
10 #83 ci/workflow-trigger-lint ci/windows

The order is the order these changes sat on master before the revert, so
it is known to build and test at every step. Verified again after
rebuilding the stack: the tip configures, compiles with no errors, and
passes 344/344 tests.

Why this one is stacked rather than independent

Each PR in this chain edits the same few files as its predecessors, chiefly
.github/workflows/cmake-multi-platform.yml, cmake/exported_symbols_linux.txt
and cifti/afni_xml.h. Cherry-picked onto master alone, the later ones
conflict. Two members also carry a build-order dependency rather than a
textual one: without #30 the project does not configure at all on CMake
versions that do not know policy CMP0169, and #29 is needed for
install_linking to find its source directory.

Commits
  • COMP: Build the optional code paths in the per-PR workflow

See #84 for the ordering of all 49 re-submitted pull requests.

cmake-multi-platform.yml is the workflow that runs on every pull
request, and it passes no options at all.  With the defaults that means
cifti/ and fsliolib/ are never compiled, and neither are the blocks
behind FSLSTYLE, PIGZ and REJECT_COMPLEX.

  USE_CIFTI_CODE          OFF
  USE_FSL_CODE            OFF
  FSLSTYLE_NAME_CONFLICTS OFF   -> -DFSLSTYLE
  FSLSTYLE_PIGZ_SUPPORT   OFF   -> -DPIGZ
  FSLSTYLE_REJECT_COMPLEX OFF   -> -DREJECT_COMPLEX

So a PR that changes any of those files collects four green checks that
never built it.  Several open PRs are in exactly that position.

The matrix gains an 'options' axis: 'default' is what a consumer gets
with no arguments, 'all' turns the optional libraries and the FSL parity
defines on.  Both are kept, because the default build is what ships and
a change can break it while the fuller one still compiles.  Four jobs
become eight, each about half a minute.

expat is installed for the Linux 'all' jobs; cifti needs it and the
default jobs do not.

Verified on master before writing this, with the test suite:

  default                          build OK, tests pass
  +cifti +fsl                      build OK, tests pass
  +cifti +fsl +FSLSTYLE            build OK, tests pass, doPigz/doPigz2
                                   present in nifti2_io.c.o

COMPILE_NIFTIUNUSED_CODE is deliberately left out.  It guards code the
project itself labels unused, so compiling it in CI would commit to
keeping it working; whether that code should exist at all is a separate
question.

(cherry picked from commit b6531f0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants