Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 7de227c

Browse files
authored
Refactor (#6)
* refactor: inline scripts * docs: remove in-dev badge from README
1 parent 5ed9ffc commit 7de227c

File tree

10 files changed

+11
-52
lines changed

10 files changed

+11
-52
lines changed

.github/workflows/commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: ./
2424
- name: Test
2525
run: |
26-
./scripts/test/test.sh /usr/local/bin/gfortran
26+
./test/test.sh /usr/local/bin/gfortran
2727
test_windows:
2828
name: Test (Windows)
2929
runs-on: windows-latest
@@ -35,4 +35,4 @@ jobs:
3535
- name: Test
3636
shell: pwsh
3737
run: |
38-
./scripts/test/test.ps1
38+
./test/test.ps1

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# install-gfortran-action
22

33
[![CI](https://github.com/modflowpy/install-gfortran-action/actions/workflows/commit.yml/badge.svg?branch=develop)](https://github.com/modflowpy/install-gfortran-action/actions/workflows/commit.yml)
4-
![Status](https://img.shields.io/badge/-under%20development-yellow?style=flat-square)
54

65
An action to install the [GNU Fortran](https://gcc.gnu.org/fortran/) compiler.
76

@@ -22,7 +21,7 @@ To use this action, add a step like the following to your workflow:
2221

2322
```yaml
2423
- name: Install GNU Fortran
25-
uses: modflowpy/install-gfortran-action@v0.0.1
24+
uses: modflowpy/install-gfortran-action@v1
2625
```
2726
2827
GNU fortran is pre-installed on runners for all three platforms, so there is no need to install it fresh — this action simply symlinks the compiler executable to a common location on Linux and MacOS and works around a Windows Server 2022 error preventing the default installation from working properly.

action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@ runs:
1919
sudo ln -fs /usr/local/bin/gcc-11 /usr/local/bin/gcc
2020
sudo ln -fs /usr/local/bin/g++-11 /usr/local/bin/g++
2121
22-
- name: Workaround for windows-2022 v20220626.1 gfortran executable run failures
22+
- name: Workaround v20220626.1 gfortran executable run failures (Windows)
2323
if: runner.os == 'Windows'
2424
shell: bash
2525
run: |
26-
scripts/install/link-gfortranlib5.sh
26+
FCDIR=/c/ProgramData/Chocolatey/bin
27+
LNDIR=/c/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin
28+
if [ -d "$FCDIR" ] && [ -f "$LNDIR/libgfortran-5.dll" ] && [ ! -f "$FCDIR/libgfortran-5.dll" ]; then
29+
ln -s "$LNDIR/libgfortran-5.dll" "$FCDIR/libgfortran-5.dll"
30+
fi
2731
2832
- name: Print GNU compiler versions
2933
if: runner.os != 'Windows'

scripts/install/install-python-std.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

scripts/install/link-gfortranlib5.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

scripts/test/test_install.ps1

Lines changed: 0 additions & 7 deletions
This file was deleted.

scripts/test/test_install.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.
File renamed without changes.

scripts/test/test.ps1 renamed to test/test.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if ((get-command "gfortran" -ErrorAction SilentlyContinue) -eq $null) {
55
write-output "Command gfortran found"
66
}
77

8-
gfortran scripts/test/hw.f90 -o hw
8+
gfortran test/hw.f90 -o hw
99
write-output "Compile succeeded"
1010

1111
$output=$(./hw)

scripts/test/test.sh renamed to test/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ else
2323
exit 1
2424
fi
2525

26-
gfortran scripts/test/hw.f90 -o hw
26+
gfortran test/hw.f90 -o hw
2727
echo "Compile succeeded"
2828

2929
output=$(./hw '2>&1')

0 commit comments

Comments
 (0)