forked from AIDASoft/DD4hep
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.54 KB
/
clang-tidy.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
47
name: clang-tidy-guards
on: [push, pull_request]
jobs:
default:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
LCG: ["dev4/x86_64-el9-clang16-opt"]
steps:
- uses: actions/checkout@v4
- uses: cvmfs-contrib/github-action-cvmfs@v4
- uses: aidasoft/run-lcg-view@v3
with:
release-platform: ${{ matrix.LCG }}
run: |
# clang-tidy does not work with the clang-wrapper, we setup the direct clang here
source /cvmfs/sft.cern.ch/lcg/contrib/clang/16/x86_64-el9/setup.sh
mkdir build
cd build
unset CPATH
echo "::group::CMakeConfig"
cmake -GNinja \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DDD4HEP_USE_GEANT4=ON \
-DBoost_NO_BOOST_CMAKE=ON \
-DDD4HEP_USE_LCIO=ON \
-DDD4HEP_USE_EDM4HEP=ON \
-DDD4HEP_USE_TBB=ON \
-DDD4HEP_USE_HEPMC3=ON \
-DDD4HEP_BUILD_DEBUG=OFF \
-DBUILD_TESTING=ON \
-DDD4HEP_DEBUG_CMAKE=ON \
-DDD4HEP_USE_XERCESC=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-fdiagnostics-color=always" \
-DCMAKE_CXX_STANDARD=20 ..
echo "::group::Tidy"
cd ..
HEADER_FILES=$(find */include/* -name "*.h" | grep -v "/detail/\|/src/\|DDGear.h")
clang-tidy -p build \
--extra-arg "-DDD4HEP_MUST_USE_DETECTORIMP_H" \
--warnings-as-errors=".*" \
-checks=-*,llvm-header-guard \
${HEADER_FILES}