Some while ago I created a setup-fortran action for usage in CI with GitHub actions, which apparently is already in use around the Fortran ecosystem. Turns out I never properly announced it in our discourse, so here we go:
Currently the action allows to setup gfortran
(gcc), ifort
(intel-classic) and ifx
(intel):
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [{compiler: gcc, version: 11}]
include:
- os: ubuntu-latest
toolchain: {compiler: intel, version: '2023.1'}
- os: ubuntu-latest
toolchain: {compiler: intel-classic, version: '2021.9'}
- os: macos-latest
toolchain: {compiler: intel-classic, version: '2021.9'}
steps:
- uses: awvwgk/setup-fortran@v1
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}
- run: ${{ env.FC }} --version
Support for the GCC toolchains:
runner | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---|---|---|---|---|---|---|---|---|
macos-11 | โ | โ | โ | โ | โ | โ | โ | |
macos-12 | โ | โ | โ | โ | โ | โ | โ | |
ubuntu-20.04 | โ | โ | โ | โ | โ | |||
ubuntu-22.04 | โ | โ | โ | โ | ||||
windows-2019 | โ | โ | โ | โ | โ | |||
windows-2022 | โ | โ | โ | โ | โ |
Supported Intel toolchains (the version refers to the compiler version in the output not the version of the oneapi release, read more about this here):
runner | compiler | version |
---|---|---|
ubuntu-* | intel | 2023.1, 2023.0, 2022.2.1, 2022.2, 2022.1, 2022.0, 2021.4, 2021.3, 2021.2, 2021.1.2, 2021.1 |
ubuntu-* | intel-classic | 2021.9, 2021.8, 2021.7.1, 2021.7, 2021.6, 2021.5, 2021.4, 2021.3, 2021.2, 2021.1.2, 2021.1 |
macos-* | intel-classic | 2021.9, 2021.8, 2021.7.1, 2021.7, 2021.6, 2021.5, 2021.4, 2021.3, 2021.2, 2021.1 |
Looking for help with other toolchains, like