This repository has been archived by the owner on Jan 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
56 lines (50 loc) · 1.89 KB
/
action.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Install GNU Fortran
description: Install & cache GNU Fortran
runs:
using: composite
steps:
- name: Migration warning
shell: bash
run: |
echo "WARNING: This action is unsupported."
echo "Use fortran-lang/setup-fortran instead (https://github.com/fortran-lang/setup-fortran)."
- name: Symlink to gfortran (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
sudo ln -fs /usr/bin/gfortran-10 /usr/local/bin/gfortran
sudo ln -fs /usr/bin/gcc-10 /usr/local/bin/gcc
sudo ln -fs /usr/bin/g++-10 /usr/local/bin/g++
- name: Symlink to gfortran (MacOS)
if: runner.os == 'macOS'
shell: bash
run: |
sudo ln -fs /usr/local/bin/gfortran-12 /usr/local/bin/gfortran
sudo ln -fs /usr/local/bin/gcc-12 /usr/local/bin/gcc
sudo ln -fs /usr/local/bin/g++-12 /usr/local/bin/g++
# symlink dylib location for previous versions
sudo ln -fs /usr/local/opt/gcc/lib/gcc/12 /usr/local/opt/gcc/lib/gcc/11
sudo ln -fs /usr/local/opt/gcc/lib/gcc/12 /usr/local/opt/gcc/lib/gcc/10
- name: Workaround v20220626.1 gfortran executable run failures (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
FCDIR=/c/ProgramData/Chocolatey/bin
LNDIR=/c/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin
if [ -d "$FCDIR" ] && [ -f "$LNDIR/libgfortran-5.dll" ] && [ ! -f "$FCDIR/libgfortran-5.dll" ]; then
ln -s "$LNDIR/libgfortran-5.dll" "$FCDIR/libgfortran-5.dll"
fi
- name: Print GNU compiler versions
if: runner.os != 'Windows'
shell: bash
run: |
gfortran --version
gcc --version
g++ --version
- name: Print GNU compiler versions (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
gfortran --version
gcc --version
g++ --version