-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.6 KB
/
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
# SPDX-FileCopyrightText: 2024 Technical University of Munich
#
# SPDX-License-Identifier: BSD-3-Clause
name: clang-tidy
on:
- push
jobs:
clang-tidy:
name: clang-tidy
runs-on: ubuntu-24.04
steps:
- name: apt-get
run: |
sudo apt-get -y update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install -y ninja-build libomp-dev libopenmpi-dev openmpi-bin openmpi-common python3 python3-pip
# keep, for once clang-19 or higher is needed
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main"
sudo add-apt-repository "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main"
sudo apt-get -y update
sudo apt-get -y install clang-18 clang-tidy-18 libomp-18-dev
sudo apt-get -y install cxxtest
sudo pip3 install numpy
sudo mkdir -p /opt/dependencies
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: clang-tidy
run: |
set -euo pipefail
clang-tidy-18 --version
which clang-tidy-18
mkdir -p build && cd build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DTESTING=ON -DUSE_MPI=ON -GNinja
sed -i 's/-fprofile-abs-path //g' compile_commands.json
for f in $(find ../async -iname '*.h'); do clang-tidy-18 -p . $f; done
for f in $(find ../tests -iname '*.h'); do clang-tidy-18 -p . $f; done