-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (55 loc) · 1.51 KB
/
cppcheck.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: OpenTurbine-CI
on: push
jobs:
CppCheck:
runs-on: ubuntu-latest
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
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: Cache install yaml-cpp
id: cache-yaml-cpp
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: macos-yaml-cpp
- name: Install yaml-cpp
if: steps.cache-yaml-cpp.outputs.cache-hit != 'true'
run: |
source spack/share/spack/setup-env.sh
spack install yaml-cpp
- 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 .. \
-DOpenTurbine_ENABLE_CPPCHECK=ON \
-DCMAKE_BUILD_TYPE=Debug
cmake --build .