Skip to content

Commit

Permalink
Break apart linux and MacOS correctness checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ddement committed Jul 10, 2024
1 parent b31d6ef commit e62813a
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ name: OpenTurbine-CI

on: push

env:
CMAKE_BUILD_PARALLEL_LEVEL: 1

jobs:
ClangTidy:
runs-on: ubuntu-latest
env:
CMAKE_BUILD_PARALLEL_LEVEL: 1
strategy:
fail-fast: false
steps:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/correctness.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ on: push

jobs:
CTest:
runs-on: ${{matrix.os}}
runs-on: ubuntu-latest
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
CTEST_PARALLEL_LEVEL: 2
CXX: ${{matrix.compiler}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [g++, clang++]
build_type: [Release, Debug]
steps:
Expand All @@ -21,7 +20,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: ${{runner.os}}-spack
key: linux-spack
- name: Install Trilinos
if: steps.cache-trilinos.outputs.cache-hit != 'true'
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/cppcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ name: OpenTurbine-CI

on: push

env:
CMAKE_BUILD_PARALLEL_LEVEL: 1

jobs:
CppCheck:
runs-on: ubuntu-latest
env:
CMAKE_BUILD_PARALLEL_LEVEL: 1
strategy:
fail-fast: false
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
with:
source: './src ./tests/unit_tests'
exclude: '.'
extensions: 'H,h,cpp,hpp'
extensions: 'H,h,cpp'
clangFormatVersion: 16
49 changes: 49 additions & 0 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: OpenTurbine-CI

on: push

jobs:
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

0 comments on commit e62813a

Please sign in to comment.