Skip to content

COMP: Build and test on Windows - #93

Open
hjmjohnson wants to merge 2 commits into
ci/missing-declarationsfrom
ci/windows
Open

hjmjohnson wants to merge 2 commits into
ci/missing-declarationsfrom
ci/windows

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

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

Stack position 9 of 10. Base: ci/missing-declarations (#81), 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 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 <- this PR 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 and test on Windows
  • COMP: Export the afni_xml half of the cifti library

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

Twelve source files carry WIN32 or _MSC_VER guards and no workflow has
ever compiled them, so a change that breaks the Windows path is invisible
here and surfaces only when a consumer reports it.

Static and shared, because the ZNZ_API and NIFTI_API decorations differ
between them and only the shared build exercises the dllexport path.
zlib and expat come from vcpkg, which the runner image already carries.

VCPKG_INSTALLATION_ROOT is set by the runner image rather than by the
workflow, so the toolchain path is read in PowerShell and checked before
cmake runs, which reports a missing toolchain as itself rather than as a
CMake error several lines removed from the cause.

(cherry picked from commit 2505325)
afni_xml_io.h decorates its declarations with CIF_API and afni_xml.h
decorated none of its own, so a Windows shared build produced a DLL
missing every axml_ entry point and both cifti tools failed to link
against the library they are built with.

The macro definition moves to afni_xml.h, which afni_xml_io.h includes
at its top, so one definition now serves both headers rather than each
carrying its own. Nothing changes where the attribute expands to default
visibility: the exported set of the shared build is byte-identical.

Found by the Windows job added in the preceding commit.

(cherry picked from commit 63b361a)
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.

2 participants