Skip to content

ci: switch to fortran-lang/setup-fortran #276

ci: switch to fortran-lang/setup-fortran

ci: switch to fortran-lang/setup-fortran #276

Workflow file for this run

name: Integration testing
on:
push:
paths-ignore:
- '**.md'
pull_request:
branches:
- master
- develop
paths-ignore:
- '**.md'
schedule:
- cron: '0 6 * * *' # run at 6 AM UTC every day
jobs:
test_modflow:
name: MODFLOW 6 integration tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, macos-latest, windows-2019 ]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
path: executables
- name: Checkout modflow6
uses: actions/checkout@v4
with:
repository: MODFLOW-USGS/modflow6
path: modflow6
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: modflow6/environment.yml
cache-environment: true
cache-downloads: true
init-shell: bash
- name: Setup Intel fortran
uses: fortran-lang/setup-fortran@v1
with:
compiler: intel-classic
version: 2021.7
- name: Build modflow6
working-directory: modflow6
run: |
meson setup builddir --prefix=$(pwd) --libdir=bin -Ddebug=false
meson install -C builddir
- name: Show meson build log
if: failure()
working-directory: modflow6
run: cat builddir/meson-logs/meson-log.txt
- name: Unit test modflow6
working-directory: modflow6
run: meson test --verbose --no-rebuild -C builddir
- name: Update FloPy
working-directory: modflow6/autotest
run: python update_flopy.py
- name: Get executables
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v -s get_exes.py
- name: Make code.json
working-directory: modflow6/bin/downloaded
run: make-code-json --verbose
- name: Build single precision executables
uses: nick-fields/retry@v2
with:
timeout_minutes: 1
max_attempts: 3
command: |
make-program : -ad modflow6/bin/downloaded -fc=$FC -cc $CC
# required for some mf6 autotests comparing mf6 to older programs
- name: Build double precision executables
uses: nick-fields/retry@v2
with:
timeout_minutes: 1
max_attempts: 3
command: |
mfpymake mf2005 -ad modflow6/bin/downloaded -dbl -fc=$FC -cc $CC
mfpymake mfnwt -ad modflow6/bin/downloaded -dbl -fc=$FC -cc $CC
mfpymake mfusg -ad modflow6/bin/downloaded -dbl -fc=$FC -cc $CC
mfpymake mflgr -ad modflow6/bin/downloaded -dbl -fc=$FC -cc $CC
- name: Set executable permission
if: runner.os != 'Windows'
working-directory: modflow6/bin/downloaded
run: |
sudo chmod +x *
ls -l
- name: Test modflow6
working-directory: modflow6/autotest
run: pytest -v -n auto --durations 0