Skip to content

Commit

Permalink
test build netcdf-fortran 4
Browse files Browse the repository at this point in the history
  • Loading branch information
mjreno authored and mjreno committed Jul 20, 2023
1 parent b24165a commit 2279b5b
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,104 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0

test_netcdf_choc:
name: Test (gfortran 12)
needs:
- lint
- build
- smoke_test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
#os: [ ubuntu-22.04, macos-12, windows-2022 ]
os: [ windows-2022 ]
defaults:
run:
shell: bash -l {0}
env:
FC: gfortran
GCC_V: 12
steps:
- name: Checkout modflow6
uses: actions/checkout@v3
with:
path: modflow6

- name: Checkout modflow6-testmodels
uses: actions/checkout@v3
with:
repository: MODFLOW-USGS/modflow6-testmodels
path: modflow6-testmodels

- name: Checkout modflow6-examples
uses: actions/checkout@v3
with:
repository: MODFLOW-USGS/modflow6-examples
path: modflow6-examples

- name: Setup GNU Fortran ${{ env.GCC_V }}
uses: awvwgk/setup-fortran@main
with:
compiler: gcc
version: ${{ env.GCC_V }}

- 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: Setup netcdf build env
if: runner.os == 'Windows'
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 mingw-w64-x86_64-hdf5
#wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.9.2.zip
mkdir netcdf-c
unzip v4.9.2.zip -d netcdf-c
wget https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.6.1.zip
mkdir netcdf-fortran
unzip v4.6.1.zip -d netcdf-fortran
- name: Install netcdf-c
if: runner.os == 'Windows'
working-directory: netcdf-c/netcdf-c-4.9.2
run: |
./configure --enable-static --disable-shared --disable-dap --disable-examples --disable-v2 --disable-utilities --disable-testsets --disable-libxml2
make install
nc-config --all
- name: Install netcdf-fortran
if: runner.os == 'Windows'
working-directory: netcdf-fortran/netcdf-fortran-4.6.1
run: |
LIBS="$(nc-config --libs)" ./configure --enable-static --disable-shared
make install
nf-config --all
- name: Build modflow6
working-directory: modflow6
run: |
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
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
netcdf_test:
name: netcdf testing
needs:
Expand Down

0 comments on commit 2279b5b

Please sign in to comment.