Update develop branch: new versions, packages, package locations, fixes #1041
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build macOS | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
env: | |
VERBOSE: 1 | |
runs-on: macos-10.15 | |
strategy: | |
matrix: | |
mpi: ['mpich'] | |
compiler: ['clang', 'gcc'] | |
steps: | |
- name: Update brew packages | |
run: | | |
brew update | |
brew install [email protected] | |
brew upgrade [email protected] | |
pip3 install setuptools | |
pip3 install numpy | |
pip3 install netCDF4 | |
ssl_ver=$(brew list --formula [email protected] --versions | cut -d " " -f2) | |
sudo ln -s /usr/local/Cellar/[email protected]/$ssl_ver/lib/libssl.1.1.dylib /usr/local/lib/libssl.dylib | |
sudo ln -s /usr/local/Cellar/[email protected]/$ssl_ver/lib/libcrypto.1.1.dylib /usr/local/lib/libcrypto.dylib | |
- name: Get sources | |
uses: actions/checkout@v3 | |
with: | |
path: ${{ matrix.compiler }}-${{ matrix.mpi }} | |
- name: Build | |
run: | | |
cd ${{ matrix.compiler }}-${{ matrix.mpi }} | |
prefix=$GITHUB_WORKSPACE/install-${{ matrix.compiler }}-${{ matrix.mpi }} | |
if [[ ${{ matrix.compiler }} == "gcc" ]]; then | |
export CC=/usr/local/bin/gcc-9 | |
export CXX=/usr/local/bin/g++-9 | |
export FC=/usr/local/bin/gfortran-9 | |
elif [[ ${{ matrix.compiler }} == "clang" ]]; then | |
export CC=clang | |
export CXX=clang++ | |
export FC=/usr/local/bin/gfortran-9 | |
fi | |
export SERIAL_CC=${CC} | |
export SERIAL_CXX=${CXX} | |
export SERIAL_FC=${FC} | |
gcc_ver=$( ${CC} -dumpfullversion -dumpversion ) | |
python_ver=$( python3 --version | cut -d " " -f2 | cut -d. -f1-2 ) | |
export HPC_COMPILER="${{ matrix.compiler }}/${gcc_ver}" | |
export HPC_MPI="${{ matrix.mpi }}/${mpi_ver}" | |
export HPC_PYTHON="python/${python_ver}" | |
./build_stack.sh -p $prefix -c config/config_mac.sh -y stack/stack_mac.yaml | |
- name: Upload logs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.compiler }}-${{ matrix.mpi }}-log | |
path: ${{ matrix.compiler }}-${{ matrix.mpi }}/log | |
- name: Clean disk space of downloaded packages | |
if: ${{ success() }} | |
run: | | |
cd ${{ matrix.compiler }}-${{ matrix.mpi }} | |
rm -rf pkg |