From 12cf1f57705b58520d4063c40ae3261ded934c2e Mon Sep 17 00:00:00 2001 From: Kyle Gerheiser <3209794+kgerheiser@users.noreply.github.com> Date: Tue, 23 Mar 2021 09:08:25 -0400 Subject: [PATCH] Bugfix/mpi ci (#427) Fix failing CI by building MPICH on macOS --- ...smf-8.0.1_jasper-2.0.22_nceplibs-1.3.0.yml | 25 +++++++++++++++++-- ...f-8.0.1_jasper-2.0.22_nceplibs-develop.yml | 24 ++++++++++++++++-- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/.github/workflows/esmf-8.0.1_jasper-2.0.22_nceplibs-1.3.0.yml b/.github/workflows/esmf-8.0.1_jasper-2.0.22_nceplibs-1.3.0.yml index e495cac08..2b0b5e788 100644 --- a/.github/workflows/esmf-8.0.1_jasper-2.0.22_nceplibs-1.3.0.yml +++ b/.github/workflows/esmf-8.0.1_jasper-2.0.22_nceplibs-1.3.0.yml @@ -14,12 +14,34 @@ jobs: compiler: [gcc-9] steps: + + - name: cache-mpich + id: cache-mpich + uses: actions/cache@v2 + with: + path: ~/mpich + key: mpich-${{ runner.os }}-3.3.2-1 + + - name: build-mpich + if: steps.cache-mpich.outputs.cache-hit != 'true' + run: | + if [[ ${{ matrix.os }} == "macos-10.15" ]]; then + wget http://www.mpich.org/static/downloads/3.3.2/mpich-3.3.2.tar.gz &> /dev/null + tar -xzf mpich-3.3.2.tar.gz + pushd mpich-3.3.2 + ./configure --prefix=$HOME/mpich + make + sudo make install + popd + fi + - name: install-dependencies run: | + echo "$HOME/mpich/bin" >> $GITHUB_PATH if [[ ${{ matrix.os }} == "ubuntu-20.04" ]]; then sudo apt-get update - sudo apt-get install doxygen sudo apt-get install libmpich-dev + sudo apt-get install doxygen sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config sudo apt-get install libpng-dev sudo apt-get install libjpeg-dev @@ -128,4 +150,3 @@ jobs: cmake .. -DCMAKE_PREFIX_PATH='~;~/jasper;~/nceplibs' -DENABLE_DOCS=On make -j2 make test - diff --git a/.github/workflows/esmf-8.0.1_jasper-2.0.22_nceplibs-develop.yml b/.github/workflows/esmf-8.0.1_jasper-2.0.22_nceplibs-develop.yml index 274ef8d23..8ba873c24 100644 --- a/.github/workflows/esmf-8.0.1_jasper-2.0.22_nceplibs-develop.yml +++ b/.github/workflows/esmf-8.0.1_jasper-2.0.22_nceplibs-develop.yml @@ -14,16 +14,37 @@ jobs: compiler: [gcc-9] steps: + - name: cache-mpich + id: cache-mpich + uses: actions/cache@v2 + with: + path: ~/mpich + key: mpich-${{ runner.os }}-3.3.2-1 + + - name: build-mpich + if: steps.cache-mpich.outputs.cache-hit != 'true' + run: | + if [[ ${{ matrix.os }} == "macos-10.15" ]]; then + wget http://www.mpich.org/static/downloads/3.3.2/mpich-3.3.2.tar.gz &> /dev/null + tar -xzf mpich-3.3.2.tar.gz + pushd mpich-3.3.2 + ./configure --prefix=$HOME/mpich + make + sudo make install + popd + fi + - name: install-dependencies run: | if [[ ${{ matrix.os }} == "ubuntu-20.04" ]]; then sudo apt-get update - sudo apt-get install doxygen sudo apt-get install libmpich-dev + sudo apt-get install doxygen sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config sudo apt-get install libpng-dev sudo apt-get install libjpeg-dev elif [[ ${{ matrix.os }} == "macos-10.15" ]]; then + echo "$HOME/mpich/bin" >> $GITHUB_PATH brew install doxygen brew install mpich brew install netcdf @@ -34,7 +55,6 @@ jobs: sudo ln -sf /usr/local/bin/gfortran-10 /usr/local/bin/gfortran fi fi - export PATH="~/.local/bin:$PATH" python3 -m pip install gcovr - name: cache-esmf