-
Notifications
You must be signed in to change notification settings - Fork 78
Add msys2 CI on github actions #1742
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
Conversation
6fd1efe to
f76d9f9
Compare
Codecov Report
@@ Coverage Diff @@
## main #1742 +/- ##
=======================================
Coverage 93.36% 93.36%
=======================================
Files 27 27
Lines 24405 24421 +16
Branches 1095 1095
=======================================
+ Hits 22785 22801 +16
Misses 1585 1585
Partials 35 35
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
f6fc361 to
edf7795
Compare
2cf96e0 to
48fc470
Compare
|
This is ready to go I think. Most of the problems I encountered were because of that annoying problem we hit in #721, which showed up in a slightly different way and took ages to track down (again). I think the solution here is better (using The only other thing that's potentially controversial is the But yeah - C library code and tests building and passing native-ishly on Windows! Any chance you could take a look please @bhaller and @molpopgen? |
I don't use or have access to Windows, and don't even know what msys2 is. :-> But perhaps @rdinnager or @bernard-kim would like to have a look? |
|
I mean, looks good to me, but I have very little C experience, so I am not the best person to look at it. The gh actions MSYS2 setup looks fine to me though. Thanks for spending the effort on this! Just for the record, if it builds with MinGW, then I believe it is native Windows (not 'native-ish'). I will probably use this as reference for setting up gh actions tests for SLiM too, once it is ready. So thanks again! |
|
Thanks @bhaller. I was actually mainly interested in seeing if you're OK with the new workarounds for #721 - using builtins on gcc and clang for Thanks for taking a look @rdinnager! Hopefully this will provide a good basis for SLiM CI - I think you should be more-or-less able to replace meson with Cmake and it should work. |
Ah, I see, sorry. #721 wasn't on my radar, I don't think I've seen those warnings or had them reported to me. Your fix seems OK I think? I don't know much about builtins really. The one drawback to your approach that I can see is that these functions will now entail actual function calls, rather than getting inlined by the compiler, but unless they get used in a spot that is a performance bottleneck, that shouldn't matter (and they might get inlined by the linker anyway, if it's smart enough). But you could define them as macros instead to avoid that, e.g.: or something like that. Anyhow, this all seems fine, I don't anticipate it causing any issues for SLiM. |
|
Thanks @bhaller - you're right about the function calls. If they start showing up on our profiles we can inline/macro-fy them or something, but I'm guessing they won't end up being significant so will keep it simple for now. |
benjeffery
left a comment
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.
LGTM, some nice cleanup there
Based on CMake example: https://github.com/msys2/setup-msys2/blob/master/examples/cmake.yml - Cast hCrytProv values to HCRYPTPROV - Remove _TSK_WORKAROUND_FALSE_CLANG_WARNING define and use local versions of tsk_isnan and tsk_isfinite instead - Make example progs option in meson config - Add warn and debug stream functions. Closes tskit-dev#1741
48fc470 to
887240f
Compare
To support msys2 on Windows as a first class platform for C development, we'd like to add it to CI. This is an experiment to see if that'll work.
Based on CMake example: https://github.com/msys2/setup-msys2/blob/master/examples/cmake.yml