@@ -17,73 +17,67 @@ 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 - os : ubuntu-latest
28- compiler : gfortran
28+ compiler : gcc
2929 compiler-version : 15
3030 fpm-compiler : gfortran
3131
3232 # gfortran on macOS
3333 - os : macos-latest
34- compiler : gfortran
34+ compiler : gcc
3535 compiler-version : 13
3636 fpm-compiler : gfortran
3737 - os : macos-latest
38- compiler : gfortran
38+ compiler : gcc
3939 compiler-version : 14
4040 fpm-compiler : gfortran
4141 - os : macos-latest
42- compiler : gfortran
42+ compiler : gcc
4343 compiler-version : 15
4444 fpm-compiler : gfortran
4545
46+ # flang on Linux
47+ - os : ubuntu-latest
48+ compiler : llvm
49+ compiler-version : 21
50+ fpm-compiler : flang
51+ - os : ubuntu-latest
52+ compiler : llvm
53+ compiler-version : 22
54+ fpm-compiler : flang
55+
56+ # flang on macOS
57+ - os : macos-latest
58+ compiler : llvm
59+ compiler-version : 21
60+ fpm-compiler : flang
61+ - os : macos-latest
62+ compiler : llvm
63+ compiler-version : 22
64+ fpm-compiler : flang
65+
4666 steps :
4767 - name : Checkout code
4868 uses : actions/checkout@v4
4969
50- - name : Install gfortran (Linux)
51- if : matrix.compiler == 'gfortran' && runner.os == 'Linux'
52- run : |
53- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
54- sudo apt-get update -y
55- sudo apt-get install -y gfortran-${{ matrix.compiler-version }}
56- sudo update-alternatives --install /usr/bin/gfortran gfortran \
57- /usr/bin/gfortran-${{ matrix.compiler-version }} 100
58-
59- - name : Install gfortran (macOS)
60- if : matrix.compiler == 'gfortran' && runner.os == 'macOS'
61- run : |
62- brew install gcc@${{ matrix.compiler-version }}
63- ln -sf /opt/homebrew/bin/gfortran-${{ matrix.compiler-version }} \
64- /opt/homebrew/bin/gfortran
65-
66- - name : Install flang (Linux)
67- if : matrix.compiler == 'flang' && runner.os == 'Linux'
68- run : |
69- sudo apt-get update -y
70- sudo apt-get install -y flang-${{ matrix.compiler-version }}
71- sudo update-alternatives --install /usr/bin/flang flang \
72- /usr/bin/flang-${{ matrix.compiler-version }} 100
73-
74- - name : Install flang (macOS)
75- if : matrix.compiler == 'flang' && runner.os == 'macOS'
76- run : |
77- brew install llvm@${{ matrix.compiler-version }}
78- ln -sf /opt/homebrew/opt/llvm@${{ matrix.compiler-version }}/bin/flang \
79- /opt/homebrew/bin/flang
70+ - name : Install Fortran compiler
71+ uses : fortran-lang/setup-fortran@v1
72+ with :
73+ compiler : ${{ matrix.compiler }}
74+ version : ${{ matrix.compiler-version }}
8075
81- - name : Install fpm (macOS, from source )
76+ - name : Install fpm (macOS)
8277 if : runner.os == 'macOS'
83- run : |
84- brew install fpm
78+ run : brew install fpm
8579
86- - name : Install fpm (Linux, from source )
80+ - name : Install fpm (Linux)
8781 if : runner.os == 'Linux'
8882 uses : fortran-lang/setup-fpm@v7
8983 with :
0 commit comments