Skip to content

MODFLOW 6 large models #174

MODFLOW 6 large models

MODFLOW 6 large models #174

Workflow file for this run

name: MODFLOW 6 large models
on:
schedule:
- cron: '0 6 * * *' # run at 6 AM UTC every day
jobs:
cache_ifort:
name: Cache Intel OneAPI compilers
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-12, windows-2022 ]
steps:
- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1
test:
name: Test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
fc: [ ifort, gfortran ]
repo: [ examples, largetestmodels ]
defaults:
run:
shell: bash -l {0}
env:
GCC_V: 12
steps:
- name: Checkout modflow6
uses: actions/checkout@v3
with:
path: modflow6
- name: Checkout modflow6-${{ matrix.repo }}
uses: actions/checkout@v3
with:
repository: MODFLOW-USGS/modflow6-${{ matrix.repo }}
path: modflow6-${{ matrix.repo }}
- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: modflow6/environment.yml
cache-downloads: true
cache-env: true
- name: Setup gfortran ${{ env.GCC_V }}
if: matrix.FC == 'gfortran'
uses: awvwgk/setup-fortran@main
with:
compiler: gcc
version: ${{ env.GCC_V }}
- name: Setup ifort
if: matrix.fc == 'ifort'
uses: modflowpy/install-intelfortran-action@v1
- name: Cache modflow6 examples
id: cache-examples
uses: actions/cache@v3
with:
path: modflow6-examples/examples
key: modflow6-examples-${{ hashFiles('modflow6-examples/scripts/**') }}
- name: Install extra Python packages
if: matrix.repo == 'examples' && steps.cache-examples.outputs.cache-hit != 'true'
working-directory: modflow6-examples/etc
run: |
pip install -r requirements.pip.txt
- name: Build example models
if: matrix.repo == 'examples' && steps.cache-examples.outputs.cache-hit != 'true'
working-directory: modflow6-examples/etc
run: |
python ci_build_files.py
ls -lh ../examples/
- name: Add Micromamba Scripts dir to path (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
# add micromamba scripts dir to system path
$mamba_bin = "C:\Users\runneradmin\micromamba-root\envs\modflow6\Scripts"
echo $mamba_bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build modflow6
working-directory: modflow6
run: |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
- name: Get executables
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
pytest -v --durations 0 get_exes.py
- name: Update flopy
working-directory: modflow6/autotest
run: |
python update_flopy.py
- name: Run tests
working-directory: modflow6/autotest
run: |
pytest -v -n auto --durations 0 test_z03_${{ matrix.repo }}.py