Skip to content

Commit b690529

Browse files
committed
CI: Add gfortran-15 support
* Use Homebrew to install gfortran 15 on Ubuntu
1 parent 6a6df7f commit b690529

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
os: [macos-13, macos-14, macos-15, macos-15-intel, ubuntu-24.04]
16+
os: [ macos-13, macos-14, macos-15, macos-15-intel, ubuntu-24.04 ]
1717
compiler: [ gfortran ]
18-
version: [ 13, 14 ]
18+
version: [ 13, 14, 15 ]
1919
network: [ smp ]
2020
exclude:
21+
- os: macos-13 # macos-13 brew is currently Gfortran 15.1.0 which Veggies does not support
22+
version: 15
2123
- os: macos-15 # gcc-13 broken on macos-15
22-
compiler: gfortran
2324
version: 13
24-
network: smp
2525
include:
2626
# --- flang coverage ---
2727
- os: macos-14
@@ -73,6 +73,10 @@ jobs:
7373
compiler: gfortran
7474
version: 14
7575
network: udp
76+
- os: ubuntu-24.04
77+
compiler: gfortran
78+
version: 15
79+
network: udp
7680
- os: ubuntu-24.04
7781
compiler: gfortran
7882
version: 14
@@ -160,7 +164,25 @@ jobs:
160164
run: |
161165
set -x
162166
sudo apt update
163-
sudo apt install -y build-essential gfortran-${COMPILER_VERSION} g++-${COMPILER_VERSION} pkg-config make
167+
sudo apt install -y build-essential pkg-config make
168+
if [[ ${COMPILER_VERSION} < 15 ]] ; then \
169+
sudo apt install -y gfortran-${COMPILER_VERSION} g++-${COMPILER_VERSION} ; \
170+
else \
171+
curl -L https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh -o install-homebrew.sh ; \
172+
chmod +x install-homebrew.sh ; \
173+
env CI=1 ./install-homebrew.sh ; \
174+
HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" ; \
175+
${HOMEBREW_PREFIX}/bin/brew install -v gcc@${COMPILER_VERSION} binutils ; \
176+
ls -al ${HOMEBREW_PREFIX}/bin ; \
177+
echo "PATH=${HOMEBREW_PREFIX}/bin:${PATH}" >> "$GITHUB_ENV" ; \
178+
: Homebrew GCC@15 needs binutils 2.44+ ; \
179+
HOMEBREW_BINUTILS=$(ls -d ${HOMEBREW_PREFIX}/Cellar/binutils/2.*/bin ) ; \
180+
ls -al ${HOMEBREW_BINUTILS} ; \
181+
echo "FFLAGS=${FFLAGS:+"$FFLAGS" }-B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" ; \
182+
echo "CFLAGS=${CFLAGS:+"$CFLAGS" }-B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" ; \
183+
echo "CXXFLAGS=${CXXFLAGS:+"$CXXFLAGS" }-B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" ; \
184+
echo "LDFLAGS=${LDFLAGS:+"$LDFLAGS" }-B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV" ; \
185+
fi
164186
165187
- name: Install Ubuntu Container Dependencies
166188
if: ${{ contains(matrix.os, 'ubuntu') && matrix.container != '' && !contains(matrix.container, 'phhargrove') }}

0 commit comments

Comments
 (0)