mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-08-20 13:38:47 -06:00
39 lines
957 B
YAML
39 lines
957 B
YAML
name: clang-tidy
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
clang-tidy:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y libuv1-dev libzmq3-dev libcurl4-openssl-dev
|
|
|
|
- name: Install clang
|
|
run: |
|
|
wget https://apt.llvm.org/llvm.sh
|
|
chmod +x llvm.sh
|
|
sudo ./llvm.sh 16
|
|
sudo apt-get install -y clang-tidy-16
|
|
clang-tidy-16 --verify-config
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- name: cmake p2pool
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-16 -DCMAKE_CXX_COMPILER=clang++-16 -DDEV_CLANG_TIDY=ON
|
|
|
|
- name: Run clang-tidy
|
|
run: |
|
|
cd src
|
|
clang-tidy-16 *.cpp -p ../build -checks=-clang-diagnostic-undefined-internal -warnings-as-errors=* -header-filter=^[^\.]
|