You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
p2pool/.github/workflows/cppcheck.yml

102 lines
2.1 KiB

name: cppcheck
on:
push:
paths-ignore:
- 'docker-compose/**'
- 'docs/**'
- 'README.md'
pull_request:
schedule:
- cron: '57 0 * * *'
jobs:
cppcheck-ubuntu:
timeout-minutes: 60
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@v4
with:
submodules: true
- name: Checkout cppcheck
uses: actions/checkout@v4
with:
repository: danmar/cppcheck
path: 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
python ../cppcheck/remove_external.py compile_commands.json
- name: Run cppcheck
run: |
cd cppcheck
./run.sh
- name: Archive full error list
uses: actions/upload-artifact@v4
with:
name: errors_full-linux
path: cppcheck/errors_full.txt
cppcheck-windows:
timeout-minutes: 60
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Checkout cppcheck
uses: actions/checkout@v4
with:
repository: danmar/cppcheck
path: cppcheck-main
- name: Build cppcheck
run: |
cd cppcheck-main
& "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\msbuild.exe" /m /p:Configuration=Release /p:Platform=x64
- name: Setup cmake
uses: lukka/get-cmake@latest
- name: cmake p2pool
run: |
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -DSTATIC_LIBS=ON
- name: Run cppcheck
run: |
cd cppcheck
./run.cmd
- name: Archive full error list
uses: actions/upload-artifact@v4
with:
name: errors_full-windows
path: cppcheck/errors_full.txt