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

Commit

Permalink
Refactor (#6)
Browse files Browse the repository at this point in the history
* refactor: inline scripts
* docs: remove in-dev badge from README
  • Loading branch information
wpbonelli authored Sep 12, 2022
1 parent 5ed9ffc commit 7de227c
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 52 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: ./
- name: Test
run: |
./scripts/test/test.sh /usr/local/bin/gfortran
./test/test.sh /usr/local/bin/gfortran
test_windows:
name: Test (Windows)
runs-on: windows-latest
Expand All @@ -35,4 +35,4 @@ jobs:
- name: Test
shell: pwsh
run: |
./scripts/test/test.ps1
./test/test.ps1
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# install-gfortran-action

[![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)
![Status](https://img.shields.io/badge/-under%20development-yellow?style=flat-square)

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

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

```yaml
- name: Install GNU Fortran
uses: modflowpy/install-gfortran-action@v0.0.1
uses: modflowpy/install-gfortran-action@v1
```
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.
Expand Down
8 changes: 6 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ runs:
sudo ln -fs /usr/local/bin/gcc-11 /usr/local/bin/gcc
sudo ln -fs /usr/local/bin/g++-11 /usr/local/bin/g++
- name: Workaround for windows-2022 v20220626.1 gfortran executable run failures
- name: Workaround v20220626.1 gfortran executable run failures (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
scripts/install/link-gfortranlib5.sh
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"

This comment has been minimized.

Copy link
@pharmpy-dev-123

pharmpy-dev-123 Sep 13, 2022

Wouhou!

fi
- name: Print GNU compiler versions
if: runner.os != 'Windows'
Expand Down
6 changes: 0 additions & 6 deletions scripts/install/install-python-std.sh

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/install/link-gfortranlib5.sh

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/test/test_install.ps1

This file was deleted.

24 changes: 0 additions & 24 deletions scripts/test/test_install.sh

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/test/test.ps1 → test/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if ((get-command "gfortran" -ErrorAction SilentlyContinue) -eq $null) {
write-output "Command gfortran found"
}

gfortran scripts/test/hw.f90 -o hw
gfortran test/hw.f90 -o hw
write-output "Compile succeeded"

$output=$(./hw)
Expand Down
2 changes: 1 addition & 1 deletion scripts/test/test.sh → test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ else
exit 1
fi

gfortran scripts/test/hw.f90 -o hw
gfortran test/hw.f90 -o hw
echo "Compile succeeded"

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

0 comments on commit 7de227c

Please sign in to comment.