Skip to content

Commit

Permalink
ci: use awvwgk/setup-fortran, expand Intel testing
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Jul 28, 2023
1 parent 6598100 commit 91b02c1
Show file tree
Hide file tree
Showing 4 changed files with 218 additions and 63 deletions.
220 changes: 172 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ jobs:
- name: Meson compile
run: meson compile -C builddir

- name: Show build log
if: failure()
run: cat builddir/meson-logs/meson-log.txt

- name: Meson test
run: meson test --verbose --no-rebuild -C builddir

Expand Down Expand Up @@ -106,7 +110,15 @@ jobs:
run: |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
meson test --verbose --no-rebuild -C builddir
- name: Show build log
if: failure()
working-directory: modflow6
run: cat builddir/meson-logs/meson-log.txt

- name: Unit test programs
working-directory: modflow6
run: meson test --verbose --no-rebuild -C builddir

- name: Update flopy
working-directory: modflow6/autotest
Expand Down Expand Up @@ -183,7 +195,15 @@ jobs:
run: |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
meson test --verbose --no-rebuild -C builddir
- name: Show build log
if: failure()
working-directory: modflow6
run: cat builddir/meson-logs/meson-log.txt

- name: Unit test programs
working-directory: modflow6
run: meson test --verbose --no-rebuild -C builddir

- name: Update flopy
working-directory: modflow6/autotest
Expand Down Expand Up @@ -289,8 +309,16 @@ jobs:
run: |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
meson test --verbose --no-rebuild -C builddir
- name: Show build log
if: failure()
working-directory: modflow6
run: cat builddir/meson-logs/meson-log.txt

- name: Unit test programs
working-directory: modflow6
run: meson test --verbose --no-rebuild -C builddir

- name: Get executables
working-directory: modflow6/autotest
env:
Expand All @@ -308,8 +336,8 @@ jobs:
pytest -v -n auto --durations 0 -m "not large"
fi
test_ifort:
name: Test (ifort)
test_intel:
name: Test (Intel)
needs:
- lint
- build
Expand All @@ -318,7 +346,130 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
### ifx
## 2022.2.x autotests disabled
# - mf5to6 test_evt: failure to converge
# - mf6 Keating_[disu_]dev: bad head comparison
- os: ubuntu-22.04
intel_compiler: intel
intel_version: 2022.2.1
test: false
- os: ubuntu-22.04
intel_compiler: intel
intel_version: 2022.2
test: false
## 2021.1 segfault in meson serial sim test
# - os: ubuntu-22.04
# intel_compiler: intel
# intel_version: 2022.1
# test: false
## 2022.0 & 2021.[1,2,4] segfault at compile time
# - os: ubuntu-22.04
# intel_compiler: intel
# intel_version: "2022.0"
# test: false
# - os: ubuntu-22.04
# intel_compiler: intel
# intel_version: 2021.4
# test: false
# - os: ubuntu-22.04
# intel_compiler: intel
# intel_version: 2021.2
# test: false
# - os: ubuntu-22.04
# intel_compiler: intel
# intel_version: 2021.1
# test: false
## ifx not yet supported on macOS
# - os: macos-12
# intel_compiler: intel
# intel_version: 2023.2
# test: true
- os: windows-20222023.3 |
test: true
## 2023.[0,1] fail to compile
# - os: windows-2022
# intel_compiler: intel
# intel_version: 2023.1
# test: false
# - os: windows-2022
# intel_compiler: intel
# intel_version: "2023.0"
# test: false
- os: windows-2022
intel_compiler: intel
intel_version: 2022.2
test: false
## 2022.1 fail to link
# - os: windows-2022
# intel_compiler: intel
# intel_version: 2022.1
# test: false

### ifort
## only autotest latest on each platform
- os: ubuntu-22.04
intel_compiler: intel-classic
intel_version: "2021.10"
test: true
- os: ubuntu-22.04
intel_compiler: intel-classic
intel_version: 2021.9
test: false
- os: ubuntu-22.04
intel_compiler: intel-classic
intel_version: 2021.8
test: false
- os: ubuntu-22.04
intel_compiler: intel-classic
intel_version: 2021.7
test: false
- os: ubuntu-22.04
intel_compiler: intel-classic
intel_version: 2021.6
test: false
- os: macos-12
intel_compiler: intel-classic
intel_version: "2021.10"
test: true
- os: macos-12
intel_compiler: intel-classic
intel_version: 2021.9
test: false
- os: macos-12
intel_compiler: intel-classic
intel_version: 2021.8
test: false
- os: macos-12
intel_compiler: intel-classic
intel_version: 2021.7
test: false
- os: macos-12
intel_compiler: intel-classic
intel_version: 2021.6
test: false
- os: windows-2022
intel_compiler: intel-classic
intel_version: "2021.10"
test: true
- os: windows-2022
intel_compiler: intel-classic
intel_version: 2021.9
test: false
- os: windows-2022
intel_compiler: intel-classic
intel_version: 2021.8
test: false
- os: windows-2022
intel_compiler: intel-classic
intel_version: 2021.7
test: false
- os: windows-2022
intel_compiler: intel-classic
intel_version: 2021.6
test: false

