2023-06-14 11:58:51 +00:00
|
|
|
name: clang-tidy
|
|
|
|
|
2023-08-14 08:58:56 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docker-compose/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'README.md'
|
|
|
|
|
|
|
|
pull_request:
|
2023-06-14 11:58:51 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
clang-tidy:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
|
|
|
|
steps:
|
2023-06-15 08:32:05 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y libuv1-dev libzmq3-dev libcurl4-openssl-dev
|
|
|
|
|
2023-06-14 11:58:51 +00:00
|
|
|
- name: Install clang
|
|
|
|
run: |
|
|
|
|
wget https://apt.llvm.org/llvm.sh
|
|
|
|
chmod +x llvm.sh
|
2023-08-15 08:04:21 +00:00
|
|
|
sudo ./llvm.sh 17
|
|
|
|
sudo apt-get install -y clang-tidy-17
|
|
|
|
clang-tidy-17 --verify-config
|
2023-06-14 11:58:51 +00:00
|
|
|
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
2023-06-15 08:32:05 +00:00
|
|
|
- name: cmake p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-08-15 08:04:21 +00:00
|
|
|
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-17 -DCMAKE_CXX_COMPILER=clang++-17 -DDEV_CLANG_TIDY=ON
|
2023-06-15 08:32:05 +00:00
|
|
|
|
2023-06-14 11:58:51 +00:00
|
|
|
- name: Run clang-tidy
|
|
|
|
run: |
|
|
|
|
cd src
|
2023-08-15 08:04:21 +00:00
|
|
|
clang-tidy-17 *.cpp -p ../build -checks=-clang-diagnostic-undefined-internal -warnings-as-errors=* -header-filter=^[^\.]
|