Skip to content

Add CI support for arm64 on Windows and run unit tests - #149

Open
cruzzil wants to merge 3 commits into
heasarc:developfrom
cruzzil:windows_ci_arm64
Open

Add CI support for arm64 on Windows and run unit tests#149
cruzzil wants to merge 3 commits into
heasarc:developfrom
cruzzil:windows_ci_arm64

Conversation

@cruzzil

@cruzzil cruzzil commented Jul 16, 2026

Copy link
Copy Markdown
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.

@esabol

esabol commented Jul 16, 2026

Copy link
Copy Markdown
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 ?

@cruzzil

cruzzil commented Jul 16, 2026

Copy link
Copy Markdown
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

@cruzzil

cruzzil commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Once #150 is merged, this can be rebased and should work.

@krutkow

krutkow commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

@cruzzil #150 has been merged.

cruzzil added 2 commits July 17, 2026 11:09
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
cruzzil force-pushed the windows_ci_arm64 branch from 7addd3d to 85e3fc1 Compare July 17, 2026 01:09
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
cruzzil force-pushed the windows_ci_arm64 branch from 85e3fc1 to 727ae87 Compare July 17, 2026 01:14
@cruzzil

cruzzil commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

This is passing now

@krutkow
krutkow self-requested a review July 17, 2026 18:29
@krutkow

krutkow commented Jul 17, 2026

Copy link
Copy Markdown
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.

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