From fa52607c1dd1782de98c06daa4598d2bbdf63938 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Tue, 18 Jul 2023 13:15:43 -0400 Subject: [PATCH] ci: use awvwgk/setup-fortran for Intel Fortran --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++------- .github/workflows/large.yml | 21 +++++++++++++------ .github/workflows/release.yml | 16 ++++++++++++--- 3 files changed, 59 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a0eef2e97b..a82a00d53e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: - master - develop - ci-diagnose* + - test-multiple-ifort paths-ignore: - '**.md' - 'doc/**' @@ -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} @@ -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 @@ -370,18 +393,19 @@ 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: @@ -389,7 +413,7 @@ jobs: 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 }} @@ -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: @@ -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 }} diff --git a/.github/workflows/large.yml b/.github/workflows/large.yml index 291dcc16673..7829f49b8dd 100644 --- a/.github/workflows/large.yml +++ b/.github/workflows/large.yml @@ -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 @@ -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 @@ -24,8 +32,6 @@ jobs: defaults: run: shell: bash -l {0} - env: - GCC_V: 12 steps: - name: Checkout modflow6 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index efe4b7be4c2..9361e66a11b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }}) @@ -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 @@ -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 @@ -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