-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0cc5213
commit ea501a5
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
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 | ||
sudo apt-get install hdf5-tools libeigen3-dev libhdf5-openmpi-103 libhdf5-openmpi-dev libmetis-dev libomp-dev libopenmpi-dev libparmetis-dev libyaml-cpp-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 update | ||
sudo apt-get -y install clang-18 clang-tidy-18 libomp-18-dev | ||
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 | ||
git submodule update --init | ||
mkdir -p build && cd build | ||
CMAKE_PREFIX_PATH=/opt/dependencies cmake .. | ||
sed -i 's/-fprofile-abs-path //g' compile_commands.json | ||
run-clang-tidy ../ ./ -clang-tidy-binary=$(which clang-tidy-18) -quiet -j $(nproc) |