-
Notifications
You must be signed in to change notification settings - Fork 35
46 lines (40 loc) · 1.52 KB
/
c-linter.yml
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
name: cpp-linter
on: [pull_request]
jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get AMReX
run: |
mkdir external
cd external
git clone https://github.com/AMReX-Codes/amrex.git
cd amrex
git checkout development
echo 'AMREX_HOME=$(GITHUB_WORKSPACE)/external/amrex' >> $GITHUB_ENV
echo $AMREX_HOME
if [[ -n "${AMREX_HOME}" ]]; then exit 1; fi
cd ../..
- name: Run cpp linter
uses: AMReX-Astro/cpp-linter-action@main
with:
build_path: 'unit_test/test_react'
make_options: '-j 4 USE_OMP=FALSE USE_MPI=FALSE USE_CUDA=FALSE DEBUG=TRUE'
ignore_files: 'amrex|util/gcem'
header_filter: '(/conductivity/|/constants/|/EOS/|/integration/|/interfaces/|/networks/|/neutrinos/|/nse_solver/|/opacity/|/rates/|/screening/|/util/|^\./).*\.H$'
config_file: ${GITHUB_WORKSPACE}/.clang-tidy
# not sure why cppcheck tests _MSC_VER, since it's only referenced from gcem
cppcheck_options: '-U_OPENMP -UAMREX_USE_GPU -UAMREX_USE_CUDA -UAMREX_USE_HIP -U_MSC_VER'
- name: Archive clang tidy report
uses: actions/upload-artifact@v4
with:
name: clang-tidy-report
path: clang-tidy-report.txt
- name: Archive cppcheck report
uses: actions/upload-artifact@v4
with:
name: cppcheck-report
path: cppcheck-report.txt