Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MODFLOW 6 continuous integration | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
- ci-diagnose* | |
- netcdf-ci | |
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 -Sy --noconfirm --needed automake autoconf libxml2 libtool git wget curl bzip2 m4 flex bison cmake tar base-devel | |
pacman -S --noconfirm --needed base-devel unzip mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool mingw-w64-x86_64-cmake | |
- name: Install hdf5 | |
shell: msys2 {0} | |
run: | | |
pacman -U https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-hdf5-1.12.2-2-any.pkg.tar.zst | |
- name: Install netcdf-c | |
shell: msys2 {0} | |
run: | | |
cd $HOME | |
wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.9.0.zip | |
unzip v4.9.0.zip | |
cd $HOME/netcdf-c-4.9.0 | |
./configure --enable-static --disable-shared --disable-dap --disable-examples --disable-v2 --disable-utilities --disable-testsets | |
make install | |
- name: Install netcdf-f | |
shell: msys2 {0} | |
run: | | |
cd $HOME | |
wget https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.6.0.zip | |
unzip v4.6.0.zip | |
cd $HOME/netcdf-fortran-4.6.0 | |
LIBS="$(nc-config --libs)" ./configure --enable-static --disable-shared | |
make install | |
- name: Setup Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: modflow6/environment.yml | |
init-shell: >- | |
bash | |
powershell | |
cache-environment: true | |
cache-downloads: true | |
- name: Build modflow6 | |
working-directory: modflow6 | |
run: | | |
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: 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 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" | |