From 77f64d97e405aa9966ea336d0315aa4743ac5191 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Thu, 25 Jul 2024 09:50:33 -0400 Subject: [PATCH 1/5] debug win parallel serial tests --- .github/actions/test-par-win/action.yml | 11 + .github/common/test_modflow6_serial.bat | 4 + .github/workflows/ci.yml | 944 ++++++++++++------------ 3 files changed, 487 insertions(+), 472 deletions(-) create mode 100644 .github/common/test_modflow6_serial.bat diff --git a/.github/actions/test-par-win/action.yml b/.github/actions/test-par-win/action.yml index 27e5e274223..492dd4f8cc0 100644 --- a/.github/actions/test-par-win/action.yml +++ b/.github/actions/test-par-win/action.yml @@ -32,6 +32,17 @@ runs: run: | "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6.bat" + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 + + - name: Test programs (serial) + if: github.ref_name != 'master' + shell: cmd + env: + REPOS_PATH: ${{ github.workspace }} + run: | + "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_serial.bat" + - name: Test programs if: github.ref_name == 'master' shell: cmd diff --git a/.github/common/test_modflow6_serial.bat b/.github/common/test_modflow6_serial.bat new file mode 100644 index 00000000000..b92f2e8d57d --- /dev/null +++ b/.github/common/test_modflow6_serial.bat @@ -0,0 +1,4 @@ +cd "%GITHUB_WORKSPACE%\modflow6\autotest" +where libpetsc.dll +ldd ..\bin\mf6 +pixi run pytest -v --durations=0 --keep-failed .failed -m "%MARKERS%" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce42d365270..c806da02e0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,440 +41,440 @@ concurrency: env: PIXI_BETA_WARNING_OFF: true jobs: - lint: - name: Check format - runs-on: ubuntu-latest - steps: - - - name: Checkout MF6 - uses: actions/checkout@v4 - - - name: Setup pixi - uses: prefix-dev/setup-pixi@v0.8.1 - with: - pixi-version: v0.24.2 - - - name: Check Fortran source formatting - run: pixi run check-format - - - name: Check MSVS project files - run: pixi run check-vfproj - - - name: Check python lint - run: pixi run check-python-lint - - - name: Check python format - run: pixi run check-python-format - - - name: Check CITATION.cff - uses: dieghernan/cff-validator@v3 - - build: - name: Build - runs-on: ubuntu-22.04 - env: - FC: gfortran - FC_V: 13 - steps: - - - name: Checkout MF6 - uses: actions/checkout@v4 - - - name: Setup ${{ env.FC }} ${{ env.FC_V }} - uses: fortran-lang/setup-fortran@v1 - with: - compiler: gcc - version: ${{ env.FC_V }} - - - name: Setup pixi - uses: prefix-dev/setup-pixi@v0.8.1 - with: - pixi-version: v0.24.2 - - - name: Setup MF6 - run: pixi run setup -Dwerror=true builddir - - - name: Build MF6 - run: pixi run build builddir - - - name: Show build log - if: failure() - run: cat builddir/meson-logs/meson-log.txt - - - name: Unit test MF6 - run: pixi run test builddir - - smoke_test: - name: Smoke test - runs-on: ubuntu-22.04 - defaults: - run: - shell: bash - env: - FC: gfortran - FC_V: 13 - steps: - - name: Checkout MF6 - uses: actions/checkout@v4 - with: - path: modflow6 - - - name: Checkout test-drive - uses: actions/checkout@v4 - with: - repository: fortran-lang/test-drive - path: test-drive - - - name: Setup ${{ env.FC }} ${{ env.FC_V }} - uses: fortran-lang/setup-fortran@v1 - with: - compiler: gcc - version: ${{ env.FC_V }} - - - name: Setup pixi - uses: prefix-dev/setup-pixi@v0.8.1 - with: - pixi-version: v0.24.2 - manifest-path: "modflow6/pixi.toml" - - - name: Custom pixi install - working-directory: modflow6 - run: pixi run install - - - name: Build test-drive - working-directory: test-drive - run: | - pixi run --manifest-path=../modflow6/pixi.toml meson setup builddir --prefix=$(pwd) --libdir=lib - pixi run --manifest-path=../modflow6/pixi.toml meson install -C builddir - echo "PKG_CONFIG_PATH=$(pwd)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV - - - name: Build MF6 - working-directory: modflow6 - run: | - pixi run setup builddir - pixi run build builddir - - - name: Show build log - if: failure() - working-directory: modflow6 - run: cat builddir/meson-logs/meson-log.txt - - - name: Unit test MF6 - working-directory: modflow6 - run: pixi run test builddir - - - name: Update flopy - working-directory: modflow6 - run: pixi run update-flopy - - - name: Get executables - working-directory: modflow6 - env: - GITHUB_TOKEN: ${{ github.token }} - run: pixi run get-exes - - - name: Test MF6 - working-directory: modflow6 - run: | - if [ "${{ github.ref_name }}" == "master" ]; then - pixi run autotest -m "not slow and not regression and not developmode" - else - pixi run autotest --smoke - fi - - - name: Upload failed test output - if: failure() - uses: actions/upload-artifact@v4 - with: - name: failed-smoke-${{ runner.os }}-${{ env.FC }}-${{ env.FC_V }} - path: modflow6/autotest/.failed - - test_gfortran: - name: Test GNU fortran - needs: - - lint - - build - - smoke_test - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ ubuntu-22.04, macos-12, macos-14, windows-2022 ] - defaults: - run: - shell: bash - env: - FC: gfortran - FC_V: 13 - steps: - - name: Checkout MF6 - uses: actions/checkout@v4 - with: - path: modflow6 - - - name: Checkout test models - uses: actions/checkout@v4 - with: - repository: MODFLOW-USGS/modflow6-testmodels - path: modflow6-testmodels - - - name: Checkout examples - uses: actions/checkout@v4 - with: - repository: MODFLOW-USGS/modflow6-examples - path: modflow6-examples - - - name: Setup ${{ env.FC }} ${{ env.FC_V }} - uses: fortran-lang/setup-fortran@v1 - with: - compiler: gcc - version: ${{ env.FC_V }} - - - name: Setup pixi - uses: prefix-dev/setup-pixi@v0.8.1 - with: - pixi-version: v0.24.2 - manifest-path: "modflow6/pixi.toml" - - - name: Custom pixi install - working-directory: modflow6 - run: pixi run install - - - name: Set LDFLAGS (macOS) - if: matrix.os == 'macos-14' - run: | - os_ver=$(sw_vers -productVersion | cut -d'.' -f1) - if (( "$os_ver" > 12 )); then - ldflags="$LDFLAGS -Wl,-ld_classic" - echo "LDFLAGS=$ldflags" >> $GITHUB_ENV - fi - - - name: Build MF6 - working-directory: modflow6 - run: | - setupargs="" - if [[ "${{ matrix.os }}" == "macos-14" ]]; then - setupargs="-Doptimization=1" - fi - pixi run setup builddir $setupargs - pixi run build builddir - - - name: Show build log - if: failure() - working-directory: modflow6 - run: cat builddir/meson-logs/meson-log.txt - - - name: Unit test MF6 - working-directory: modflow6 - run: pixi run test builddir - - - name: Update flopy - working-directory: modflow6 - run: pixi run update-flopy - - - name: Get executables - working-directory: modflow6/autotest - env: - GITHUB_TOKEN: ${{ github.token }} - run: pixi run get-exes - - - name: Test MF6 - working-directory: modflow6 - env: - REPOS_PATH: ${{ github.workspace }} - run: | - markers="" - if [[ "${{ github.ref_name }}" == "master" ]]; then - markers="not large and not developmode" - else - markers="not large" - fi - - filters="" - if [[ "${{ matrix.os }}" == "macos-14" ]]; then - # comparison fails on macos-14 with optimization=1 - filters="not test028_sfr_rewet" - fi - - pixi run autotest -m "$markers" -k "$filters" - - - name: Install executables - if: runner.os == 'Linux' - uses: modflowpy/install-modflow-action@v1 - - - name: Test MF6 examples - if: runner.os == 'Linux' - working-directory: modflow6 - shell: pixi run bash -e {0} - run: | - cp bin/mf6 $(which mf6) - cd ../modflow6-examples/autotest - pytest -v -n auto test_scripts.py - - - name: Upload failed test output - if: failure() - uses: actions/upload-artifact@v4 - with: - name: failed-${{ matrix.os }}-${{ env.FC }}-${{ env.FC_V }} - path: modflow6/autotest/.failed - - - name: Checkout usgslatex - if: runner.os == 'Linux' - uses: actions/checkout@v4 - with: - repository: MODFLOW-USGS/usgslatex - path: usgslatex - - - name: Install TeX Live - if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt install texlive-science \ - texlive-latex-extra \ - texlive-font-utils \ - texlive-fonts-recommended \ - texlive-fonts-extra - - - name: Install USGS LaTeX style files and Univers font - if: runner.os == 'Linux' - working-directory: usgslatex/usgsLaTeX - run: sudo ./install.sh --all-users - - - name: Test distribution scripts - working-directory: modflow6 - env: - GITHUB_TOKEN: ${{ github.token }} - run: pixi run test-dist-scripts - - test_intel_fortran: - name: Test Intel fortran - needs: - - lint - - build - - smoke_test - runs-on: ${{ matrix.os }} - env: - FC: intel-classic - FC_V: "2021.7" - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04, macos-12, windows-2022] - defaults: - run: - shell: bash - steps: - - - name: Checkout MF6 - uses: actions/checkout@v4 - with: - path: modflow6 - - - name: Checkout test models - uses: actions/checkout@v4 - with: - repository: MODFLOW-USGS/modflow6-testmodels - path: modflow6-testmodels - - - name: Checkout examples - uses: actions/checkout@v4 - with: - repository: MODFLOW-USGS/modflow6-examples - path: modflow6-examples - - - name: Setup pixi - uses: prefix-dev/setup-pixi@v0.8.1 - with: - pixi-version: v0.24.2 - manifest-path: "modflow6/pixi.toml" - - - name: Custom pixi install - working-directory: modflow6 - run: pixi run install - - - name: Setup ${{ env.FC }} ${{ env.FC_V }} - uses: fortran-lang/setup-fortran@v1 - with: - compiler: ${{ env.FC }} - version: ${{ env.FC_V }} - - - name: Update version files - working-directory: modflow6 - run: pixi run update-version - - - name: Build MF6 - working-directory: modflow6 - run: | - pixi run setup builddir - pixi run build builddir - - - name: Show build log - if: failure() - working-directory: modflow6 - run: cat builddir/meson-logs/meson-log.txt - - - name: Unit test MF6 - working-directory: modflow6 - run: pixi run test builddir - - - name: Update flopy - working-directory: modflow6 - run: pixi run update-flopy - - - name: Get executables - working-directory: modflow6 - env: - GITHUB_TOKEN: ${{ github.token }} - run: pixi run get-exes - - - name: Test MF6 - working-directory: modflow6 - env: - REPOS_PATH: ${{ github.workspace }} - run: | - if [ "${{ github.ref_name }}" == "master" ]; then - pixi run autotest -m "not large and not developmode" - else - pixi run autotest -m "not large" - fi - - - name: Install executables - if: runner.os == 'Linux' - uses: modflowpy/install-modflow-action@v1 - - - name: Test examples - if: runner.os == 'Linux' - working-directory: modflow6 - shell: pixi run bash -e {0} - run: | - cp bin/mf6 $(which mf6) - cd ../modflow6-examples/autotest - pytest -v -n auto test_scripts.py - - - name: Upload failed test output - if: failure() - uses: actions/upload-artifact@v4 - with: - name: failed-${{ matrix.os }}-${{ env.FC }}-${{ env.FC_V }} - path: modflow6/autotest/.failed - - - name: Test scripts - working-directory: modflow6 - env: - GITHUB_TOKEN: ${{ github.token }} - run: pixi run test-dist-scripts + # lint: + # name: Check format + # runs-on: ubuntu-latest + # steps: + + # - name: Checkout MF6 + # uses: actions/checkout@v4 + + # - name: Setup pixi + # uses: prefix-dev/setup-pixi@v0.8.1 + # with: + # pixi-version: v0.24.2 + + # - name: Check Fortran source formatting + # run: pixi run check-format + + # - name: Check MSVS project files + # run: pixi run check-vfproj + + # - name: Check python lint + # run: pixi run check-python-lint + + # - name: Check python format + # run: pixi run check-python-format + # + # - name: Check CITATION.cff + # uses: dieghernan/cff-validator@v3 + + # build: + # name: Build + # runs-on: ubuntu-22.04 + # env: + # FC: gfortran + # FC_V: 13 + # steps: + + # - name: Checkout MF6 + # uses: actions/checkout@v4 + # + # - name: Setup ${{ env.FC }} ${{ env.FC_V }} + # uses: fortran-lang/setup-fortran@v1 + # with: + # compiler: gcc + # version: ${{ env.FC_V }} + + # - name: Setup pixi + # uses: prefix-dev/setup-pixi@v0.8.1 + # with: + # pixi-version: v0.24.2 + + # - name: Setup MF6 + # run: pixi run setup -Dwerror=true builddir + + # - name: Build MF6 + # run: pixi run build builddir + + # - name: Show build log + # if: failure() + # run: cat builddir/meson-logs/meson-log.txt + + # - name: Unit test MF6 + # run: pixi run test builddir + + # smoke_test: + # name: Smoke test + # runs-on: ubuntu-22.04 + # defaults: + # run: + # shell: bash + # env: + # FC: gfortran + # FC_V: 13 + # steps: + # - name: Checkout MF6 + # uses: actions/checkout@v4 + # with: + # path: modflow6 + # + # - name: Checkout test-drive + # uses: actions/checkout@v4 + # with: + # repository: fortran-lang/test-drive + # path: test-drive + + # - name: Setup ${{ env.FC }} ${{ env.FC_V }} + # uses: fortran-lang/setup-fortran@v1 + # with: + # compiler: gcc + # version: ${{ env.FC_V }} + + # - name: Setup pixi + # uses: prefix-dev/setup-pixi@v0.8.1 + # with: + # pixi-version: v0.24.2 + # manifest-path: "modflow6/pixi.toml" + + # - name: Custom pixi install + # working-directory: modflow6 + # run: pixi run install + + # - name: Build test-drive + # working-directory: test-drive + # run: | + # pixi run --manifest-path=../modflow6/pixi.toml meson setup builddir --prefix=$(pwd) --libdir=lib + # pixi run --manifest-path=../modflow6/pixi.toml meson install -C builddir + # echo "PKG_CONFIG_PATH=$(pwd)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV + + # - name: Build MF6 + # working-directory: modflow6 + # run: | + # pixi run setup builddir + # pixi run build builddir + + # - name: Show build log + # if: failure() + # working-directory: modflow6 + # run: cat builddir/meson-logs/meson-log.txt + # + # - name: Unit test MF6 + # working-directory: modflow6 + # run: pixi run test builddir + + # - name: Update flopy + # working-directory: modflow6 + # run: pixi run update-flopy + + # - name: Get executables + # working-directory: modflow6 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # run: pixi run get-exes + + # - name: Test MF6 + # working-directory: modflow6 + # run: | + # if [ "${{ github.ref_name }}" == "master" ]; then + # pixi run autotest -m "not slow and not regression and not developmode" + # else + # pixi run autotest --smoke + # fi + + # - name: Upload failed test output + # if: failure() + # uses: actions/upload-artifact@v4 + # with: + # name: failed-smoke-${{ runner.os }}-${{ env.FC }}-${{ env.FC_V }} + # path: modflow6/autotest/.failed + + # test_gfortran: + # name: Test GNU fortran + # needs: + # - lint + # - build + # - smoke_test + # runs-on: ${{ matrix.os }} + # strategy: + # fail-fast: false + # matrix: + # os: [ ubuntu-22.04, macos-12, macos-14, windows-2022 ] + # defaults: + # run: + # shell: bash + # env: + # FC: gfortran + # FC_V: 13 + # steps: + # - name: Checkout MF6 + # uses: actions/checkout@v4 + # with: + # path: modflow6 + + # - name: Checkout test models + # uses: actions/checkout@v4 + # with: + # repository: MODFLOW-USGS/modflow6-testmodels + # path: modflow6-testmodels + # + # - name: Checkout examples + # uses: actions/checkout@v4 + # with: + # repository: MODFLOW-USGS/modflow6-examples + # path: modflow6-examples + # + # - name: Setup ${{ env.FC }} ${{ env.FC_V }} + # uses: fortran-lang/setup-fortran@v1 + # with: + # compiler: gcc + # version: ${{ env.FC_V }} + + # - name: Setup pixi + # uses: prefix-dev/setup-pixi@v0.8.1 + # with: + # pixi-version: v0.24.2 + # manifest-path: "modflow6/pixi.toml" + + # - name: Custom pixi install + # working-directory: modflow6 + # run: pixi run install + + # - name: Set LDFLAGS (macOS) + # if: matrix.os == 'macos-14' + # run: | + # os_ver=$(sw_vers -productVersion | cut -d'.' -f1) + # if (( "$os_ver" > 12 )); then + # ldflags="$LDFLAGS -Wl,-ld_classic" + # echo "LDFLAGS=$ldflags" >> $GITHUB_ENV + # fi + + # - name: Build MF6 + # working-directory: modflow6 + # run: | + # setupargs="" + # if [[ "${{ matrix.os }}" == "macos-14" ]]; then + # setupargs="-Doptimization=1" + # fi + # pixi run setup builddir $setupargs + # pixi run build builddir + + # - name: Show build log + # if: failure() + # working-directory: modflow6 + # run: cat builddir/meson-logs/meson-log.txt + # + # - name: Unit test MF6 + # working-directory: modflow6 + # run: pixi run test builddir + + # - name: Update flopy + # working-directory: modflow6 + # run: pixi run update-flopy + + # - name: Get executables + # working-directory: modflow6/autotest + # env: + # GITHUB_TOKEN: ${{ github.token }} + # run: pixi run get-exes + + # - name: Test MF6 + # working-directory: modflow6 + # env: + # REPOS_PATH: ${{ github.workspace }} + # run: | + # markers="" + # if [[ "${{ github.ref_name }}" == "master" ]]; then + # markers="not large and not developmode" + # else + # markers="not large" + # fi + + # filters="" + # if [[ "${{ matrix.os }}" == "macos-14" ]]; then + # # comparison fails on macos-14 with optimization=1 + # filters="not test028_sfr_rewet" + # fi + + # pixi run autotest -m "$markers" -k "$filters" + # + # - name: Install executables + # if: runner.os == 'Linux' + # uses: modflowpy/install-modflow-action@v1 + + # - name: Test MF6 examples + # if: runner.os == 'Linux' + # working-directory: modflow6 + # shell: pixi run bash -e {0} + # run: | + # cp bin/mf6 $(which mf6) + # cd ../modflow6-examples/autotest + # pytest -v -n auto test_scripts.py + + # - name: Upload failed test output + # if: failure() + # uses: actions/upload-artifact@v4 + # with: + # name: failed-${{ matrix.os }}-${{ env.FC }}-${{ env.FC_V }} + # path: modflow6/autotest/.failed + # + # - name: Checkout usgslatex + # if: runner.os == 'Linux' + # uses: actions/checkout@v4 + # with: + # repository: MODFLOW-USGS/usgslatex + # path: usgslatex + + # - name: Install TeX Live + # if: runner.os == 'Linux' + # run: | + # sudo apt-get update + # sudo apt install texlive-science \ + # texlive-latex-extra \ + # texlive-font-utils \ + # texlive-fonts-recommended \ + # texlive-fonts-extra + + # - name: Install USGS LaTeX style files and Univers font + # if: runner.os == 'Linux' + # working-directory: usgslatex/usgsLaTeX + # run: sudo ./install.sh --all-users + # + # - name: Test distribution scripts + # working-directory: modflow6 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # run: pixi run test-dist-scripts + + # test_intel_fortran: + # name: Test Intel fortran + # needs: + # - lint + # - build + # - smoke_test + # runs-on: ${{ matrix.os }} + # env: + # FC: intel-classic + # FC_V: "2021.7" + # strategy: + # fail-fast: false + # matrix: + # os: [ubuntu-22.04, macos-12, windows-2022] + # defaults: + # run: + # shell: bash + # steps: + + # - name: Checkout MF6 + # uses: actions/checkout@v4 + # with: + # path: modflow6 + + # - name: Checkout test models + # uses: actions/checkout@v4 + # with: + # repository: MODFLOW-USGS/modflow6-testmodels + # path: modflow6-testmodels + # + # - name: Checkout examples + # uses: actions/checkout@v4 + # with: + # repository: MODFLOW-USGS/modflow6-examples + # path: modflow6-examples + + # - name: Setup pixi + # uses: prefix-dev/setup-pixi@v0.8.1 + # with: + # pixi-version: v0.24.2 + # manifest-path: "modflow6/pixi.toml" + + # - name: Custom pixi install + # working-directory: modflow6 + # run: pixi run install + + # - name: Setup ${{ env.FC }} ${{ env.FC_V }} + # uses: fortran-lang/setup-fortran@v1 + # with: + # compiler: ${{ env.FC }} + # version: ${{ env.FC_V }} + + # - name: Update version files + # working-directory: modflow6 + # run: pixi run update-version + + # - name: Build MF6 + # working-directory: modflow6 + # run: | + # pixi run setup builddir + # pixi run build builddir + + # - name: Show build log + # if: failure() + # working-directory: modflow6 + # run: cat builddir/meson-logs/meson-log.txt + + # - name: Unit test MF6 + # working-directory: modflow6 + # run: pixi run test builddir + + # - name: Update flopy + # working-directory: modflow6 + # run: pixi run update-flopy + + # - name: Get executables + # working-directory: modflow6 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # run: pixi run get-exes + + # - name: Test MF6 + # working-directory: modflow6 + # env: + # REPOS_PATH: ${{ github.workspace }} + # run: | + # if [ "${{ github.ref_name }}" == "master" ]; then + # pixi run autotest -m "not large and not developmode" + # else + # pixi run autotest -m "not large" + # fi + + # - name: Install executables + # if: runner.os == 'Linux' + # uses: modflowpy/install-modflow-action@v1 + + # - name: Test examples + # if: runner.os == 'Linux' + # working-directory: modflow6 + # shell: pixi run bash -e {0} + # run: | + # cp bin/mf6 $(which mf6) + # cd ../modflow6-examples/autotest + # pytest -v -n auto test_scripts.py + # + # - name: Upload failed test output + # if: failure() + # uses: actions/upload-artifact@v4 + # with: + # name: failed-${{ matrix.os }}-${{ env.FC }}-${{ env.FC_V }} + # path: modflow6/autotest/.failed + + # - name: Test scripts + # working-directory: modflow6 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # run: pixi run test-dist-scripts parallel_test: name: Parallel testing - needs: - - lint - - build - - smoke_test + # 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 @@ -511,48 +511,48 @@ jobs: name: failed-${{ matrix.os }} path: modflow6/autotest/.failed - extended_test: - name: Extended executable testing - needs: - - lint - - build - - smoke_test - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ ubuntu-22.04, macos-12 ] - defaults: - run: - shell: bash - - steps: - - - name: Checkout MF6 - uses: actions/checkout@v4 - with: - path: modflow6 - - - name: Setup pixi - uses: prefix-dev/setup-pixi@v0.8.1 - with: - pixi-version: v0.24.2 - manifest-path: "modflow6/pixi.toml" - - - name: Custom pixi install - working-directory: modflow6 - run: pixi run install - - - name: Install additional netcdf testing packages - working-directory: modflow6 - run: pixi run pip install xugrid xarray netcdf4 - - - name: Test extended MF6 - uses: ./modflow6/.github/actions/test-extended - - - name: Upload failed test output - if: failure() - uses: actions/upload-artifact@v4 - with: - name: failed-${{ matrix.os }} - path: modflow6/autotest/.failed + # extended_test: + # name: Extended executable testing + # needs: + # - lint + # - build + # - smoke_test + # runs-on: ${{ matrix.os }} + # strategy: + # fail-fast: false + # matrix: + # os: [ ubuntu-22.04, macos-12 ] + # defaults: + # run: + # shell: bash + + # steps: + + # - name: Checkout MF6 + # uses: actions/checkout@v4 + # with: + # path: modflow6 + + # - name: Setup pixi + # uses: prefix-dev/setup-pixi@v0.8.1 + # with: + # pixi-version: v0.24.2 + # manifest-path: "modflow6/pixi.toml" + + # - name: Custom pixi install + # working-directory: modflow6 + # run: pixi run install + + # - name: Install additional netcdf testing packages + # working-directory: modflow6 + # run: pixi run pip install xugrid xarray netcdf4 + + # - name: Test extended MF6 + # uses: ./modflow6/.github/actions/test-extended + + # - name: Upload failed test output + # if: failure() + # uses: actions/upload-artifact@v4 + # with: + # name: failed-${{ matrix.os }} + # path: modflow6/autotest/.failed From 58f2ce355f043abf57bb497d71703a138ab3a8f5 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Thu, 25 Jul 2024 10:25:50 -0400 Subject: [PATCH 2/5] unix2dos --- .github/actions/test-par-win/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/test-par-win/action.yml b/.github/actions/test-par-win/action.yml index 492dd4f8cc0..a1507a82348 100644 --- a/.github/actions/test-par-win/action.yml +++ b/.github/actions/test-par-win/action.yml @@ -23,6 +23,7 @@ runs: shell: cmd run: | unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6.bat" "%TEMP%\test_modflow6.bat" + unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6_serial.bat" "%TEMP%\test_modflow6_serial.bat" - name: Test programs if: github.ref_name != 'master' From d46581e989890c35ffd4ae1443af9d61faeed29a Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Thu, 25 Jul 2024 14:43:49 -0400 Subject: [PATCH 3/5] check testmodels, renaming, run serial tests with xdist --- .github/actions/test-par-win/action.yml | 18 ++++++++++++------ ...modflow6.bat => test_modflow6_parallel.bat} | 0 .github/common/test_modflow6_serial.bat | 2 +- .github/workflows/ci.yml | 6 ++++++ 4 files changed, 19 insertions(+), 7 deletions(-) rename .github/common/{test_modflow6.bat => test_modflow6_parallel.bat} (100%) diff --git a/.github/actions/test-par-win/action.yml b/.github/actions/test-par-win/action.yml index a1507a82348..2cfd04858be 100644 --- a/.github/actions/test-par-win/action.yml +++ b/.github/actions/test-par-win/action.yml @@ -22,7 +22,7 @@ runs: - name: Convert unix2dos shell: cmd run: | - unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6.bat" "%TEMP%\test_modflow6.bat" + unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6_parallel.bat" "%TEMP%\test_modflow6_parallel.bat" unix2dos -n "%GITHUB_WORKSPACE%\modflow6\.github\common\test_modflow6_serial.bat" "%TEMP%\test_modflow6_serial.bat" - name: Test programs @@ -31,10 +31,16 @@ runs: env: REPOS_PATH: ${{ github.workspace }} run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6.bat" + "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_parallel.bat" - # - name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 + - name: Test programs + if: github.ref_name == 'master' + shell: cmd + env: + REPOS_PATH: ${{ github.workspace }} + MARKERS: not developmode + run: | + "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_parallel.bat" - name: Test programs (serial) if: github.ref_name != 'master' @@ -44,11 +50,11 @@ runs: run: | "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_serial.bat" - - name: Test programs + - name: Test programs (serial) if: github.ref_name == 'master' shell: cmd env: REPOS_PATH: ${{ github.workspace }} MARKERS: not developmode run: | - "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6.bat" + "%ONEAPI_ROOT%\setvars.bat" intel64 vs2022 && "%TEMP%\test_modflow6_serial.bat" diff --git a/.github/common/test_modflow6.bat b/.github/common/test_modflow6_parallel.bat similarity index 100% rename from .github/common/test_modflow6.bat rename to .github/common/test_modflow6_parallel.bat diff --git a/.github/common/test_modflow6_serial.bat b/.github/common/test_modflow6_serial.bat index b92f2e8d57d..928045bf1ae 100644 --- a/.github/common/test_modflow6_serial.bat +++ b/.github/common/test_modflow6_serial.bat @@ -1,4 +1,4 @@ cd "%GITHUB_WORKSPACE%\modflow6\autotest" where libpetsc.dll ldd ..\bin\mf6 -pixi run pytest -v --durations=0 --keep-failed .failed -m "%MARKERS%" +pixi run autotest -m "%MARKERS%" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c806da02e0e..7c5317cdf53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -486,6 +486,12 @@ jobs: with: path: modflow6 + - name: Checkout test models + uses: actions/checkout@v4 + with: + repository: MODFLOW-USGS/modflow6-testmodels + path: modflow6-testmodels + - name: Setup pixi uses: prefix-dev/setup-pixi@v0.8.1 with: From 2984e8c7019dae7c3ddf60cc288331125beb83b9 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Thu, 25 Jul 2024 23:53:49 -0400 Subject: [PATCH 4/5] restore ci --- .github/actions/test-par/action.yml | 7 + .github/workflows/ci.yml | 942 ++++++++++++++-------------- 2 files changed, 478 insertions(+), 471 deletions(-) diff --git a/.github/actions/test-par/action.yml b/.github/actions/test-par/action.yml index b14c8e78397..5b96a2835a6 100644 --- a/.github/actions/test-par/action.yml +++ b/.github/actions/test-par/action.yml @@ -80,3 +80,10 @@ runs: env: REPOS_PATH: ${{ github.workspace }} run: pixi run autotest --parallel -k "test_par" + + - name: Test programs (serial) + shell: bash + working-directory: modflow6 + env: + REPOS_PATH: ${{ github.workspace }} + run: pixi run autotest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c5317cdf53..3993f58aaf6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,435 +41,435 @@ concurrency: env: PIXI_BETA_WARNING_OFF: true jobs: - # lint: - # name: Check format - # runs-on: ubuntu-latest - # steps: - - # - name: Checkout MF6 - # uses: actions/checkout@v4 - - # - name: Setup pixi - # uses: prefix-dev/setup-pixi@v0.8.1 - # with: - # pixi-version: v0.24.2 - - # - name: Check Fortran source formatting - # run: pixi run check-format - - # - name: Check MSVS project files - # run: pixi run check-vfproj - - # - name: Check python lint - # run: pixi run check-python-lint - - # - name: Check python format - # run: pixi run check-python-format - # - # - name: Check CITATION.cff - # uses: dieghernan/cff-validator@v3 - - # build: - # name: Build - # runs-on: ubuntu-22.04 - # env: - # FC: gfortran - # FC_V: 13 - # steps: - - # - name: Checkout MF6 - # uses: actions/checkout@v4 - # - # - name: Setup ${{ env.FC }} ${{ env.FC_V }} - # uses: fortran-lang/setup-fortran@v1 - # with: - # compiler: gcc - # version: ${{ env.FC_V }} - - # - name: Setup pixi - # uses: prefix-dev/setup-pixi@v0.8.1 - # with: - # pixi-version: v0.24.2 - - # - name: Setup MF6 - # run: pixi run setup -Dwerror=true builddir - - # - name: Build MF6 - # run: pixi run build builddir - - # - name: Show build log - # if: failure() - # run: cat builddir/meson-logs/meson-log.txt - - # - name: Unit test MF6 - # run: pixi run test builddir - - # smoke_test: - # name: Smoke test - # runs-on: ubuntu-22.04 - # defaults: - # run: - # shell: bash - # env: - # FC: gfortran - # FC_V: 13 - # steps: - # - name: Checkout MF6 - # uses: actions/checkout@v4 - # with: - # path: modflow6 - # - # - name: Checkout test-drive - # uses: actions/checkout@v4 - # with: - # repository: fortran-lang/test-drive - # path: test-drive - - # - name: Setup ${{ env.FC }} ${{ env.FC_V }} - # uses: fortran-lang/setup-fortran@v1 - # with: - # compiler: gcc - # version: ${{ env.FC_V }} - - # - name: Setup pixi - # uses: prefix-dev/setup-pixi@v0.8.1 - # with: - # pixi-version: v0.24.2 - # manifest-path: "modflow6/pixi.toml" - - # - name: Custom pixi install - # working-directory: modflow6 - # run: pixi run install - - # - name: Build test-drive - # working-directory: test-drive - # run: | - # pixi run --manifest-path=../modflow6/pixi.toml meson setup builddir --prefix=$(pwd) --libdir=lib - # pixi run --manifest-path=../modflow6/pixi.toml meson install -C builddir - # echo "PKG_CONFIG_PATH=$(pwd)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV - - # - name: Build MF6 - # working-directory: modflow6 - # run: | - # pixi run setup builddir - # pixi run build builddir - - # - name: Show build log - # if: failure() - # working-directory: modflow6 - # run: cat builddir/meson-logs/meson-log.txt - # - # - name: Unit test MF6 - # working-directory: modflow6 - # run: pixi run test builddir - - # - name: Update flopy - # working-directory: modflow6 - # run: pixi run update-flopy - - # - name: Get executables - # working-directory: modflow6 - # env: - # GITHUB_TOKEN: ${{ github.token }} - # run: pixi run get-exes - - # - name: Test MF6 - # working-directory: modflow6 - # run: | - # if [ "${{ github.ref_name }}" == "master" ]; then - # pixi run autotest -m "not slow and not regression and not developmode" - # else - # pixi run autotest --smoke - # fi - - # - name: Upload failed test output - # if: failure() - # uses: actions/upload-artifact@v4 - # with: - # name: failed-smoke-${{ runner.os }}-${{ env.FC }}-${{ env.FC_V }} - # path: modflow6/autotest/.failed - - # test_gfortran: - # name: Test GNU fortran - # needs: - # - lint - # - build - # - smoke_test - # runs-on: ${{ matrix.os }} - # strategy: - # fail-fast: false - # matrix: - # os: [ ubuntu-22.04, macos-12, macos-14, windows-2022 ] - # defaults: - # run: - # shell: bash - # env: - # FC: gfortran - # FC_V: 13 - # steps: - # - name: Checkout MF6 - # uses: actions/checkout@v4 - # with: - # path: modflow6 - - # - name: Checkout test models - # uses: actions/checkout@v4 - # with: - # repository: MODFLOW-USGS/modflow6-testmodels - # path: modflow6-testmodels - # - # - name: Checkout examples - # uses: actions/checkout@v4 - # with: - # repository: MODFLOW-USGS/modflow6-examples - # path: modflow6-examples - # - # - name: Setup ${{ env.FC }} ${{ env.FC_V }} - # uses: fortran-lang/setup-fortran@v1 - # with: - # compiler: gcc - # version: ${{ env.FC_V }} - - # - name: Setup pixi - # uses: prefix-dev/setup-pixi@v0.8.1 - # with: - # pixi-version: v0.24.2 - # manifest-path: "modflow6/pixi.toml" - - # - name: Custom pixi install - # working-directory: modflow6 - # run: pixi run install - - # - name: Set LDFLAGS (macOS) - # if: matrix.os == 'macos-14' - # run: | - # os_ver=$(sw_vers -productVersion | cut -d'.' -f1) - # if (( "$os_ver" > 12 )); then - # ldflags="$LDFLAGS -Wl,-ld_classic" - # echo "LDFLAGS=$ldflags" >> $GITHUB_ENV - # fi - - # - name: Build MF6 - # working-directory: modflow6 - # run: | - # setupargs="" - # if [[ "${{ matrix.os }}" == "macos-14" ]]; then - # setupargs="-Doptimization=1" - # fi - # pixi run setup builddir $setupargs - # pixi run build builddir - - # - name: Show build log - # if: failure() - # working-directory: modflow6 - # run: cat builddir/meson-logs/meson-log.txt - # - # - name: Unit test MF6 - # working-directory: modflow6 - # run: pixi run test builddir - - # - name: Update flopy - # working-directory: modflow6 - # run: pixi run update-flopy - - # - name: Get executables - # working-directory: modflow6/autotest - # env: - # GITHUB_TOKEN: ${{ github.token }} - # run: pixi run get-exes - - # - name: Test MF6 - # working-directory: modflow6 - # env: - # REPOS_PATH: ${{ github.workspace }} - # run: | - # markers="" - # if [[ "${{ github.ref_name }}" == "master" ]]; then - # markers="not large and not developmode" - # else - # markers="not large" - # fi - - # filters="" - # if [[ "${{ matrix.os }}" == "macos-14" ]]; then - # # comparison fails on macos-14 with optimization=1 - # filters="not test028_sfr_rewet" - # fi - - # pixi run autotest -m "$markers" -k "$filters" - # - # - name: Install executables - # if: runner.os == 'Linux' - # uses: modflowpy/install-modflow-action@v1 - - # - name: Test MF6 examples - # if: runner.os == 'Linux' - # working-directory: modflow6 - # shell: pixi run bash -e {0} - # run: | - # cp bin/mf6 $(which mf6) - # cd ../modflow6-examples/autotest - # pytest -v -n auto test_scripts.py - - # - name: Upload failed test output - # if: failure() - # uses: actions/upload-artifact@v4 - # with: - # name: failed-${{ matrix.os }}-${{ env.FC }}-${{ env.FC_V }} - # path: modflow6/autotest/.failed - # - # - name: Checkout usgslatex - # if: runner.os == 'Linux' - # uses: actions/checkout@v4 - # with: - # repository: MODFLOW-USGS/usgslatex - # path: usgslatex - - # - name: Install TeX Live - # if: runner.os == 'Linux' - # run: | - # sudo apt-get update - # sudo apt install texlive-science \ - # texlive-latex-extra \ - # texlive-font-utils \ - # texlive-fonts-recommended \ - # texlive-fonts-extra - - # - name: Install USGS LaTeX style files and Univers font - # if: runner.os == 'Linux' - # working-directory: usgslatex/usgsLaTeX - # run: sudo ./install.sh --all-users - # - # - name: Test distribution scripts - # working-directory: modflow6 - # env: - # GITHUB_TOKEN: ${{ github.token }} - # run: pixi run test-dist-scripts - - # test_intel_fortran: - # name: Test Intel fortran - # needs: - # - lint - # - build - # - smoke_test - # runs-on: ${{ matrix.os }} - # env: - # FC: intel-classic - # FC_V: "2021.7" - # strategy: - # fail-fast: false - # matrix: - # os: [ubuntu-22.04, macos-12, windows-2022] - # defaults: - # run: - # shell: bash - # steps: - - # - name: Checkout MF6 - # uses: actions/checkout@v4 - # with: - # path: modflow6 - - # - name: Checkout test models - # uses: actions/checkout@v4 - # with: - # repository: MODFLOW-USGS/modflow6-testmodels - # path: modflow6-testmodels - # - # - name: Checkout examples - # uses: actions/checkout@v4 - # with: - # repository: MODFLOW-USGS/modflow6-examples - # path: modflow6-examples - - # - name: Setup pixi - # uses: prefix-dev/setup-pixi@v0.8.1 - # with: - # pixi-version: v0.24.2 - # manifest-path: "modflow6/pixi.toml" - - # - name: Custom pixi install - # working-directory: modflow6 - # run: pixi run install - - # - name: Setup ${{ env.FC }} ${{ env.FC_V }} - # uses: fortran-lang/setup-fortran@v1 - # with: - # compiler: ${{ env.FC }} - # version: ${{ env.FC_V }} - - # - name: Update version files - # working-directory: modflow6 - # run: pixi run update-version - - # - name: Build MF6 - # working-directory: modflow6 - # run: | - # pixi run setup builddir - # pixi run build builddir - - # - name: Show build log - # if: failure() - # working-directory: modflow6 - # run: cat builddir/meson-logs/meson-log.txt - - # - name: Unit test MF6 - # working-directory: modflow6 - # run: pixi run test builddir - - # - name: Update flopy - # working-directory: modflow6 - # run: pixi run update-flopy - - # - name: Get executables - # working-directory: modflow6 - # env: - # GITHUB_TOKEN: ${{ github.token }} - # run: pixi run get-exes - - # - name: Test MF6 - # working-directory: modflow6 - # env: - # REPOS_PATH: ${{ github.workspace }} - # run: | - # if [ "${{ github.ref_name }}" == "master" ]; then - # pixi run autotest -m "not large and not developmode" - # else - # pixi run autotest -m "not large" - # fi - - # - name: Install executables - # if: runner.os == 'Linux' - # uses: modflowpy/install-modflow-action@v1 - - # - name: Test examples - # if: runner.os == 'Linux' - # working-directory: modflow6 - # shell: pixi run bash -e {0} - # run: | - # cp bin/mf6 $(which mf6) - # cd ../modflow6-examples/autotest - # pytest -v -n auto test_scripts.py - # - # - name: Upload failed test output - # if: failure() - # uses: actions/upload-artifact@v4 - # with: - # name: failed-${{ matrix.os }}-${{ env.FC }}-${{ env.FC_V }} - # path: modflow6/autotest/.failed - - # - name: Test scripts - # working-directory: modflow6 - # env: - # GITHUB_TOKEN: ${{ github.token }} - # run: pixi run test-dist-scripts + lint: + name: Check format + runs-on: ubuntu-latest + steps: + + - name: Checkout MF6 + uses: actions/checkout@v4 + + - name: Setup pixi + uses: prefix-dev/setup-pixi@v0.8.1 + with: + pixi-version: v0.24.2 + + - name: Check Fortran source formatting + run: pixi run check-format + + - name: Check MSVS project files + run: pixi run check-vfproj + + - name: Check python lint + run: pixi run check-python-lint + + - name: Check python format + run: pixi run check-python-format + + - name: Check CITATION.cff + uses: dieghernan/cff-validator@v3 + + build: + name: Build + runs-on: ubuntu-22.04 + env: + FC: gfortran + FC_V: 13 + steps: + + - name: Checkout MF6 + uses: actions/checkout@v4 + + - name: Setup ${{ env.FC }} ${{ env.FC_V }} + uses: fortran-lang/setup-fortran@v1 + with: + compiler: gcc + version: ${{ env.FC_V }} + + - name: Setup pixi + uses: prefix-dev/setup-pixi@v0.8.1 + with: + pixi-version: v0.24.2 + + - name: Setup MF6 + run: pixi run setup -Dwerror=true builddir + + - name: Build MF6 + run: pixi run build builddir + + - name: Show build log + if: failure() + run: cat builddir/meson-logs/meson-log.txt + + - name: Unit test MF6 + run: pixi run test builddir + + smoke_test: + name: Smoke test + runs-on: ubuntu-22.04 + defaults: + run: + shell: bash + env: + FC: gfortran + FC_V: 13 + steps: + - name: Checkout MF6 + uses: actions/checkout@v4 + with: + path: modflow6 + + - name: Checkout test-drive + uses: actions/checkout@v4 + with: + repository: fortran-lang/test-drive + path: test-drive + + - name: Setup ${{ env.FC }} ${{ env.FC_V }} + uses: fortran-lang/setup-fortran@v1 + with: + compiler: gcc + version: ${{ env.FC_V }} + + - name: Setup pixi + uses: prefix-dev/setup-pixi@v0.8.1 + with: + pixi-version: v0.24.2 + manifest-path: "modflow6/pixi.toml" + + - name: Custom pixi install + working-directory: modflow6 + run: pixi run install + + - name: Build test-drive + working-directory: test-drive + run: | + pixi run --manifest-path=../modflow6/pixi.toml meson setup builddir --prefix=$(pwd) --libdir=lib + pixi run --manifest-path=../modflow6/pixi.toml meson install -C builddir + echo "PKG_CONFIG_PATH=$(pwd)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV + + - name: Build MF6 + working-directory: modflow6 + run: | + pixi run setup builddir + pixi run build builddir + + - name: Show build log + if: failure() + working-directory: modflow6 + run: cat builddir/meson-logs/meson-log.txt + + - name: Unit test MF6 + working-directory: modflow6 + run: pixi run test builddir + + - name: Update flopy + working-directory: modflow6 + run: pixi run update-flopy + + - name: Get executables + working-directory: modflow6 + env: + GITHUB_TOKEN: ${{ github.token }} + run: pixi run get-exes + + - name: Test MF6 + working-directory: modflow6 + run: | + if [ "${{ github.ref_name }}" == "master" ]; then + pixi run autotest -m "not slow and not regression and not developmode" + else + pixi run autotest --smoke + fi + + - name: Upload failed test output + if: failure() + uses: actions/upload-artifact@v4 + with: + name: failed-smoke-${{ runner.os }}-${{ env.FC }}-${{ env.FC_V }} + path: modflow6/autotest/.failed + + test_gfortran: + name: Test GNU fortran + needs: + - lint + - build + - smoke_test + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-22.04, macos-12, macos-14, windows-2022 ] + defaults: + run: + shell: bash + env: + FC: gfortran + FC_V: 13 + steps: + - name: Checkout MF6 + uses: actions/checkout@v4 + with: + path: modflow6 + + - name: Checkout test models + uses: actions/checkout@v4 + with: + repository: MODFLOW-USGS/modflow6-testmodels + path: modflow6-testmodels + + - name: Checkout examples + uses: actions/checkout@v4 + with: + repository: MODFLOW-USGS/modflow6-examples + path: modflow6-examples + + - name: Setup ${{ env.FC }} ${{ env.FC_V }} + uses: fortran-lang/setup-fortran@v1 + with: + compiler: gcc + version: ${{ env.FC_V }} + + - name: Setup pixi + uses: prefix-dev/setup-pixi@v0.8.1 + with: + pixi-version: v0.24.2 + manifest-path: "modflow6/pixi.toml" + + - name: Custom pixi install + working-directory: modflow6 + run: pixi run install + + - name: Set LDFLAGS (macOS) + if: matrix.os == 'macos-14' + run: | + os_ver=$(sw_vers -productVersion | cut -d'.' -f1) + if (( "$os_ver" > 12 )); then + ldflags="$LDFLAGS -Wl,-ld_classic" + echo "LDFLAGS=$ldflags" >> $GITHUB_ENV + fi + + - name: Build MF6 + working-directory: modflow6 + run: | + setupargs="" + if [[ "${{ matrix.os }}" == "macos-14" ]]; then + setupargs="-Doptimization=1" + fi + pixi run setup builddir $setupargs + pixi run build builddir + + - name: Show build log + if: failure() + working-directory: modflow6 + run: cat builddir/meson-logs/meson-log.txt + + - name: Unit test MF6 + working-directory: modflow6 + run: pixi run test builddir + + - name: Update flopy + working-directory: modflow6 + run: pixi run update-flopy + + - name: Get executables + working-directory: modflow6/autotest + env: + GITHUB_TOKEN: ${{ github.token }} + run: pixi run get-exes + + - name: Test MF6 + working-directory: modflow6 + env: + REPOS_PATH: ${{ github.workspace }} + run: | + markers="" + if [[ "${{ github.ref_name }}" == "master" ]]; then + markers="not large and not developmode" + else + markers="not large" + fi + + filters="" + if [[ "${{ matrix.os }}" == "macos-14" ]]; then + # comparison fails on macos-14 with optimization=1 + filters="not test028_sfr_rewet" + fi + + pixi run autotest -m "$markers" -k "$filters" + + - name: Install executables + if: runner.os == 'Linux' + uses: modflowpy/install-modflow-action@v1 + + - name: Test MF6 examples + if: runner.os == 'Linux' + working-directory: modflow6 + shell: pixi run bash -e {0} + run: | + cp bin/mf6 $(which mf6) + cd ../modflow6-examples/autotest + pytest -v -n auto test_scripts.py + + - name: Upload failed test output + if: failure() + uses: actions/upload-artifact@v4 + with: + name: failed-${{ matrix.os }}-${{ env.FC }}-${{ env.FC_V }} + path: modflow6/autotest/.failed + + - name: Checkout usgslatex + if: runner.os == 'Linux' + uses: actions/checkout@v4 + with: + repository: MODFLOW-USGS/usgslatex + path: usgslatex + + - name: Install TeX Live + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt install texlive-science \ + texlive-latex-extra \ + texlive-font-utils \ + texlive-fonts-recommended \ + texlive-fonts-extra + + - name: Install USGS LaTeX style files and Univers font + if: runner.os == 'Linux' + working-directory: usgslatex/usgsLaTeX + run: sudo ./install.sh --all-users + + - name: Test distribution scripts + working-directory: modflow6 + env: + GITHUB_TOKEN: ${{ github.token }} + run: pixi run test-dist-scripts + + test_intel_fortran: + name: Test Intel fortran + needs: + - lint + - build + - smoke_test + runs-on: ${{ matrix.os }} + env: + FC: intel-classic + FC_V: "2021.7" + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, macos-12, windows-2022] + defaults: + run: + shell: bash + steps: + + - name: Checkout MF6 + uses: actions/checkout@v4 + with: + path: modflow6 + + - name: Checkout test models + uses: actions/checkout@v4 + with: + repository: MODFLOW-USGS/modflow6-testmodels + path: modflow6-testmodels + + - name: Checkout examples + uses: actions/checkout@v4 + with: + repository: MODFLOW-USGS/modflow6-examples + path: modflow6-examples + + - name: Setup pixi + uses: prefix-dev/setup-pixi@v0.8.1 + with: + pixi-version: v0.24.2 + manifest-path: "modflow6/pixi.toml" + + - name: Custom pixi install + working-directory: modflow6 + run: pixi run install + + - name: Setup ${{ env.FC }} ${{ env.FC_V }} + uses: fortran-lang/setup-fortran@v1 + with: + compiler: ${{ env.FC }} + version: ${{ env.FC_V }} + + - name: Update version files + working-directory: modflow6 + run: pixi run update-version + + - name: Build MF6 + working-directory: modflow6 + run: | + pixi run setup builddir + pixi run build builddir + + - name: Show build log + if: failure() + working-directory: modflow6 + run: cat builddir/meson-logs/meson-log.txt + + - name: Unit test MF6 + working-directory: modflow6 + run: pixi run test builddir + + - name: Update flopy + working-directory: modflow6 + run: pixi run update-flopy + + - name: Get executables + working-directory: modflow6 + env: + GITHUB_TOKEN: ${{ github.token }} + run: pixi run get-exes + + - name: Test MF6 + working-directory: modflow6 + env: + REPOS_PATH: ${{ github.workspace }} + run: | + if [ "${{ github.ref_name }}" == "master" ]; then + pixi run autotest -m "not large and not developmode" + else + pixi run autotest -m "not large" + fi + + - name: Install executables + if: runner.os == 'Linux' + uses: modflowpy/install-modflow-action@v1 + + - name: Test examples + if: runner.os == 'Linux' + working-directory: modflow6 + shell: pixi run bash -e {0} + run: | + cp bin/mf6 $(which mf6) + cd ../modflow6-examples/autotest + pytest -v -n auto test_scripts.py + + - name: Upload failed test output + if: failure() + uses: actions/upload-artifact@v4 + with: + name: failed-${{ matrix.os }}-${{ env.FC }}-${{ env.FC_V }} + path: modflow6/autotest/.failed + + - name: Test scripts + working-directory: modflow6 + env: + GITHUB_TOKEN: ${{ github.token }} + run: pixi run test-dist-scripts parallel_test: name: Parallel testing - # needs: - # - lint - # - build - # - smoke_test + needs: + - lint + - build + - smoke_test runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -517,48 +517,48 @@ jobs: name: failed-${{ matrix.os }} path: modflow6/autotest/.failed - # extended_test: - # name: Extended executable testing - # needs: - # - lint - # - build - # - smoke_test - # runs-on: ${{ matrix.os }} - # strategy: - # fail-fast: false - # matrix: - # os: [ ubuntu-22.04, macos-12 ] - # defaults: - # run: - # shell: bash - - # steps: - - # - name: Checkout MF6 - # uses: actions/checkout@v4 - # with: - # path: modflow6 - - # - name: Setup pixi - # uses: prefix-dev/setup-pixi@v0.8.1 - # with: - # pixi-version: v0.24.2 - # manifest-path: "modflow6/pixi.toml" - - # - name: Custom pixi install - # working-directory: modflow6 - # run: pixi run install - - # - name: Install additional netcdf testing packages - # working-directory: modflow6 - # run: pixi run pip install xugrid xarray netcdf4 - - # - name: Test extended MF6 - # uses: ./modflow6/.github/actions/test-extended - - # - name: Upload failed test output - # if: failure() - # uses: actions/upload-artifact@v4 - # with: - # name: failed-${{ matrix.os }} - # path: modflow6/autotest/.failed + extended_test: + name: Extended executable testing + needs: + - lint + - build + - smoke_test + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-22.04, macos-12 ] + defaults: + run: + shell: bash + + steps: + + - name: Checkout MF6 + uses: actions/checkout@v4 + with: + path: modflow6 + + - name: Setup pixi + uses: prefix-dev/setup-pixi@v0.8.1 + with: + pixi-version: v0.24.2 + manifest-path: "modflow6/pixi.toml" + + - name: Custom pixi install + working-directory: modflow6 + run: pixi run install + + - name: Install additional netcdf testing packages + working-directory: modflow6 + run: pixi run pip install xugrid xarray netcdf4 + + - name: Test extended MF6 + uses: ./modflow6/.github/actions/test-extended + + - name: Upload failed test output + if: failure() + uses: actions/upload-artifact@v4 + with: + name: failed-${{ matrix.os }} + path: modflow6/autotest/.failed From 3550fea3c6a85de6352b36c05804dd25df6f9296 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Fri, 26 Jul 2024 08:21:00 -0400 Subject: [PATCH 5/5] reinstate mac/linux --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3993f58aaf6..1e3100dd83f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -474,7 +474,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ windows-2022 ] + os: [ ubuntu-22.04, macos-12, windows-2022 ] defaults: run: shell: bash