GKlib icon indicating copy to clipboard operation
GKlib copied to clipboard

CI: Add build-tests for various compilers on Windows and Ubuntu

Open MarijnS95 opened this issue 6 months ago • 2 comments

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 using clang. The other was an intuitive replacement for simple code improvement, that now also ends up being a fix for 84658df380f8c22d4398adf6cd5e86c754731bfc / b8b8bdc7e0186f1f36412c74e89153feecb5d436: adapt.c can no longer find #include "adapt.h" because (1) the include_directories("win32") was removed and (2) the two files are no longer residing in the same directory.

MarijnS95 avatar Jul 06 '25 12:07 MarijnS95

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:

D:\a\GKlib\GKlib\apps\gkuniq.c(78,5): error C2065: '__asm__': undeclared identifier [D:\a\GKlib\GKlib\build\apps\gkuniq.vcxproj]
D:\a\GKlib\GKlib\apps\gkuniq.c(78,13): error C2143: syntax error: missing ';' before 'volatile' [D:\a\GKlib\GKlib\build\apps\gkuniq.vcxproj]
D:\a\GKlib\GKlib\apps\gkuniq.c(84,3): error C2065: '__asm__': undeclared identifier [D:\a\GKlib\GKlib\build\apps\gkuniq.vcxproj]
D:\a\GKlib\GKlib\apps\gkuniq.c(84,11): error C2143: syntax error: missing ';' before 'volatile' [D:\a\GKlib\GKlib\build\apps\gkuniq.vcxproj]

MarijnS95 avatar Jul 06 '25 13:07 MarijnS95

@karypis are you interested in this change? I'd like to use it to demonstrate #45, and prevent such issues from creeping in in the future :)

MarijnS95 avatar Jul 27 '25 21:07 MarijnS95