-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: wire up support for Win32 #100
Conversation
863df5d
to
59f7920
Compare
Depends on #99 due to compiler errors with MSYS. |
According to gettimeofday(3P), passing a non-NULL timezone pointer to the function is unspecified behaviour. This is also being warned about by compilers when compiling with strict C90 standard and without most of the extensions. Adapt the code accordingly.
0e05d2e
to
fc62d24
Compare
Rebased on top of #99 to fix compilation with MinGW, so things are working now with some additional commits on top. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
What's the rationale for the |
@ethomson It's mostly about it not being portable between platforms, and this is getting hit in Windows builds. We could likely work around this somehow with more preprocessor magic. But I think that the more reasonable approach here is to drop it and instead use PRIuMAX and PRIdMAX, which are portable. It saves us some pain and is also conceptually the right approach because it gives us the maximum representable integers. I've got another patch series queued up where I'll expand on this a bit by introducing type-safe wrappers that always use |
5e1c95f
to
3a45c1b
Compare
Fixed the |
I'm not super convinced about the concepts, but I'm also not going to block on a relatively small change. But if we're aiming for conceptual correctness, then let's change the decl itself to |
@ethomson Which decls are you referring to specifically? Do you mean the |
This one - https://github.com/clar-test/clar/pull/100/files#diff-1eac78a6ee4c934fe040dcb4bcb60485e71c1f8fd01ae3fb7b084bdd65264933R28 - let's make |
The formatting directives PRIuZ and PRIxZ are not portable across platforms and cause issues on Windows. Stop using them and instead use PRIuMAX and PRIxMAX, which are portable.
@ethomson Ah, that one. Adjusted it now 👍 |
The project uses a Makefile as the build system for the test executable. This makes it hard to build and test on Windows via MSVC. Introduce support for CMake.
Convert the CI to use CMake instead of Makefiles. This will allow us to wire up support for Windows in a subsequent commit.
Now that we have wired up support for CMake it is trivial to also compile the test binary on Windows. Wire this up.
The Makefile in "test/" has been responsible for building the "clar_test" executable as a sort of smoke test. Now that we have introduced support for CMake it has been superseded. Remove it.
Thanks! |
Wire up support for testing against Win32 in our CI. This is done by migrating from Makefiles to CMake, which is preinstalled on all GitHub runner images and thus way easier to use.