Skip to content

Fix Mac CI

Fix Mac CI #138

Workflow file for this run

name: Domain Decomposition Toolkit CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
# clang-formatter:
# runs-on: ubuntu-24.04
# steps:
# - uses: actions/checkout@v2
# - name: clang-format
# run: |
# sudo apt update
# sudo apt install clang-format
# clang-format --dry-run -Werror *cpp *hpp
# for component in examples test
# do
# clang-format --dry-run -Werror *cpp *hpp
# done
# build-on-ubuntu:
# runs-on: ubuntu-22.04
# container:
# image: ghcr.io/nextsimhub/nextsimdg-dev-env:latest
# steps:
# - uses: actions/checkout@v3
# - name: Configure
# shell: bash
# run: |
# . /opt/spack-environment/activate.sh
# cmake -G "Unix Makefiles" -Bbuild -S.
# - name: Build
# shell: bash
# run: |
# . /opt/spack-environment/activate.sh
# cmake --build build --config Release
# - name: Run unit tests
# shell: bash
# run: |
# . /opt/spack-environment/activate.sh
# cd build && OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 ctest -V
build-on-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
brew info bash
brew switch bash 5.2.37
brew info cmake
brew install [email protected]
brew info boost
brew install [email protected]
brew info hdf5-mpi
brew install [email protected]
brew info pnetcdf
brew install [email protected]
git clone https://github.com/trilinos/Trilinos.git
cd Trilinos
cmake \
-DTPL_ENABLE_MPI:BOOL=ON \
-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
-DTrilinos_ENABLE_Zoltan:BOOL=ON \
-DTrilinos_ENABLE_Fortran:BOOL=OFF \
-DZoltan_ENABLE_EXAMPLES:BOOL=OFF \
-DZoltan_ENABLE_TESTS:BOOL=OFF \
-DBUILD_SHARED_LIBS=ON \
-Bbuild -S.
sudo cmake --build build --config Release --target install
cd ..
git clone -b v4.8.1 https://github.com/Unidata/netcdf-c.git
cd netcdf-c
cmake \
-DENABLE_PNETCDF=ON \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_TESTS=OFF \
-DENABLE_PARALLEL_TESTS=OFF \
-Bbuild -S.
sudo cmake --build build --config Release --target install
cd ..
- name: Configure
run: |
cmake -Bbuild -S.
- name: Build
run: |
cmake --build build --config Release
- name: Run unit tests
run: |
cd build && ctest -V