Add CI support for arm64 on Windows and run unit tests - #149
Open
cruzzil wants to merge 3 commits into
Open
Conversation
cruzzil
commented
Jul 16, 2026
Contributor
- Added a job to run the build on arm64 for windows
- Updated cmakelists.txt to also run the unit tests, this was missing on the windows CI.
Contributor
|
windows (arm64) and windows (x64) both fail CI. Those test failures will need to be fixed before this PR can be merged, of course. Any ideas, @cruzzil ? |
Contributor
Author
|
#150 will fix some of the unit test failures, however, these 2 failures look related to how Windows doesn't export all the private functions which the unit tests use. Coming up with a fix for that shortly |
Contributor
Author
|
Once #150 is merged, this can be rebased and should work. |
Collaborator
The CMake build only registered TestProg and cookbook with CTest, so the Windows/Windows-arm64 CI jobs (which test via ctest) never ran the unit tests in the tests/ directory. Build and register every tests/test_*.c as a CTest test, adding tests/ to the include path for test_macros.h and treating exit code 77 as a skip (matching the automake convention, e.g. test_drvrsmem without shared-memory services).
cruzzil
force-pushed
the
windows_ci_arm64
branch
from
July 17, 2026 01:09
7addd3d to
85e3fc1
Compare
The tests/ unit tests call internal library helpers (fits_rcomp, pl_p2li, simplerng_*, ffourl, ngp_*, etc.) that are declared only in fitsio2.h and are not part of the public API, so they linked against the Unix shared library (which exports everything by default) but failed with LNK2019 on the Windows DLL. When TESTS is enabled, set WINDOWS_EXPORT_ALL_SYMBOLS so the whole library is exported (matching the Unix behaviour) and skip the explicit __declspec(dllexport) path. Regular builds (TESTS=OFF) are unchanged and keep exporting just the CFITS_API public surface.
cruzzil
force-pushed
the
windows_ci_arm64
branch
from
July 17, 2026 01:14
85e3fc1 to
727ae87
Compare
Contributor
Author
|
This is passing now |
esabol
approved these changes
Jul 17, 2026
krutkow
approved these changes
Jul 17, 2026
krutkow
self-requested a review
July 17, 2026 18:29
Collaborator
|
Thanks for updating this and submitting @cruzzil . We're discussing this PR and related topics in the office, but also preoccupied with an upcoming release, so this might have to wait until later this month for me to get back to. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.