CI: Add MinGW/GCC build to Windows GHA

This commit is contained in:
Thaddeus Crews 2024-09-23 09:13:51 -05:00
parent 68f053bf82
commit a44f691fc7
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84
5 changed files with 39 additions and 12 deletions

View file

@ -662,7 +662,7 @@ def get_ar_version(env):
print_warning("Couldn't check version of `ar`.")
return ret
match = re.search(r"GNU ar \(GNU Binutils\) (\d+)\.(\d+)(?:\.(\d+))?", output)
match = re.search(r"GNU ar(?: \(GNU Binutils\)| version) (\d+)\.(\d+)(?:\.(\d+))?", output)
if match:
ret["major"] = int(match[1])
ret["minor"] = int(match[2])
@ -788,8 +788,9 @@ def configure_mingw(env: "SConsEnvironment"):
env["CXX"] = mingw_bin_prefix + "g++"
if try_cmd("as --version", env["mingw_prefix"], env["arch"]):
env["AS"] = mingw_bin_prefix + "as"
if try_cmd("gcc-ar --version", env["mingw_prefix"], env["arch"]):
env["AR"] = mingw_bin_prefix + "gcc-ar"
ar = "ar" if os.name == "nt" else "gcc-ar"
if try_cmd(f"{ar} --version", env["mingw_prefix"], env["arch"]):
env["AR"] = mingw_bin_prefix + ar
if try_cmd("gcc-ranlib --version", env["mingw_prefix"], env["arch"]):
env["RANLIB"] = mingw_bin_prefix + "gcc-ranlib"