Skip to content

Commit 86b97dd

Browse files
authored
feat: add gcc-15 support on Windows, macOS (#157)
* support gcc-15 on Windows, macOS * gcc-14 via choco
1 parent d2ba6ea commit 86b97dd

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-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: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,29 @@ 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+
;;
129+
14)
130+
choco install mingw --version 14.2.0 --force
131+
# mingw 13+ on Windows doesn't create shims (http://disq.us/p/2w5c5tj)
132+
# so hide Strawberry compilers and manually add mingw bin dir to PATH
133+
mkdir "$RUNNER_TEMP/strawberry"
134+
mv /c/Strawberry/c/bin/gfortran "$RUNNER_TEMP/strawberry/gfortran"
135+
mv /c/Strawberry/c/bin/gcc "$RUNNER_TEMP/strawberry/gcc"
136+
mv /c/Strawberry/c/bin/g++ "$RUNNER_TEMP/strawberry/g++"
137+
echo "C:\ProgramData\mingw64\mingw64\bin" >> $GITHUB_PATH
138+
;;
119139
13)
120140
choco install mingw --version 13.2.0 --force
121-
# mingw 13 on Windows doesn't create shims (http://disq.us/p/2w5c5tj)
141+
# mingw 13+ on Windows doesn't create shims (http://disq.us/p/2w5c5tj)
122142
# so hide Strawberry compilers and manually add mingw bin dir to PATH
123143
mkdir "$RUNNER_TEMP/strawberry"
124144
mv /c/Strawberry/c/bin/gfortran "$RUNNER_TEMP/strawberry/gfortran"
@@ -142,7 +162,7 @@ install_gcc_choco()
142162
choco install mingw --version 8.5.0 --force
143163
;;
144164
*)
145-
echo "Unsupported version: $version (choose 8-13 or latest)"
165+
echo "Unsupported version: $version (choose 8-15, or latest)"
146166
exit 1
147167
;;
148168
esac

0 commit comments

Comments
 (0)