forked from fortran-lang/setup-fortran
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.sh
More file actions
43 lines (39 loc) · 909 Bytes
/
main.sh
File metadata and controls
43 lines (39 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
set -ex
compiler=${COMPILER:-gcc}
platform=$(uname -s | tr '[:upper:]' '[:lower:]')
if [[ "$RUNNER_OS" == "macOS" ]] && [[ "$compiler" == "intel" ]]; then
echo "Compiler 'intel' not supported on macOS, falling back to 'intel-classic'"
compiler="intel-classic"
fi
source ./setup-fortran.sh
case $compiler in
gcc)
version=${VERSION:-latest}
install_gcc $platform
;;
intel-classic)
version=${VERSION:-2023.2.0}
install_intel $platform true
;;
intel)
version=${VERSION:-2025.0}
install_intel $platform false
;;
nvidia-hpc)
version=${VERSION:-latest}
install_nvidiahpc $platform
;;
aocc)
version=${VERSION:-latest}
install_aocc $platform
;;
lfortran)
version=${VERSION:-latest}
install_lfortran $platform
;;
*)
echo "Compiler '$compiler' not supported. Please check docs."
exit 1
;;
esac