msys2 / setup-msys2

GitHub Action to setup MSYS2
https://github.com/marketplace/actions/setup-msys2
MIT License
285 stars 38 forks source link

Extend action to support Ubuntu runner? #293

Open stweil opened 1 year ago

stweil commented 1 year ago

It might sound strange, but the msys packages work nice for cross builds (targetting 32 or 64 bit Windows) on Debian / Ubuntu hosts, too. Typically a cross build on Linux is much faster than a build on Windows. While Debian and Debian based Linux distributions provide compiler packages for the cross build, they lack the required library packages. msys comes with a large collection of packages which can fill the gap. Therefore it would be great if the GitHub action could be used with the Ubuntu 22.04 runner, too.

lazka commented 1 year ago

MSYS2 doesn't support running on Ubuntu, so this is nothing the github action can provide.

stweil commented 1 year ago

I'd expect that the action provides pacman and pacman settings, so it is possible to install msys packages for mingw32, mingw64, ...

lazka commented 1 year ago

I see. The install scripts and hooks would require something like wine though, or you somehow patch them out.

stweil commented 1 year ago

I simply ignore the error messages from the install hooks. Typically that works fine (at least for my builds, QEMU and Tesseract OCR).

MehdiChinoune commented 1 year ago

Typically a cross build on Linux is much faster than a build on Windows.

Are you using autotools, then that's expected. Use CMake or meson for a better buildsystem and faster build-time.

lazka commented 1 year ago

I could see someone providing a docker image based on Ubuntu as a first step (or Fedora, since they have a ucrt cross compiler toolchain)

stweil commented 1 year ago

Yes, Fedora has a more complete selection of library packages for cross builds.