Skip to content

clang-format

clang-format #526

name: OpenTurbine-CI
on: push
jobs:
Correctness-MacOS:
runs-on: macos-latest
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
CTEST_PARALLEL_LEVEL: 2
strategy:
fail-fast: false
matrix:
compiler: [g++, clang++]
build_type: [Release, Debug]
build_external: [all, none]
steps:
- name: Cache install Dependencies
id: cache-dependencies
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: macos-spack
- name: Install Dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
git clone https://github.com/spack/spack.git
source spack/share/spack/setup-env.sh
spack compiler find
spack external find
spack install googletest
spack install llvm
spack install cppcheck
spack install yaml-cpp
spack install vtk~mpi~opengl2
spack install trilinos@master~mpi~epetra ^kokkos-kernels+blas+lapack+serial
- name: Clone
uses: actions/checkout@v4
with:
submodules: true
path: openturbine
- name: Test OpenTurbine
run: |
# Find the gfortran compiler and set the FC environment variable
export FC=$(find /opt/homebrew/ -name gfortran | tr ' ' '\n' | grep "/gcc/.*gfortran")
source spack/share/spack/setup-env.sh
spack load llvm
spack load cppcheck
spack load trilinos
spack load googletest
spack load yaml-cpp
spack load vtk
cd openturbine
mkdir build
cd build
cmake .. \
-DOpenTurbine_ENABLE_SANITIZER_ADDRESS=${{ matrix.build_external == 'none' }} \
-DOpenTurbine_ENABLE_SANITIZER_UNDEFINED=${{ matrix.build_external == 'none' }} \
-DOpenTurbine_ENABLE_CPPCHECK=ON \
-DOpenTurbine_ENABLE_CLANG_TIDY=ON \
-DOpenTurbine_ENABLE_VTK=ON \
-DOpenTurbine_BUILD_OPENFAST_ADI=${{ matrix.build_external == 'all' }} \
-DOpenTurbine_BUILD_ROSCO_CONTROLLER=${{ matrix.build_external == 'all' }} \
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build .
ctest --output-on-failure