CI: Add build-tests for various compilers on Windows and Ubuntu#46
CI: Add build-tests for various compilers on Windows and Ubuntu#46MarijnS95 wants to merge 3 commits intoKarypisLab:masterfrom
Conversation
There was a problem hiding this comment.
Deleting this file because it's no longer being included since b8b8bdc#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aL9.
Maybe that's an error though...
There was a problem hiding this comment.
In my own testing, when adding #45 on top things now fail with ssize_t being missing: https://github.com/MarijnS95/GKlib/actions/runs/16099153358/job/45425988032
I assume because the compiler only defines _WIN32, whereas this now-unused GKlibSystem.cmake file used to set WIN32. But only for if(MSVC) of course, so cl.exe + clang-cl get it but clang would have missed out too.
EDIT: Same for the missing strerror_r, which is in the #else for #if defined(WIN32).
The build setup for this repository is incredibly simple, but unfortunately even recent changes to the CMake have made various platforms and compiler combinations unbuildable. Add a basic CI that at the very least _builds_ the project to demonstrate all these problems, which should all go away when other PRs are merged.
a561a26 to
ea01742
Compare
…fined through CMake) Recent changes no longer include a CMake file that set `-DWIN32` (which was only set for `MSVC` anyway, meaning Windows + `clang` would miss out) resulting in lots of errors when compiling on/for Windows because compatibility code is no longer enabled. Switch all those `#ifdef`s to `_WIN32` which will be compiled by both MSVC and `clang` when compiling for Windows.
… MSVC) When compiling on/to Windows via LLVM/clang(-cl), the compiler ID is no longer `MSVC` even though `m.lib` should still not be used. Read `WIN32` instead which will always be set when targeting Windows regardless of the compiler being used.
|
With the latest changes, almost all jobs are green now: https://github.com/MarijnS95/GKlib/actions/runs/16099464137 Except for a very simple native MSBuild / Visual Studio + MSVC compilation. That still fails with: |
The build setup for this repository is incredibly simple, but unfortunately even recent changes to the CMake have made various platforms and compiler combinations unbuildable. Add a basic CI that at the very least builds the project to demonstrate all these problems, which should all go away when other PRs are merged.
Currently this highlights two errors that are both being solved by #45. One is the missing
read()/write()functions declarations when compiling for Windows usingclang. The other was an intuitive replacement for simple code improvement, that now also ends up being a fix for 84658df / b8b8bdc:adapt.ccan no longer find#include "adapt.h"because (1) theinclude_directories("win32")was removed and (2) the two files are no longer residing in the same directory.