CI: use compile command database for cppcheck

This commit is contained in:
SChernykh
2023-06-15 11:23:04 +02:00
parent 30560e6cf8
commit 6738b57ba2
4 changed files with 27 additions and 15 deletions

View File

@@ -9,10 +9,15 @@ on:
jobs:
cppcheck-ubuntu:
timeout-minutes: 30
timeout-minutes: 50
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y libuv1-dev libzmq3-dev libcurl4-openssl-dev
- name: Checkout repository
uses: actions/checkout@v3
with:
@@ -29,14 +34,26 @@ jobs:
cd cppcheck-main
make -j$(nproc) cppcheck
- name: cmake p2pool
run: |
mkdir build
cd build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Run cppcheck
run: |
cd cppcheck
./run.sh
- name: Archive full error list
uses: actions/upload-artifact@v3
with:
name: errors_full-linux
path: cppcheck/errors_full.txt
cppcheck-windows:
timeout-minutes: 20
timeout-minutes: 50
runs-on: windows-latest
steps:
@@ -69,3 +86,9 @@ jobs:
run: |
cd cppcheck
./run.cmd
- name: Archive full error list
uses: actions/upload-artifact@v3
with:
name: errors_full-windows
path: cppcheck/errors_full.txt