In addition to fortran-lang/setup-fortran (thank @awvwgk and contributors), I use the following scripts for the GitHub Actions of PRIMA to install Fortran compilers on GitHub-hosted runners.
-
Intel oneAPI (alternative to fortran-lang/setup-fortran)
-
NVIDIA nvfortran
https://github.com/equipez/github_actions_scripts/blob/main/install_nvfortran -
AMD AOCC flang
https://github.com/equipez/github_actions_scripts/blob/main/install_aocc -
Classic flang
https://github.com/equipez/github_actions_scripts/blob/main/install_flang
I also have scripts to install sunf95 and g95 on GitHub-hosted runners even though these compilers are discontinued.
The scripts are naive (e.g., call apt install
to install oneapi
), and they may take a few minutes to run, which is tolerable in my case.
Here is a concrete workflow that applies them:
https://github.com/s-prima/prima/blob/main/.github/workflows/lint_hosted.yml#L87-L117,
where the Fortran source code of PRIMA is compiled using eight compilers (gfortran
, ifort
, ifx
, nvfortran
, AOCC flang
, Classic flang
, sunf95
, and g95
) with strict debug options to make sure that no error (of course) or warning is raised (PRIMA does not tolerate any warning).
N.B.: Do not use the scripts on your own computers before examining them. They may make unwanted changes to your system.