ci: parse MinGW's version suffix and try nix when present
VoidBuildSystem CI / 1 · Requirements (push) Successful in 8s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m35s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Failing after 26s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Failing after 28s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Skipped
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Skipped
VoidBuildSystem CI / 4B · Windows package (debug) (push) Skipped
VoidBuildSystem CI / 4B · Windows package (relwithdebinfo) (push) Skipped
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 3m31s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 4m20s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 2m25s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Successful in 7m4s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Successful in 7m9s
VoidBuildSystem CI / 4A · Linux package (debug) (push) Successful in 1m18s
VoidBuildSystem CI / 4A · Linux package (relwithdebinfo) (push) Successful in 1m33s
VoidBuildSystem CI / 4A · Linux package (sanitizers) (push) Successful in 1m34s
VoidBuildSystem CI / 5 · Release (push) Skipped

MinGW's -dumpversion prints e.g. '10-win32', which broke the numeric
comparison; keep the leading major. Also try a nix-provided cross
toolchain when nix is available, before falling back to the (often
older) distribution package.
This commit is contained in:
faumaray committed 2026-12-06 06:48:31 +03:00
1 parent 7bdece0680
commit 951b55f67e
1 file changed
+19 -1
+19 -1
View File
@@ -14,7 +14,9 @@ compiler_major() {
echo 0
return
}
"${compiler}" -dumpversion 2>/dev/null | cut -d. -f1 || echo 0
# MinGW prints e.g. "10-win32": keep only the leading major number.
"${compiler}" -dumpversion 2>/dev/null | sed -nE 's/^([0-9]+).*/\1/p' | head -n1 ||
echo 0
}
compatible() {
@@ -49,6 +51,22 @@ if command -v dev >/dev/null 2>&1; then
fi
fi
# Nix, when the runner has it.
if command -v nix >/dev/null 2>&1; then
echo "trying nix for MinGW-w64 GCC ${minimum}+"
if nix shell --command true nixpkgs#pkgsCross.mingwW64.stdenv.cc >/dev/null 2>&1; then
nix_path="$(nix shell --command sh -c 'printf %s "$PATH"' \
nixpkgs#pkgsCross.mingwW64.stdenv.cc 2>/dev/null | tail -n1 || true)"
if [ -n "${nix_path:-}" ]; then
export PATH="${nix_path}:${PATH}"
hash -r
fi
fi
if report; then
exit 0
fi
fi
# Distribution package (may be older than GCC 16).
if command -v apt-get >/dev/null 2>&1; then
sudo=""