egor-tensin / setup-mingw

GitHub action to set up MinGW-w64
MIT License
77 stars 25 forks source link
action github-actions mingw mingw-w64

Set up MinGW-w64

Test

This GitHub action sets up MinGW-w64 in your workflow run.

  1. Installs MinGW-w64 on either Ubuntu or Windows.
  2. Fixes the infamous libwinpthread-1.dll static linking issue.

Use it in your workflow like this:

- name: Set up MinGW
  uses: egor-tensin/setup-mingw@v2
  with:
    platform: x64

API

Input Value Default Description
platform x64 Install the x86_64 toolchain.
any Install the i686 toolchain.
cygwin any Install native binaries.
1 Install Cygwin packages.
static 1 Enable the static-linking workaround.
any Disable the static-linking workaround.
cc 1 Set up cc/c++ executables.
any Don't set up cc/c++.
hardlinks any Cygwin: don't convert any symlinks.
1 Cygwin: convert symlinks in /usr/bin to hardlinks.
version Install the default (latest) version.
any Install the specified version, if possible.
Output Example Description
prefix x86_64-w64-mingw32 Cross-compilation toolchain prefix
gcc x86_64-w64-mingw32-gcc gcc binary name
gxx i686-w64-mingw32-g++ g++ binary name
windres i686-w64-mingw32-windres windres binary name

License

Distributed under the MIT License. See LICENSE.txt for details.