Skip to content

Commit

Permalink
ci: test with gfortran 13
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Jul 16, 2023
1 parent 34dc907 commit 2959504
Showing 1 changed file with 55 additions and 82 deletions.
137 changes: 55 additions & 82 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- 'doc/**'
jobs:
lint:
name: Lint (fprettify)
name: Check format
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -38,14 +38,14 @@ jobs:
run: python .github/common/fortran_format_check.py

build:
name: Build (gfortran 12)
name: Build
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -l {0}
env:
FC: gfortran
GCC_V: 12
GCC_V: 13
steps:

- name: Checkout modflow6
Expand Down Expand Up @@ -74,14 +74,14 @@ jobs:
run: meson test --verbose --no-rebuild -C builddir

smoke_test:
name: Smoke test (gfortran 12)
name: Smoke test
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -l {0}
env:
FC: gfortran
GCC_V: 12
GCC_V: 13
steps:
- name: Checkout modflow6
uses: actions/checkout@v3
Expand Down Expand Up @@ -127,8 +127,8 @@ jobs:
pytest -v -n auto --durations 0 -S
fi
test_gfortran_latest:
name: Test (gfortran 12)
test_gfortran:
name: Test (gfortran)
needs:
- lint
- build
Expand All @@ -137,13 +137,57 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-12, windows-2022 ]
include:
- {os: ubuntu-20.04, gcc_v: 7}
- {os: ubuntu-20.04, gcc_v: 8}
- {os: ubuntu-20.04, gcc_v: 9}
- {os: ubuntu-20.04, gcc_v: 10}
- {os: ubuntu-20.04, gcc_v: 11}
- {os: ubuntu-22.04, gcc_v: 9}
- {os: ubuntu-22.04, gcc_v: 10}
- {os: ubuntu-22.04, gcc_v: 11}
- {os: ubuntu-22.04, gcc_v: 12}
- {os: ubuntu-22.04, gcc_v: 13}
- {os: macos-11, gcc_v: 6}
- {os: macos-11, gcc_v: 7}
- {os: macos-11, gcc_v: 8}
- {os: macos-11, gcc_v: 9}
- {os: macos-11, gcc_v: 10}
- {os: macos-11, gcc_v: 11}
- {os: macos-11, gcc_v: 12}
- {os: macos-11, gcc_v: 13}
- {os: macos-12, gcc_v: 6}
- {os: macos-12, gcc_v: 7}
- {os: macos-12, gcc_v: 8}
- {os: macos-12, gcc_v: 9}
- {os: macos-12, gcc_v: 10}
- {os: macos-12, gcc_v: 11}
- {os: macos-12, gcc_v: 12}
- {os: macos-12, gcc_v: 13}
- {os: macos-13, gcc_v: 6}
- {os: macos-13, gcc_v: 7}
- {os: macos-13, gcc_v: 8}
- {os: macos-13, gcc_v: 9}
- {os: macos-13, gcc_v: 10}
- {os: macos-13, gcc_v: 11}
- {os: macos-13, gcc_v: 12}
- {os: macos-13, gcc_v: 13}
- {os: windows-2019, gcc_v: 8}
- {os: windows-2019, gcc_v: 9}
- {os: windows-2019, gcc_v: 10}
- {os: windows-2019, gcc_v: 11}
- {os: windows-2019, gcc_v: 12}
- {os: windows-2022, gcc_v: 8}
- {os: windows-2022, gcc_v: 9}
- {os: windows-2022, gcc_v: 10}
- {os: windows-2022, gcc_v: 11}
- {os: windows-2022, gcc_v: 12}

defaults:
run:
shell: bash -l {0}
env:
FC: gfortran
GCC_V: 12
steps:
- name: Checkout modflow6
uses: actions/checkout@v3
Expand All @@ -162,11 +206,11 @@ jobs:
repository: MODFLOW-USGS/modflow6-examples
path: modflow6-examples

- name: Setup GNU Fortran ${{ env.GCC_V }}
- name: Setup GNU Fortran ${{ matrix.gcc_v }}
uses: awvwgk/setup-fortran@main
with:
compiler: gcc
version: ${{ env.GCC_V }}
version: ${{ matrix.gcc_v }}

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
Expand Down Expand Up @@ -237,77 +281,6 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0

test_gfortran_previous:
name: Test gfortran (${{ matrix.GCC_V }}, ${{ matrix.os }})
needs:
- lint
- build
- smoke_test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04 ]
GCC_V: [ 7, 8, 9, 10, 11 ]
defaults:
run:
shell: bash -l {0}
env:
FC: gfortran
steps:

- name: Checkout modflow6
uses: actions/checkout@v3
with:
path: modflow6

- name: Checkout modflow6-testmodels
uses: actions/checkout@v3
with:
repository: MODFLOW-USGS/modflow6-testmodels
path: modflow6-testmodels

- name: Setup GNU Fortran ${{ matrix.GCC_V }}
uses: awvwgk/setup-fortran@main
with:
compiler: gcc
version: ${{ matrix.GCC_V }}

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: modflow6/environment.yml
cache-downloads: true
cache-environment: true

- name: Update flopy
working-directory: modflow6/autotest
run: python update_flopy.py

- name: Build modflow6
working-directory: modflow6
run: |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
meson test --verbose --no-rebuild -C builddir
- name: Get executables
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0 get_exes.py

- name: Test modflow6
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
run: |
if [ "${{ github.ref_name }}" == "master" ]; then
pytest -v -n auto --durations 0 -m "not large and not developmode"
else
pytest -v -n auto --durations 0 -m "not large"
fi
test_ifort:
name: Test (ifort)
needs:
Expand Down

0 comments on commit 2959504

Please sign in to comment.