Skip to content

Commit 405e83b

Browse files
committed
feat: support gcc-15 on Windows, macOS
1 parent d2ba6ea commit 405e83b

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/compat/matrix.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ os:
66
- windows-2025
77
- windows-2022
88
toolchain:
9+
- {compiler: gcc, version: 15}
910
- {compiler: gcc, version: 14}
1011
- {compiler: gcc, version: 13}
1112
- {compiler: gcc, version: 12}
@@ -94,4 +95,9 @@ exclude:
9495
- os: windows-2025
9596
toolchain: {compiler: nvidia-hpc}
9697
- os: windows-2022
97-
toolchain: {compiler: nvidia-hpc}
98+
toolchain: {compiler: nvidia-hpc}
99+
# gcc 15 only available for windows (via chocolatey), macos (brew)
100+
- os: ubuntu-24.04
101+
toolchain: {compiler: gcc, version: 15}
102+
- os: ubuntu-22.04
103+
toolchain: {compiler: gcc, version: 15}

setup-fortran.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,19 @@ install_gcc_choco()
116116
latest)
117117
choco install mingw --force
118118
;;
119+
15)
120+
choco install mingw --version 15.2.0 --force
121+
# mingw 13+ on Windows doesn't create shims (http://disq.us/p/2w5c5tj)
122+
# so hide Strawberry compilers and manually add mingw bin dir to PATH
123+
mkdir "$RUNNER_TEMP/strawberry"
124+
mv /c/Strawberry/c/bin/gfortran "$RUNNER_TEMP/strawberry/gfortran"
125+
mv /c/Strawberry/c/bin/gcc "$RUNNER_TEMP/strawberry/gcc"
126+
mv /c/Strawberry/c/bin/g++ "$RUNNER_TEMP/strawberry/g++"
127+
echo "C:\ProgramData\mingw64\mingw64\bin" >> $GITHUB_PATH
128+
;;
119129
13)
120130
choco install mingw --version 13.2.0 --force
121-
# mingw 13 on Windows doesn't create shims (http://disq.us/p/2w5c5tj)
131+
# mingw 13+ on Windows doesn't create shims (http://disq.us/p/2w5c5tj)
122132
# so hide Strawberry compilers and manually add mingw bin dir to PATH
123133
mkdir "$RUNNER_TEMP/strawberry"
124134
mv /c/Strawberry/c/bin/gfortran "$RUNNER_TEMP/strawberry/gfortran"
@@ -142,7 +152,7 @@ install_gcc_choco()
142152
choco install mingw --version 8.5.0 --force
143153
;;
144154
*)
145-
echo "Unsupported version: $version (choose 8-13 or latest)"
155+
echo "Unsupported version: $version (choose 8-13, 15, or latest)"
146156
exit 1
147157
;;
148158
esac

0 commit comments

Comments
 (0)