Merge pull request #290 from Exawind/milestone_fy24q4 #492
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: 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 | |
- 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 |