Skip to content

Update develop branch: new versions, packages, package locations, fixes #1046

Update develop branch: new versions, packages, package locations, fixes

Update develop branch: new versions, packages, package locations, fixes #1046

Workflow file for this run

name: Build Ubuntu
on:
pull_request:
workflow_dispatch:
jobs:
build:
env:
VERBOSE: 1
runs-on: ubuntu-20.04
strategy:
matrix:
mpi: ['openmpi', 'mpich']
steps:
- name: cache-mpi
if: matrix.mpi == 'openmpi'
id: cache-mpi
uses: actions/cache@v2
with:
path: ~/mpi
key: openmpi-4.1.1
- name: build-openmpi
if: steps.cache-mpi.outputs.cache-hit != 'true'
run: |
if [[ ${{ matrix.mpi }} == "openmpi" ]]; then
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.1.tar.gz &> /dev/null
tar -xzf openmpi-4.1.1.tar.gz
cd openmpi-4.1.1
./configure --prefix=$HOME/mpi --enable-mpi-fortran --enable-mpi-cxx
make -j2
make install
fi
- name: Install dependencies (MPICH)
if: matrix.mpi == 'mpich'
run: |
sudo apt-get update
sudo apt-get install libmpich-dev
- name: Install dependencies
run: |
if [[ ${{ matrix.mpi }} == "openmpi" ]]; then
echo "$HOME/mpi/bin" >> $GITHUB_PATH
fi
sudo apt-get install python3-pip python3-dev python3-numpy
sudo python3 -m pip install -U pip setuptools
sudo python3 -m pip install -U numpy
sudo python3 -m pip install -U netCDF4
- name: Get sources
uses: actions/checkout@v3
with:
path: ${{ matrix.mpi }}
- name: Build
run: |
cd ${{ matrix.mpi }}
prefix=$GITHUB_WORKSPACE/install-${{ matrix.mpi }}
if [[ ${{ matrix.mpi }} == "mpich" ]]; then
mpi_ver=$( mpiexec --version | grep Version | awk '{ print $2 }' )
elif [[ ${{ matrix.mpi }} == "openmpi" ]]; then
mpi_ver=$( mpiexec --version | grep OpenRTE | awk '{ print $3 }' )
fi
gnu_ver=$( gcc -dumpfullversion -dumpversion )
python_ver=$( python3 --version | cut -d " " -f2 | cut -d. -f1-2 )
export HPC_COMPILER="gnu/${gnu_ver}"
export HPC_MPI="${{ matrix.mpi }}/${mpi_ver}"
export HPC_PYTHON="python/${python_ver}"
./build_stack.sh -p $prefix -c config/config_custom.sh -y stack/stack_custom.yaml
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.mpi }}-log
path: ${{ matrix.mpi }}/log
- name: Clean disk space of downloaded packages
if: ${{ success() }}
run: |
cd ${{ matrix.mpi }}
rm -rf pkg