Skip to content

Workflow file for this run

name: MODFLOW 6 continuous integration
on:
push:
branches:
- master
- develop
- ci-diagnose*
- ncci
paths-ignore:
- '**.md'
- 'doc/**'
pull_request:
branches:
- master
- develop
paths-ignore:
- '**.md'
- 'doc/**'
jobs:
netcdf_test_win:
name: netcdf4 testing
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ windows-2022 ]
#hdf5: [ 1.12.2 ]
#netcdf: [ v4.7.4, v4.8.1, v4.9.0, main ]
#netcdf: [ v4.9.0, main ]
defaults:
run:
shell: bash -l {0}
env:
FC: gfortran
GCC_V: 12
steps:
- name: Checkout modflow6
uses: actions/checkout@v3
with:
path: modflow6
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
install: |
git
make
mingw-w64-x86_64-gcc
mingw-w64-x86_64-python
mingw-w64-x86_64-python-pip
mingw-w64-x86_64-python-pytest
- name: Setup GNU Fortran ${{ env.GCC_V }}
uses: awvwgk/setup-fortran@main
with:
compiler: gcc
version: ${{ env.GCC_V }}
- name: Install System dependencies
shell: msys2 {0}
run: |
pacman -Syu
pacman -S --noconfirm --needed base-devel unzip mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool mingw-w64-x86_64-cmake
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: modflow6/environment.yml
create-args: >-
pkg-config
netcdf-fortran
init-shell: >-
bash
powershell
cache-environment: true
cache-downloads: true
- name: Build modflow6
working-directory: modflow6
run: |
#echo "LD_LIBRARY_PATH=/d/a/_temp/msys64/mingw64/lib" >> $GITHUB_ENV
#echo "PATH=/d/a/_temp/msys64/mingw64/bin" >> $GITHUB_ENV
#echo "PATH=/d/a/_temp/msys64/mingw64/bin:/d/a/modflow6/modflow6/modflow6/bin:/d/a/modflow6/modflow6/ncf/netcdf-fortran-4.6.0/fortran/.libs" >> $GITHUB_ENV
find /c/Users/runneradmin/micromamba/envs | grep -i netcdf
which nf-config
which nc-config
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
- name: Show Meson logs
if: failure()
working-directory: modflow6
run: cat builddir/meson-logs/meson-log.txt
- name: Check exe
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
run: |
which dumpbin
which dumpbin.exe
echo "LD_LIBRARY_PATH:"
echo $LD_LIBRARY_PATH
echo "PATH:"
echo $PATH
ls -l /d/a/modflow6/modflow6/modflow6/bin
echo "FILE:"
file /d/a/modflow6/modflow6/modflow6/bin/mf6.exe
echo "LDD1:"
ldd /d/a/modflow6/modflow6/modflow6/bin/mf6.exe
which mf6.exe
#mf6.exe
DYLD_LIBRARY_PATH=/d/a/modflow6/modflow6/modflow6/bin mf6.exe --version
- 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 --durations 0 get_exes.py
- name: Test nc4 program
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
run: |
pytest -v test_gwf_chd01.py -s --keep temp
cat temp/test_mf6model[chd01]0/mfsim.lst | grep -i netcdf
- name: Test programs
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
run: |
branch="${{ github.ref_name }}"
marker="not large"
markers=$([ "$branch" == "master" ] && echo "$marker and not developmode" || echo "$marker")
pytest -v -n auto --durations 0 -m "$markers"