defaults:
run:
shell: bash -l {0}
Expand Down Expand Up @@ -346,50 +497,44 @@ jobs:
cache-downloads: true

- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1
uses: awvwgk/setup-fortran@main
with:
compiler: ${{ matrix.intel_compiler }}
version: ${{ matrix.intel_version }}

- name: Update version files
working-directory: modflow6/distribution
run: python update_version.py

- name: Build modflow6
if: runner.os != 'Windows'
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: Build modflow6 (Windows)
if: runner.os == 'Windows'
- name: Show build log
if: failure()
working-directory: modflow6
shell: pwsh
run: |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
meson test --verbose --no-rebuild -C builddir
run: cat builddir/meson-logs/meson-log.txt

- name: Unit test programs
working-directory: modflow6
run: meson test --verbose --no-rebuild -C builddir

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

- name: Get executables
if: runner.os != 'Windows'
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0 get_exes.py

- name: Get executables (Windows)
if: runner.os == 'Windows'
if: matrix.test
working-directory: modflow6/autotest
shell: pwsh
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0 get_exes.py

- name: Test programs
if: runner.os != 'Windows'
if: matrix.test
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
Expand All @@ -400,30 +545,9 @@ jobs:
pytest -v -n auto --durations 0 -m "not large"
fi
- name: Test programs (Windows)
if: runner.os == 'Windows'
working-directory: modflow6/autotest
shell: pwsh
env:
REPOS_PATH: ${{ github.workspace }}
run: |
if ( "${{ github.ref_name }}" -eq "master" ) {
pytest -v -n auto --durations 0 -m "not large and not developmode"
} else {
pytest -v -n auto --durations 0 -m "not large"
}
- name: Test scripts
if: runner.os != 'Windows'
working-directory: modflow6/distribution
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0

- name: Test scripts (Windows)
if: runner.os == 'Windows'
if: matrix.test
working-directory: modflow6/distribution
shell: pwsh
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/large.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: MODFLOW 6 large models
on:
schedule:
- cron: '0 6 * * *' # run at 6 AM UTC every day
env:
GCC_V: 12
IFORT_V: 2021.7.0
jobs:
cache_ifort:
name: Cache Intel OneAPI compilers
Expand All @@ -11,8 +14,13 @@ jobs:
matrix:
os: [ ubuntu-22.04, macos-12, windows-2022 ]
steps:
- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1

- name: Setup ifort ${{ env.IFORT_V }}
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ env.IFORT_V }}

test:
name: Test
runs-on: ubuntu-22.04
Expand All @@ -24,8 +32,6 @@ jobs:
defaults:
run:
shell: bash -l {0}
env:
GCC_V: 12
steps:

- name: Checkout modflow6
Expand Down Expand Up @@ -53,9 +59,12 @@ jobs:
compiler: gcc
version: ${{ env.GCC_V }}

- name: Setup ifort
- name: Setup ifort ${{ env.IFORT_V }}}
if: matrix.fc == 'ifort'
uses: modflowpy/install-intelfortran-action@v1
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ env.IFORT_V }}

- name: Cache modflow6 examples
id: cache-examples
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ on:
value: ${{ jobs.build.outputs.distname }}
env:
FC: ifort
IFORT_V: 2021.7.0
jobs:
build:
name: Build binaries (${{ matrix.os }})
Expand Down Expand Up @@ -85,7 +86,10 @@ jobs:
powershell
- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ env.IFORT_V }}

- name: Set version number
id: set_version
Expand Down Expand Up @@ -279,7 +283,10 @@ jobs:
cache-environment: true

- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ env.IFORT_V }}

- name: Update version
id: update_version
Expand Down Expand Up @@ -416,7 +423,10 @@ jobs:
powershell
- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ env.IFORT_V }}

- name: Update version
id: update_version
Expand Down
Loading

0 comments on commit 91b02c1

Please sign in to comment.