Skip to content

Commit

Permalink
ci: move compiler compatibility checks into manual workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Oct 7, 2023
1 parent c50ec80 commit 71ee4f7
Show file tree
Hide file tree
Showing 2 changed files with 221 additions and 77 deletions.
90 changes: 13 additions & 77 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,18 @@ jobs:
shell: bash -l {0}
env:
FC: gfortran
GCC_V: 13
GCC: 13
steps:
- name: Checkout modflow6
uses: actions/checkout@v4
with:
path: modflow6

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

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
Expand Down Expand Up @@ -174,33 +174,13 @@ jobs:
strategy:
fail-fast: false
matrix:
# compatible combinations from https://github.com/awvwgk/setup-fortran#runner-compatibility
include:
- {os: ubuntu-20.04, gcc_v: 7, test: false}
- {os: ubuntu-20.04, gcc_v: 8, test: false}
- {os: ubuntu-20.04, gcc_v: 9, test: false}
- {os: ubuntu-20.04, gcc_v: 10, test: false}
- {os: ubuntu-20.04, gcc_v: 11, test: false}
- {os: ubuntu-22.04, gcc_v: 12, test: false}
# only run autotests on latest version on each platform
- {os: ubuntu-22.04, gcc_v: 13, test: true}
- {os: macos-12, gcc_v: 7, test: false}
- {os: macos-12, gcc_v: 8, test: false}
- {os: macos-12, gcc_v: 9, test: false}
- {os: macos-12, gcc_v: 10, test: false}
- {os: macos-12, gcc_v: 11, test: false}
- {os: macos-12, gcc_v: 12, test: false}
- {os: macos-12, gcc_v: 13, test: true}
- {os: windows-2022, gcc_v: 9, test: false}
- {os: windows-2022, gcc_v: 10, test: false}
- {os: windows-2022, gcc_v: 11, test: false}
- {os: windows-2022, gcc_v: 12, test: true}

os: [ ubuntu-22.04, macos-12, windows-2022 ]
defaults:
run:
shell: bash -l {0}
env:
FC: gfortran
GCC: 13
steps:
- name: Checkout modflow6
uses: actions/checkout@v4
Expand All @@ -219,11 +199,11 @@ jobs:
repository: MODFLOW-USGS/modflow6-examples
path: modflow6-examples

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

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
Expand Down Expand Up @@ -251,20 +231,17 @@ jobs:
run: meson test --verbose --no-rebuild -C builddir

- name: Update flopy
if: matrix.test
working-directory: modflow6/autotest
run: python update_flopy.py

- name: Get executables
if: matrix.test
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
pytest -v --durations 0 get_exes.py
- name: Test modflow6
if: matrix.test
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
Expand All @@ -276,14 +253,14 @@ jobs:
fi
- name: Checkout usgslatex
if: matrix.test && runner.os == 'Linux'
if: runner.os == 'Linux'
uses: actions/checkout@v4
with:
repository: MODFLOW-USGS/usgslatex
path: usgslatex

- name: Install TeX Live
if: matrix.test && runner.os == 'Linux'
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt install texlive-science \
Expand All @@ -293,12 +270,11 @@ jobs:
texlive-fonts-extra
- name: Install USGS LaTeX style files and Univers font
if: matrix.test && runner.os == 'Linux'
if: runner.os == 'Linux'
working-directory: usgslatex/usgsLaTeX
run: sudo ./install.sh --all-users

- name: Test distribution scripts
if: matrix.test
working-directory: modflow6/distribution
env:
GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -315,45 +291,9 @@ jobs:
fail-fast: false
matrix:
include:
### ifx
## 2022.2.x autotests disabled
# - mf5to6 test_evt: failure to converge
# - mf6 Keating_[disu_]dev: bad head comparison
- {os: ubuntu-22.04, compiler: intel, version: 2022.2.1, test: false}
- {os: ubuntu-22.04, compiler: intel, version: 2022.2, test: false}
## 2021.1 segfault in meson serial sim test
# - {os: ubuntu-22.04, compiler: intel, version: 2022.1, test: false}
## 2022.0 & 2021.[1,2,4] segfault at compile time
# - {os: ubuntu-22.04, compiler: intel, version: "2022.0", test: false}
# - {os: ubuntu-22.04, compiler: intel, version: 2021.4, test: false}
# - {os: ubuntu-22.04, compiler: intel, version: 2021.2, test: false}
# - {os: ubuntu-22.04, compiler: intel, version: 2021.1, test: false}
## ifx not yet supported on macOS
# - {os: macos-12, compiler: intel, version: 2023.2, test: true}
## 2023.[0,1] fail to compile
# - {os: windows-2022, compiler: intel, version: 2023.1, test: false}
# - {os: windows-2022, compiler: intel, version: "2023.0", test: false}
- {os: windows-2022, compiler: intel, version: 2022.2, test: false}
## 2022.1 fail to link
# - {os: windows-2022, compiler: intel, version: 2022.1, test: false}

### ifort
## only autotest latest on each platform
- {os: ubuntu-22.04, compiler: intel-classic, version: "2021.10", test: false}
- {os: ubuntu-22.04, compiler: intel-classic, version: 2021.9, test: false}
- {os: ubuntu-22.04, compiler: intel-classic, version: 2021.8, test: false}
- {os: ubuntu-22.04, compiler: intel-classic, version: 2021.7, test: true}
- {os: ubuntu-22.04, compiler: intel-classic, version: 2021.6, test: false}
- {os: macos-12, compiler: intel-classic, version: "2021.10", test: false}
- {os: macos-12, compiler: intel-classic, version: 2021.9, test: false}
- {os: macos-12, compiler: intel-classic, version: 2021.8, test: false}
- {os: macos-12, compiler: intel-classic, version: 2021.7, test: true}
- {os: macos-12, compiler: intel-classic, version: 2021.6, test: false}
- {os: windows-2022, compiler: intel-classic, version: "2021.10", test: false}
- {os: windows-2022, compiler: intel-classic, version: 2021.9, test: false}
- {os: windows-2022, compiler: intel-classic, version: 2021.8, test: false}
- {os: windows-2022, compiler: intel-classic, version: 2021.7, test: true}
- {os: windows-2022, compiler: intel-classic, version: 2021.6, test: false}
- {os: ubuntu-22.04, compiler: intel-classic, version: 2021.7}
- {os: macos-12, compiler: intel-classic, version: 2021.7}
- {os: windows-2022, compiler: intel-classic, version: 2021.7}

defaults:
run:
Expand Down Expand Up @@ -407,19 +347,16 @@ jobs:
run: meson test --verbose --no-rebuild -C builddir

- name: Update flopy
if: matrix.test
working-directory: modflow6/autotest
run: python update_flopy.py

- name: Get executables
if: matrix.test
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0 get_exes.py

- name: Test programs
if: matrix.test
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
Expand All @@ -431,7 +368,6 @@ jobs:
fi
- name: Test scripts
if: matrix.test
working-directory: modflow6/distribution
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
Loading

0 comments on commit 71ee4f7

Please sign in to comment.