Added lots of warnings to our build. Also enabled undefined behavior #370
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: | |
Release: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
include: | |
- os: ubuntu-latest | |
install_deps: sudo apt-get install libgtest-dev | |
- os: macos-latest | |
install_deps: brew install googletest | |
steps: | |
- name: Install dependencies | |
run: | | |
${{matrix.install_deps}} | |
- name: Cache install Kokkos | |
id: cache-kokkos | |
uses: actions/cache@v3 | |
with: | |
path: ~/dependencies/kokkos | |
key: ${{runner.os}}-kokkos | |
- name: Install Kokkos | |
if: steps.cache-kokkos.outputs.cache-hit != 'true' | |
run: | | |
sudo mkdir -p ~/dependencies/kokkos | |
git clone --depth 1 --branch 4.2.00 https://github.com/kokkos/kokkos | |
cd kokkos | |
mkdir build | |
cd build | |
cmake .. \ | |
-DCMAKE_INSTALL_PREFIX:PATH=~/dependencies/kokkos \ | |
-DCMAKE_BUILD_TYPE=Release | |
sudo cmake --build . --target install -j 2 | |
- name: Cache install Kokkos-Kernels | |
id: cache-kokkos-kernels | |
uses: actions/cache@v3 | |
with: | |
path: ~/dependencies/kokkos_kernels | |
key: ${{runner.os}}-kokkos-kernels | |
- name: Install Kokkos-Kernels | |
if: steps.cache-kokkos-kernels.outputs.cache-hit != 'true' | |
run: | | |
sudo mkdir -p ~/dependencies/kokkos_kernels | |
export Kokkos_DIR=~/dependencies/kokkos | |
if [ ${{matrix.os}} = 'ubuntu-latest' ]; then | |
git clone https://github.com/kokkos/kokkos-kernels | |
fi | |
if [ ${{matrix.os}} = 'macos-latest' ]; then | |
export FC=$(brew --prefix gcc)/bin/gfortran | |
git clone --depth 1 --branch 4.2.00 https://github.com/kokkos/kokkos-kernels | |
fi | |
cd kokkos-kernels | |
mkdir build | |
cd build | |
cmake .. \ | |
-DCMAKE_INSTALL_PREFIX:PATH=~/dependencies/kokkos_kernels \ | |
-DCMAKE_BUILD_TYPE=Release | |
sudo cmake --build . --target install -j 2 | |
- name: Clone | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Test OpenTurbine | |
run: | | |
export KokkosKernels_DIR=~/dependencies/kokkos_kernels | |
mkdir build | |
cd build | |
cmake .. \ | |
-DOTURB_ENABLE_TESTS:BOOL=ON \ | |
-DCMAKE_BUILD_TYPE=Release | |
cmake --build . -j 2 | |
./openturbine -h | |
./openturbine_unit_tests | |
Debug: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: sudo apt-get install libgtest-dev | |
- name: Cache install Kokkos | |
id: cache-kokkos | |
uses: actions/cache@v3 | |
with: | |
path: ~/dependencies/kokkos | |
key: ${{runner.os}}-kokkos | |
- name: Install Kokkos | |
if: steps.cache-kokkos.outputs.cache-hit != 'true' | |
run: | | |
sudo mkdir -p ~/dependencies/kokkos | |
git clone --depth 1 --branch 4.2.00 https://github.com/kokkos/kokkos | |
cd kokkos | |
mkdir build | |
cd build | |
cmake .. \ | |
-DCMAKE_INSTALL_PREFIX:PATH=~/dependencies/kokkos \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DKokkos_ENABLE_DEBUG=ON \ | |
-DKokkos_ENABLE_DEBUG_BOUNDS_CHECK=ON | |
sudo cmake --build . --target install -j 2 | |
- name: Cache install Kokkos-Kernels | |
id: cache-kokkos-kernels | |
uses: actions/cache@v3 | |
with: | |
path: ~/dependencies/kokkos_kernels | |
key: ${{runner.os}}-kokkos-kernels | |
- name: Install Kokkos-Kernels | |
if: steps.cache-kokkos-kernels.outputs.cache-hit != 'true' | |
run: | | |
sudo mkdir -p ~/dependencies/kokkos_kernels | |
export Kokkos_DIR=~/dependencies/kokkos | |
git clone https://github.com/kokkos/kokkos-kernels | |
cd kokkos-kernels | |
mkdir build | |
cd build | |
cmake .. \ | |
-DCMAKE_INSTALL_PREFIX:PATH=~/dependencies/kokkos_kernels \ | |
-DCMAKE_BUILD_TYPE=Debug | |
sudo cmake --build . --target install -j 2 | |
- name: Clone | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Test OpenTurbine | |
run: | | |
export KokkosKernels_DIR=~/dependencies/kokkos_kernels | |
mkdir build | |
cd build | |
cmake .. \ | |
-DOTURB_ENABLE_TESTS:BOOL=ON \ | |
-DOTURB_ENABLE_BASIC_SANITIZERS=ON \ | |
-DCMAKE_BUILD_TYPE=Debug | |
cmake --build . -j 2 | |
./openturbine -h | |
./openturbine_unit_tests | |
Formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v3 | |
- name: Check formatting | |
uses: DoozyX/[email protected] | |
with: | |
source: './src ./tests/unit_tests' | |
exclude: '.' | |
extensions: 'H,h,cpp' | |
clangFormatVersion: 16 |