Files
p2pool-salvium/.gitea/workflows/cppcheck.yml
2025-12-08 23:49:09 +01:00

56 lines
1.4 KiB
YAML

name: cppcheck
on:
workflow_dispatch:
jobs:
cppcheck-ubuntu:
timeout-minutes: 240
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y git build-essential cmake python3 libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Checkout cppcheck
run: |
git clone https://github.com/danmar/cppcheck cppcheck-main
- name: Build cppcheck
run: |
cd cppcheck-main
make -j$(nproc) cppcheck
- name: cmake p2pool
run: |
mkdir build
cd build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSTATIC_LIBS=ON -DWITH_GRPC=OFF -DWITH_INDEXED_HASHES=ON -DCMAKE_POLICY_VERSION_MINIMUM="3.5"
python ../cppcheck/remove_external.py compile_commands.json
- name: Run cppcheck
run: |
cd cppcheck
./run.sh
- name: Archive full error list
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: errors_full-linux
path: cppcheck/errors_full.txt
- name: Archive checkers report
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: checkers_report-linux
path: cppcheck/checkers_report.txt