Skip to content

Commit 04bc9d8

Browse files
authored
Merge pull request #78 from sourceryinstitute/expand-ci
CI: add gfortran 15 on macOS
2 parents bfe9b05 + 6af6ce6 commit 04bc9d8

1 file changed

Lines changed: 26 additions & 31 deletions

File tree

.github/workflows/build.yml

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,49 +17,44 @@ jobs:
1717
include:
1818
# gfortran on Linux
1919
- os: ubuntu-latest
20-
compiler: gfortran
20+
compiler: gcc
2121
compiler-version: 13
2222
fpm-compiler: gfortran
2323
- os: ubuntu-latest
24-
compiler: gfortran
24+
compiler: gcc
2525
compiler-version: 14
2626
fpm-compiler: gfortran
2727

28+
# gfortran on macOS
29+
- os: macos-latest
30+
compiler: gcc
31+
compiler-version: 13
32+
fpm-compiler: gfortran
33+
- os: macos-latest
34+
compiler: gcc
35+
compiler-version: 14
36+
fpm-compiler: gfortran
37+
- os: macos-latest
38+
compiler: gcc
39+
compiler-version: 15
40+
fpm-compiler: gfortran
41+
2842
steps:
2943
- name: Checkout code
3044
uses: actions/checkout@v4
3145

32-
- name: Install gfortran (Linux)
33-
if: matrix.compiler == 'gfortran' && runner.os == 'Linux'
34-
run: |
35-
sudo apt-get update -y
36-
sudo apt-get install -y gfortran-${{ matrix.compiler-version }}
37-
sudo update-alternatives --install /usr/bin/gfortran gfortran \
38-
/usr/bin/gfortran-${{ matrix.compiler-version }} 100
39-
40-
- name: Install gfortran (macOS)
41-
if: matrix.compiler == 'gfortran' && runner.os == 'macOS'
42-
run: |
43-
brew install gcc@${{ matrix.compiler-version }}
44-
ln -sf /opt/homebrew/bin/gfortran-${{ matrix.compiler-version }} \
45-
/opt/homebrew/bin/gfortran
46-
47-
- name: Install flang (Linux)
48-
if: matrix.compiler == 'flang' && runner.os == 'Linux'
49-
run: |
50-
sudo apt-get update -y
51-
sudo apt-get install -y flang-${{ matrix.compiler-version }}
52-
sudo update-alternatives --install /usr/bin/flang flang \
53-
/usr/bin/flang-${{ matrix.compiler-version }} 100
46+
- name: Install Fortran compiler
47+
uses: fortran-lang/setup-fortran@v1
48+
with:
49+
compiler: ${{ matrix.compiler }}
50+
version: ${{ matrix.compiler-version }}
5451

55-
- name: Install flang (macOS)
56-
if: matrix.compiler == 'flang' && runner.os == 'macOS'
57-
run: |
58-
brew install llvm@${{ matrix.compiler-version }}
59-
ln -sf /opt/homebrew/opt/llvm@${{ matrix.compiler-version }}/bin/flang \
60-
/opt/homebrew/bin/flang
52+
- name: Install fpm (macOS)
53+
if: runner.os == 'macOS'
54+
run: brew install fpm
6155

62-
- name: Install fpm
56+
- name: Install fpm (Linux)
57+
if: runner.os == 'Linux'
6358
uses: fortran-lang/setup-fpm@v7
6459
with:
6560
fpm-version: 'v0.13.0'

0 commit comments

Comments
 (0)