Skip to content

Commit

Permalink
ci: use awvwgk/setup-fortran for Intel Fortran
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Jul 25, 2023
1 parent e60ab0f commit fa52607
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 16 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- master
- develop
- ci-diagnose*
- test-multiple-ifort
paths-ignore:
- '**.md'
- 'doc/**'
Expand Down Expand Up @@ -318,7 +319,26 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
- os: ubuntu-22.04
intel_compiler: intel-classic
intel_version: 2021.7.0
- os: ubuntu-22.04
intel_compiler: intel-classic
intel_version: 2021.6.0
- os: macos-12
intel_compiler: intel-classic
intel_version: 2021.7.0
- os: macos-12
intel_compiler: intel-classic
intel_version: 2021.6.0
- os: windows-2022
intel_compiler: intel-classic
intel_version: 2021.7.0
- os: windows-2022
intel_compiler: intel-classic
intel_version: 2021.6.0

defaults:
run:
shell: bash -l {0}
Expand Down Expand Up @@ -346,7 +366,10 @@ jobs:
cache-downloads: true

- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1
uses: awvwgk/setup-fortran@main
with:
compiler: ${{ matrix.intel_compiler }}
version: ${{ matrix.intel_version }}

- name: Update version files
working-directory: modflow6/distribution
Expand All @@ -370,26 +393,27 @@ jobs:
meson test --verbose --no-rebuild -C builddir
- name: Update flopy
if: matrix.intel_version == '2021.7.0'
working-directory: modflow6/autotest
run: python update_flopy.py

- name: Get executables
if: runner.os != 'Windows'
if: runner.os != 'Windows' && matrix.intel_version == '2021.7.0'
working-directory: modflow6/autotest
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0 get_exes.py

- name: Get executables (Windows)
if: runner.os == 'Windows'
if: runner.os == 'Windows' && matrix.intel_version == '2021.7.0'
working-directory: modflow6/autotest
shell: pwsh
env:
GITHUB_TOKEN: ${{ github.token }}
run: pytest -v --durations 0 get_exes.py

- name: Test programs
if: runner.os != 'Windows'
if: runner.os != 'Windows' && matrix.intel_version == '2021.7.0'
working-directory: modflow6/autotest
env:
REPOS_PATH: ${{ github.workspace }}
Expand All @@ -401,7 +425,7 @@ jobs:
fi
- name: Test programs (Windows)
if: runner.os == 'Windows'
if: runner.os == 'Windows' && matrix.intel_version == '2021.7.0'
working-directory: modflow6/autotest
shell: pwsh
env:
Expand All @@ -414,7 +438,7 @@ jobs:
}
- name: Test scripts
if: runner.os != 'Windows'
if: runner.os != 'Windows' && matrix.intel_version == '2021.7.0'
working-directory: modflow6/distribution
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/large.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: MODFLOW 6 large models
on:
schedule:
- cron: '0 6 * * *' # run at 6 AM UTC every day
env:
GCC_V: 12
IFORT_V: 2021.7.0
jobs:
cache_ifort:
name: Cache Intel OneAPI compilers
Expand All @@ -11,8 +14,13 @@ jobs:
matrix:
os: [ ubuntu-22.04, macos-12, windows-2022 ]
steps:
- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1

- name: Setup ifort ${{ env.IFORT_V }}
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ env.IFORT_V }}

test:
name: Test
runs-on: ubuntu-22.04
Expand All @@ -24,8 +32,6 @@ jobs:
defaults:
run:
shell: bash -l {0}
env:
GCC_V: 12
steps:

- name: Checkout modflow6
Expand Down Expand Up @@ -53,9 +59,12 @@ jobs:
compiler: gcc
version: ${{ env.GCC_V }}

- name: Setup ifort
- name: Setup ifort ${{ env.IFORT_V }}}
if: matrix.fc == 'ifort'
uses: modflowpy/install-intelfortran-action@v1
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ env.IFORT_V }}

- name: Cache modflow6 examples
id: cache-examples
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ on:
value: ${{ jobs.build.outputs.distname }}
env:
FC: ifort
IFORT_V: 2021.7.0
jobs:
build:
name: Build binaries (${{ matrix.os }})
Expand Down Expand Up @@ -85,7 +86,10 @@ jobs:
powershell
- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ env.IFORT_V }}

- name: Set version number
id: set_version
Expand Down Expand Up @@ -279,7 +283,10 @@ jobs:
cache-environment: true

- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ env.IFORT_V }}

- name: Update version
id: update_version
Expand Down Expand Up @@ -416,7 +423,10 @@ jobs:
powershell
- name: Setup Intel Fortran
uses: modflowpy/install-intelfortran-action@v1
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ env.IFORT_V }}

- name: Update version
id: update_version
Expand Down

0 comments on commit fa52607

Please sign in to comment.