Add more const
s
#6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 SeisSol Group | |
# | |
# SPDX-License-Identifier: MIT | |
name: clang-tidy | |
on: | |
- push | |
jobs: | |
clang-tidy: | |
name: clang-tidy | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: apt-get | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libyaml-cpp-dev libgtest-dev ninja-build | |
# 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 update -y | |
sudo apt-get -y install clang-18 clang-tidy-18 libomp-18-dev | |
sudo pip3 install numpy | |
sudo mkdir -p /opt/dependencies | |
- name: configure-googletest | |
run: | | |
cd /usr/src/googletest/googletest | |
sudo cmake ./CMakeLists.txt -Dgtest_disable_pthreads=ON -GNinja | |
sudo ninja | |
# ninja install was not found | |
sudo cp lib/*.a /usr/lib | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: clang-tidy | |
run: | | |
set -euo pipefail | |
clang-tidy-18 --version | |
which clang-tidy-18 | |
git submodule update --init | |
cd tests | |
mkdir -p build && cd build | |
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -GNinja | |
ninja | |
sed -i 's/-fprofile-abs-path //g' compile_commands.json | |
run-clang-tidy ../ ./ -clang-tidy-binary=$(which clang-tidy-18) -quiet -j $(nproc) |