From 405e83bcd3039a2abfd371d360ba54d28ff24c7c Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Tue, 7 Oct 2025 19:28:23 +0200 Subject: [PATCH 1/2] feat: support gcc-15 on Windows, macOS --- .github/compat/matrix.yml | 8 +++++++- setup-fortran.sh | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/compat/matrix.yml b/.github/compat/matrix.yml index 09f23bc..f00bcb6 100644 --- a/.github/compat/matrix.yml +++ b/.github/compat/matrix.yml @@ -6,6 +6,7 @@ os: - windows-2025 - windows-2022 toolchain: + - {compiler: gcc, version: 15} - {compiler: gcc, version: 14} - {compiler: gcc, version: 13} - {compiler: gcc, version: 12} @@ -94,4 +95,9 @@ exclude: - os: windows-2025 toolchain: {compiler: nvidia-hpc} - os: windows-2022 - toolchain: {compiler: nvidia-hpc} \ No newline at end of file + toolchain: {compiler: nvidia-hpc} + # gcc 15 only available for windows (via chocolatey), macos (brew) + - os: ubuntu-24.04 + toolchain: {compiler: gcc, version: 15} + - os: ubuntu-22.04 + toolchain: {compiler: gcc, version: 15} diff --git a/setup-fortran.sh b/setup-fortran.sh index 69e1c61..b5d329b 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -116,9 +116,19 @@ install_gcc_choco() latest) choco install mingw --force ;; + 15) + choco install mingw --version 15.2.0 --force + # mingw 13+ on Windows doesn't create shims (http://disq.us/p/2w5c5tj) + # so hide Strawberry compilers and manually add mingw bin dir to PATH + mkdir "$RUNNER_TEMP/strawberry" + mv /c/Strawberry/c/bin/gfortran "$RUNNER_TEMP/strawberry/gfortran" + mv /c/Strawberry/c/bin/gcc "$RUNNER_TEMP/strawberry/gcc" + mv /c/Strawberry/c/bin/g++ "$RUNNER_TEMP/strawberry/g++" + echo "C:\ProgramData\mingw64\mingw64\bin" >> $GITHUB_PATH + ;; 13) choco install mingw --version 13.2.0 --force - # mingw 13 on Windows doesn't create shims (http://disq.us/p/2w5c5tj) + # mingw 13+ on Windows doesn't create shims (http://disq.us/p/2w5c5tj) # so hide Strawberry compilers and manually add mingw bin dir to PATH mkdir "$RUNNER_TEMP/strawberry" mv /c/Strawberry/c/bin/gfortran "$RUNNER_TEMP/strawberry/gfortran" @@ -142,7 +152,7 @@ install_gcc_choco() choco install mingw --version 8.5.0 --force ;; *) - echo "Unsupported version: $version (choose 8-13 or latest)" + echo "Unsupported version: $version (choose 8-13, 15, or latest)" exit 1 ;; esac From 39f31f7352a6cf323dee7195af22031f2e0cb3a1 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Tue, 7 Oct 2025 21:45:41 +0200 Subject: [PATCH 2/2] gcc-14 via choco --- setup-fortran.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/setup-fortran.sh b/setup-fortran.sh index b5d329b..9a89257 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -126,6 +126,16 @@ install_gcc_choco() mv /c/Strawberry/c/bin/g++ "$RUNNER_TEMP/strawberry/g++" echo "C:\ProgramData\mingw64\mingw64\bin" >> $GITHUB_PATH ;; + 14) + choco install mingw --version 14.2.0 --force + # mingw 13+ on Windows doesn't create shims (http://disq.us/p/2w5c5tj) + # so hide Strawberry compilers and manually add mingw bin dir to PATH + mkdir "$RUNNER_TEMP/strawberry" + mv /c/Strawberry/c/bin/gfortran "$RUNNER_TEMP/strawberry/gfortran" + mv /c/Strawberry/c/bin/gcc "$RUNNER_TEMP/strawberry/gcc" + mv /c/Strawberry/c/bin/g++ "$RUNNER_TEMP/strawberry/g++" + echo "C:\ProgramData\mingw64\mingw64\bin" >> $GITHUB_PATH + ;; 13) choco install mingw --version 13.2.0 --force # mingw 13+ on Windows doesn't create shims (http://disq.us/p/2w5c5tj) @@ -152,7 +162,7 @@ install_gcc_choco() choco install mingw --version 8.5.0 --force ;; *) - echo "Unsupported version: $version (choose 8-13, 15, or latest)" + echo "Unsupported version: $version (choose 8-15, or latest)" exit 1 ;; esac