diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b2294e22a0..1ade21dc7d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: