Skip to content
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

Build and Test with MSVC in GHA #588

Open
blapie opened this issue Oct 10, 2024 · 3 comments
Open

Build and Test with MSVC in GHA #588

blapie opened this issue Oct 10, 2024 · 3 comments

Comments

@blapie
Copy link
Collaborator

blapie commented Oct 10, 2024

Why a new feature? Is your feature request related to a problem? Please describe it.

We currently support Msys2 environment and build with clang. A recent PR claims to fix compilation with MSVC, can we now test that in CI?

What feature would you like?

Extend existing msys2 workflow to compile with MSVC.

How would you like this feature to be implemented?

I don't think this can be done by adding a new sys value here.
Instead we might simply need to correctly set CC, CXX and the linker.
It might just be a case of setting up MSVC on top of msys2 (whatever flavor or it), in a way similar to that discussed in this thread. Example here.

Can you please confirm @Andarwinux how we could best approach that and if you recommend any action that could help in the process?

How portable is the feature across architectures and platforms?

This is for Windows on x86 only for now, but could probably be extended to Windows on Arm in the future

@Andarwinux
Copy link
Contributor

Combining MSVC and MSYS2 is only an extreme case, i.e. projects that can't get rid of Autotools/GNU Make but need MSVC support, whereas sleef is based on CMake, so there's no need to use MSYS2. Building sleef shouldn't be difficult, but the dependencies are a problem, openssl and mpfr. Fortunately, vcpkg provides some ports.

https://github.com/microsoft/vcpkg/tree/master/ports/openssl
https://github.com/microsoft/vcpkg/tree/master/ports/mpfr

@shibatch
Copy link
Owner

shibatch commented Oct 10, 2024

MSYS is not required if you just want to build. You can build from the command prompt as usual. Please refer to the batch file included in tlfloat.

https://github.com/shibatch/tlfloat/blob/main/winbuild-msvc.bat

If you also want to do testing, we used to use a method of combining testers built with Cygwin. This method is quite tricky.

@blapie
Copy link
Collaborator Author

blapie commented Oct 10, 2024

Sure, thanks both! Makes sense that there is no need to drag msys into the equation, it's just the environment I'm most familiar with, for the reasons @Andarwinux mentioned.

I will have a go at drafting a workflow to test outside msys and with MSVC.

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

No branches or pull requests

3 participants