ci test 1 #1
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: | |
- idm-netcdf-conus-ci | |
paths-ignore: | |
- '**.md' | |
- '**.pdf' | |
- '**.tex' | |
- '**.jpg' | |
- '**.jpeg' | |
- '**.png' | |
- '**.bbl' | |
- '**.bib' | |
- 'doc/**.dat' | |
- 'doc/**.ipynb' | |
- 'doc/**.py' | |
- 'doc/**.sh' | |
- 'doc/**.xlsx' | |
- '.hpc/**' | |
pull_request: | |
branches: | |
- master | |
- develop | |
paths-ignore: | |
- '**.md' | |
- '**.pdf' | |
- '**.tex' | |
- '**.jpg' | |
- '**.jpeg' | |
- '**.png' | |
- '**.bbl' | |
- '**.bib' | |
- 'doc/**.dat' | |
- 'doc/**.ipynb' | |
- 'doc/**.py' | |
- 'doc/**.sh' | |
- 'doc/**.xlsx' | |
- '.hpc/**' | |
jobs: | |
test_gfortran: | |
name: Test gnu fortran | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-22.04, macos-12 ] | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
FC: gfortran | |
GCC: 13 | |
steps: | |
- name: Checkout modflow6 | |
uses: actions/checkout@v4 | |
with: | |
path: modflow6 | |
- name: Checkout modflow6-testmodels | |
uses: actions/checkout@v4 | |
with: | |
repository: MODFLOW-USGS/modflow6-testmodels | |
path: modflow6-testmodels | |
- name: Checkout modflow6-examples | |
uses: actions/checkout@v4 | |
with: | |
repository: MODFLOW-USGS/modflow6-examples | |
path: modflow6-examples | |
- name: Setup GNU Fortran ${{ env.GCC }} | |
uses: fortran-lang/setup-fortran@v1 | |
with: | |
compiler: gcc | |
version: ${{ env.GCC }} | |
- 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: | | |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin | |
meson install -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 | |
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 modflow6 | |
working-directory: modflow6/autotest | |
env: | |
REPOS_PATH: ${{ github.workspace }} | |
run: | | |
pytest -v --durations 0 test_gwf_chd01.py --netcdf | |
test_intel_fortran: | |
name: Test intel fortran | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- {os: ubuntu-22.04, compiler: intel-classic, version: 2021.7} | |
- {os: macos-12, compiler: intel-classic, version: 2021.7} | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout modflow6 | |
uses: actions/checkout@v4 | |
with: | |
path: modflow6 | |
- name: Checkout modflow6-testmodels | |
uses: actions/checkout@v4 | |
with: | |
repository: MODFLOW-USGS/modflow6-testmodels | |
path: modflow6-testmodels | |
- 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: Setup Intel Fortran | |
uses: fortran-lang/setup-fortran@v1 | |
with: | |
compiler: ${{ matrix.compiler }} | |
version: ${{ matrix.version }} | |
- name: Update version files | |
working-directory: modflow6/distribution | |
run: python update_version.py | |
- name: Build modflow6 | |
working-directory: modflow6 | |
run: | | |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin | |
meson install -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 | |
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: | | |
pytest -v --durations 0 test_gwf_chd01.py --netcdf |