p2pool/.github/workflows/clang-tidy.yml

40 lines
1,005 B
YAML
Raw Normal View History

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:
- name: Install clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
2024-01-26 14:31:52 +00:00
sudo ./llvm.sh 18
sudo apt-get install -y clang-tidy-18
clang-tidy-18 --verify-config
2023-06-14 11:58:51 +00:00
- name: Checkout repository
2024-01-26 14:31:52 +00:00
uses: actions/checkout@v4
2023-06-14 11:58:51 +00:00
with:
2024-01-27 20:29:12 +00:00
submodules: recursive
2023-06-14 11:58:51 +00:00
- name: cmake p2pool
run: |
mkdir build
cd build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DDEV_CLANG_TIDY=ON -DSTATIC_LIBS=ON
2023-06-14 11:58:51 +00:00
- name: Run clang-tidy
run: |
cd src
clang-tidy-18 *.cpp -p ../build -checks=-clang-diagnostic-undefined-internal,-clang-analyzer-optin.performance.Padding,-clang-diagnostic-nan-infinity-disabled -warnings-as-errors=* -header-filter=^[^\.]