Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use fortran compiler cache/install actions #1042

Merged
merged 1 commit into from
Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/common/link-gfortranlib5.sh

This file was deleted.

17 changes: 0 additions & 17 deletions .github/intel-scripts/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions .github/intel-scripts/build_windows.bat

This file was deleted.

13 changes: 0 additions & 13 deletions .github/intel-scripts/cache_exclude_linux.sh

This file was deleted.

15 changes: 0 additions & 15 deletions .github/intel-scripts/cache_exclude_windows.sh

This file was deleted.

23 changes: 0 additions & 23 deletions .github/intel-scripts/install_linux.sh

This file was deleted.

20 changes: 0 additions & 20 deletions .github/intel-scripts/install_macos.sh

This file was deleted.

16 changes: 0 additions & 16 deletions .github/intel-scripts/install_windows.bat

This file was deleted.

26 changes: 4 additions & 22 deletions .github/workflows/ci-check-warnings-gfortran.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,8 @@ jobs:
cache-downloads: true
cache-env: true

- name: Setup symbolic links on Linux
run: |
sudo ln -fs /usr/bin/gfortran-10 /usr/local/bin/gfortran
sudo ln -fs /usr/bin/gcc-10 /usr/local/bin/gcc
sudo ln -fs /usr/bin/g++-10 /usr/local/bin/g++

- name: Print GNU compiler versions
run: |
gfortran --version
gcc --version
g++ --version
- name: Install gfortran
uses: modflowpy/install-gfortran-action@v1

- name: Print python package versions
run: |
Expand Down Expand Up @@ -68,17 +59,8 @@ jobs:
cache-downloads: true
cache-env: true

- name: Setup symbolic links on Linux
run: |
sudo ln -fs /usr/bin/gfortran-10 /usr/local/bin/gfortran
sudo ln -fs /usr/bin/gcc-10 /usr/local/bin/gcc
sudo ln -fs /usr/bin/g++-10 /usr/local/bin/g++

- name: Print GNU compiler versions
run: |
gfortran --version
gcc --version
g++ --version
- name: Install gfortran
uses: modflowpy/install-gfortran-action@v1

- name: Print python package versions
run: |
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,8 @@ jobs:
run: |
pytest -v build_mfio_tex.py

- name: Setup symbolic links on Linux
run: |
sudo ln -fs /usr/bin/gfortran-10 /usr/local/bin/gfortran
sudo ln -fs /usr/bin/gcc-10 /usr/local/bin/gcc
sudo ln -fs /usr/bin/g++-10 /usr/local/bin/g++
- name: Install gfortran
uses: modflowpy/install-gfortran-action@v1

- name: Run-time comparison
run: |
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ci-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ jobs:
cache-downloads: true
cache-env: true

- name: Setup symbolic links on Linux
run: |
sudo ln -fs /usr/bin/gfortran-10 /usr/local/bin/gfortran
sudo ln -fs /usr/bin/gcc-10 /usr/local/bin/gcc
sudo ln -fs /usr/bin/g++-10 /usr/local/bin/g++
- name: Install gfortran
uses: modflowpy/install-gfortran-action@v1

- name: Print python package versions
run: |
Expand Down
38 changes: 5 additions & 33 deletions .github/workflows/ci-large-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ on:
schedule:
- cron: '0 6 * * *' # run at 6 AM UTC every day

env:
WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18680/w_HPCKit_p_2022.2.0.173_offline.exe
LINUX_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18679/l_HPCKit_p_2022.2.0.191_offline.sh
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18681/m_HPCKit_p_2022.2.0.158_offline.dmg
WINDOWS_FORTRAN_COMPONENTS: intel.oneapi.win.ifort-compiler
LINUX_FORTRAN_COMPONENTS_WEB: intel.oneapi.lin.ifort-compiler
MACOS_FORTRAN_COMPONENTS: intel.oneapi.mac.ifort-compiler

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -55,28 +47,14 @@ jobs:
if: matrix.FC == 'ifort'
run: |
echo "FC=ifort" >> $GITHUB_ENV
echo "VS_VER=vs2022" >> $GITHUB_ENV

- name: cache install ifort on linux
- name: Install ifort
if: matrix.FC == 'ifort'
id: cache-install-linux
uses: actions/cache@v2
with:
path: |
/opt/intel/oneapi
key: install-${{ env.LINUX_HPCKIT_URL }}-${{ env.LINUX_FORTRAN_COMPONENTS_WEB }}-compiler-${{ hashFiles('**/.github/intel-scripts/cache_exclude_linux.sh') }}

- name: install ifort on linux
if: matrix.FC == 'ifort' && steps.cache-install-linux.outputs.cache-hit != 'true'
run: |
.github/intel-scripts/install_linux.sh $LINUX_HPCKIT_URL $LINUX_FORTRAN_COMPONENTS_WEB
uses: modflowpy/install-intelfortran-action@v1

- name: Setup symbolic links on Linux
- name: Install gfortran
if: matrix.FC == 'gfortran'
run: |
sudo ln -fs /usr/bin/gfortran-10 /usr/local/bin/gfortran
sudo ln -fs /usr/bin/gcc-10 /usr/local/bin/gcc
sudo ln -fs /usr/bin/g++-10 /usr/local/bin/g++
uses: modflowpy/install-gfortran-action@v1

- name: Install additional python packages
run: |
Expand Down Expand Up @@ -109,7 +87,6 @@ jobs:
- name: activate ifort and build applications
if: matrix.FC == 'ifort'
run: |
source /opt/intel/oneapi/setvars.sh
meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin
meson install -C builddir
cd autotest
Expand All @@ -126,9 +103,4 @@ jobs:
- name: Test applications
working-directory: autotest
run: |
pytest -v -n=auto --durations=0 test_z03_${{ matrix.test_script }}.py

- name: exclude unused files from cache on linux
if: matrix.FC == 'ifort' && steps.cache-install-linux.outputs.cache-hit != 'true'
run: |
.github/intel-scripts/cache_exclude_linux.sh
pytest -v -n=auto --durations=0 test_z03_${{ matrix.test_script }}.py
26 changes: 2 additions & 24 deletions .github/workflows/ci-tests-gfortran-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,8 @@ jobs:
run: |
pip list

- name: Workaround for windows-2022 v20220626.1 gfortran executable run failures
if: runner.os == 'Windows'
run: |
.github/common/link-gfortranlib5.sh

- name: Setup symbolic links on Linux
if: runner.os == 'Linux'
run: |
sudo ln -fs /usr/bin/gfortran-10 /usr/local/bin/gfortran
sudo ln -fs /usr/bin/gcc-10 /usr/local/bin/gcc
sudo ln -fs /usr/bin/g++-10 /usr/local/bin/g++

- name: Setup symbolic link to gfortran on macOS
if: runner.os == 'macOS'
run: |
sudo ln -fs /usr/local/bin/gfortran-11 /usr/local/bin/gfortran
sudo ln -fs /usr/local/bin/gcc-11 /usr/local/bin/gcc
sudo ln -fs /usr/local/bin/g++-11 /usr/local/bin/g++

- name: Print GNU compiler versions
run: |
gfortran --version
gcc --version
g++ --version
- name: Install gfortran
uses: modflowpy/install-gfortran-action@v1

- name: Set and print branch name
run: |
Expand Down
Loading