Skip to content

Commit

Permalink
Merge branch 'main' into refactor-model-node-classes
Browse files Browse the repository at this point in the history
  • Loading branch information
faisal-bhuiyan committed Jul 23, 2024
2 parents f85d3fb + c6b60c4 commit 47f2f22
Show file tree
Hide file tree
Showing 81 changed files with 9,049 additions and 2,857 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This is a collection of GitHub workflow definitions for CI purposes. They are organized as follows:

1. correctness-linux.yaml: Builds and runs our entire test suite on ubuntu-latest for both gcc and clang compilers. Debug and release builds are tested. Address sanitizer and undefined behavior sanitizer are enabled.
2. correctness-macos.yaml: Builds and runs our entire test suite on macos-latest using AppleClang. Debug and release builds are tested. Address sanitizer and undefined behavior sanitizer are enabled/
3. formatting.yaml: Checks formatting on all source, header, and test files. This does not automatically fix formatting errors - the developer is responsible for fixing any failures.
4. clang-tidy.yaml: Runs the clang-tidy static analysis tool on all source, header, and test files.
5. cppcheck.yaml: Runs the CppCheck static analaysis tool on all source, header, and test files.
136 changes: 0 additions & 136 deletions .github/workflows/ci.yaml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: OpenTurbine-CI

on: push

jobs:
ClangTidy:
runs-on: ubuntu-latest
env:
CMAKE_BUILD_PARALLEL_LEVEL: 1
strategy:
fail-fast: false
steps:
- name: Cache install Trilinos
id: cache-trilinos
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: linux-spack
- name: Install Trilinos
if: steps.cache-trilinos.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 trilinos@master~mpi~epetra+basker
- name: Clone
uses: actions/checkout@v4
with:
submodules: true
path: openturbine
- name: Run Clang-Tidy
run: |
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
cd openturbine
mkdir build-clangtidy
cd build-clangtidy
cmake .. \
-DOTURB_ENABLE_TESTS:BOOL=ON \
-DOTURB_ENABLE_BASIC_SANITIZERS=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_CLANG_TIDY="clang-tidy"
cmake --build .
51 changes: 51 additions & 0 deletions .github/workflows/correctness-linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: OpenTurbine-CI

on: push

jobs:
Correctness-Linux:
runs-on: ubuntu-latest
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
CTEST_PARALLEL_LEVEL: 2
CXX: ${{matrix.compiler}}
strategy:
fail-fast: false
matrix:
compiler: [g++, clang++]
build_type: [Release, Debug]
steps:
- name: Cache install Trilinos
id: cache-trilinos
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: linux-spack
- name: Install Trilinos
if: steps.cache-trilinos.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 trilinos@master~mpi~epetra+basker
- name: Clone
uses: actions/checkout@v4
with:
submodules: true
path: openturbine
- name: Test OpenTurbine
run: |
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
cd openturbine
mkdir build
cd build
cmake .. \
-DOTURB_ENABLE_TESTS:BOOL=ON \
-DOTURB_ENABLE_BASIC_SANITIZERS=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build .
ctest -C ${{ matrix.build_type }} --output-on-failure
49 changes: 49 additions & 0 deletions .github/workflows/correctness-macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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:
build_type: [Release, Debug]
steps:
- name: Cache install Trilinos
id: cache-trilinos
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: macos-spack
- name: Install Trilinos
if: steps.cache-trilinos.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 trilinos@master~mpi~epetra+basker
- name: Clone
uses: actions/checkout@v4
with:
submodules: true
path: openturbine
- name: Test OpenTurbine
run: |
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
cd openturbine
mkdir build
cd build
cmake .. \
-DOTURB_ENABLE_TESTS:BOOL=ON \
-DOTURB_ENABLE_BASIC_SANITIZERS=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build .
ctest --output-on-failure
48 changes: 48 additions & 0 deletions .github/workflows/cppcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: OpenTurbine-CI

on: push

jobs:
CppCheck:
runs-on: ubuntu-latest
env:
CMAKE_BUILD_PARALLEL_LEVEL: 1
CXX: clang++
strategy:
fail-fast: false
steps:
- name: Cache install Trilinos
id: cache-trilinos
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: linux-spack
- name: Install Trilinos
if: steps.cache-trilinos.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 trilinos@master~mpi~epetra+basker
- name: Clone
uses: actions/checkout@v4
with:
submodules: true
path: openturbine
- name: Run CppCheck
run: |
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
sudo apt-get install cppcheck
cd openturbine
mkdir build-cppcheck
cd build-cppcheck
cmake .. \
-DOTURB_ENABLE_TESTS:BOOL=ON \
-DOTURB_ENABLE_BASIC_SANITIZERS=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_CPPCHECK="cppcheck;--enable=all;--error-exitcode=0;--suppress=missingInclude;--library=googletest"
cmake --build .
41 changes: 0 additions & 41 deletions .github/workflows/deploy-pages.yaml

This file was deleted.

Loading

0 comments on commit 47f2f22

Please sign in to comment.