p2pool/.github/workflows/cppcheck.yml

102 lines
2.1 KiB
YAML
Raw Normal View History

2021-09-05 04:51:20 -06:00
name: cppcheck
2023-05-25 03:16:22 -06:00
on:
push:
2023-08-14 02:58:56 -06:00
paths-ignore:
- 'docker-compose/**'
- 'docs/**'
- 'README.md'
2023-05-25 03:16:22 -06:00
pull_request:
2023-08-14 02:58:56 -06:00
2023-05-25 03:16:22 -06:00
schedule:
- cron: '57 0 * * *'
2021-09-05 04:51:20 -06:00
jobs:
cppcheck-ubuntu:
timeout-minutes: 50
2021-09-05 04:51:20 -06:00
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y libuv1-dev libzmq3-dev libcurl4-openssl-dev
2021-09-05 04:51:20 -06:00
- name: Checkout repository
2022-10-28 06:32:49 -06:00
uses: actions/checkout@v3
2021-09-05 04:51:20 -06:00
with:
submodules: true
2022-05-26 10:20:29 -06:00
- name: Checkout cppcheck
uses: actions/checkout@v3
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
2023-06-16 04:24:46 -06:00
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSTATIC_LIBS=ON
2023-06-16 03:02:56 -06:00
python ../cppcheck/remove_external.py compile_commands.json
2021-09-05 04:51:20 -06:00
- name: Run cppcheck
run: |
cd cppcheck
./run.sh
2021-09-05 05:09:28 -06:00
- name: Archive full error list
uses: actions/upload-artifact@v3
with:
name: errors_full-linux
path: cppcheck/errors_full.txt
2021-09-05 05:09:28 -06:00
cppcheck-windows:
timeout-minutes: 50
2022-05-26 10:20:29 -06:00
runs-on: windows-latest
2021-09-05 05:09:28 -06:00
steps:
- name: Checkout repository
2022-10-28 06:32:49 -06:00
uses: actions/checkout@v3
2021-09-05 05:09:28 -06:00
with:
submodules: true
2022-05-25 11:15:39 -06:00
- name: Checkout cppcheck
uses: actions/checkout@v3
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
2021-09-05 05:09:28 -06:00
- name: Setup cmake
uses: lukka/get-cmake@latest
- name: cmake p2pool
run: |
mkdir build
cd build
2023-06-16 04:24:46 -06:00
cmake .. -G "Visual Studio 17 2022" -DSTATIC_LIBS=ON
2021-09-05 05:09:28 -06:00
- name: Run cppcheck
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