2021-09-05 10:51:20 +00:00
|
|
|
name: cppcheck
|
|
|
|
|
2023-05-25 09:16:22 +00:00
|
|
|
on:
|
|
|
|
push:
|
2023-08-14 08:58:56 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'docker-compose/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'README.md'
|
|
|
|
|
2023-05-25 09:16:22 +00:00
|
|
|
pull_request:
|
2023-08-14 08:58:56 +00:00
|
|
|
|
2023-05-25 09:16:22 +00:00
|
|
|
schedule:
|
|
|
|
- cron: '57 0 * * *'
|
2021-09-05 10:51:20 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
cppcheck-ubuntu:
|
|
|
|
|
2024-12-01 08:44:27 +00:00
|
|
|
timeout-minutes: 180
|
2021-09-05 10:51:20 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-01-26 14:31:52 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-09-05 10:51:20 +00:00
|
|
|
with:
|
2024-01-27 20:29:12 +00:00
|
|
|
submodules: recursive
|
2021-09-05 10:51:20 +00:00
|
|
|
|
2022-05-26 16:20:29 +00:00
|
|
|
- name: Checkout cppcheck
|
2024-01-26 14:31:52 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-05-26 16:20:29 +00:00
|
|
|
with:
|
|
|
|
repository: danmar/cppcheck
|
|
|
|
path: cppcheck-main
|
|
|
|
|
|
|
|
- name: Build cppcheck
|
|
|
|
run: |
|
|
|
|
cd cppcheck-main
|
|
|
|
make -j$(nproc) cppcheck
|
|
|
|
|
2023-06-15 09:23:04 +00:00
|
|
|
- name: cmake p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-06-16 10:24:46 +00:00
|
|
|
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSTATIC_LIBS=ON
|
2023-06-16 09:02:56 +00:00
|
|
|
python ../cppcheck/remove_external.py compile_commands.json
|
2023-06-15 09:23:04 +00:00
|
|
|
|
2021-09-05 10:51:20 +00:00
|
|
|
- name: Run cppcheck
|
|
|
|
run: |
|
|
|
|
cd cppcheck
|
|
|
|
./run.sh
|
2021-09-05 11:09:28 +00:00
|
|
|
|
2023-06-15 09:23:04 +00:00
|
|
|
- name: Archive full error list
|
2024-12-02 20:46:59 +00:00
|
|
|
if: '!cancelled()'
|
2024-01-26 14:31:52 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-06-15 09:23:04 +00:00
|
|
|
with:
|
|
|
|
name: errors_full-linux
|
|
|
|
path: cppcheck/errors_full.txt
|
|
|
|
|
2023-12-23 10:04:54 +00:00
|
|
|
- name: Archive checkers report
|
2024-12-02 20:46:59 +00:00
|
|
|
if: '!cancelled()'
|
2024-02-01 11:47:44 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-12-23 10:04:54 +00:00
|
|
|
with:
|
|
|
|
name: checkers_report-linux
|
|
|
|
path: cppcheck/checkers_report.txt
|
|
|
|
|
2021-09-05 11:09:28 +00:00
|
|
|
cppcheck-windows:
|
|
|
|
|
2023-10-25 08:40:27 +00:00
|
|
|
timeout-minutes: 60
|
2022-05-26 16:20:29 +00:00
|
|
|
runs-on: windows-latest
|
2021-09-05 11:09:28 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-01-26 14:31:52 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-09-05 11:09:28 +00:00
|
|
|
with:
|
2024-01-27 20:29:12 +00:00
|
|
|
submodules: recursive
|
2021-09-05 11:09:28 +00:00
|
|
|
|
2022-05-25 17:15:39 +00:00
|
|
|
- name: Checkout cppcheck
|
2024-01-26 14:31:52 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-05-25 17:15:39 +00:00
|
|
|
with:
|
|
|
|
repository: danmar/cppcheck
|
|
|
|
path: cppcheck-main
|
|
|
|
|
|
|
|
- name: Build cppcheck
|
|
|
|
run: |
|
|
|
|
cd cppcheck-main
|
2024-02-12 06:25:49 +00:00
|
|
|
& "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Msbuild\\Current\\Bin\\amd64\\msbuild.exe" -v:m /m /p:Configuration=Release /p:Platform=x64
|
2022-05-25 17:15:39 +00:00
|
|
|
|
2021-09-05 11:09:28 +00:00
|
|
|
- name: Setup cmake
|
|
|
|
uses: lukka/get-cmake@latest
|
|
|
|
|
|
|
|
- name: cmake p2pool
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-06-16 10:24:46 +00:00
|
|
|
cmake .. -G "Visual Studio 17 2022" -DSTATIC_LIBS=ON
|
2021-09-05 11:09:28 +00:00
|
|
|
|
|
|
|
- name: Run cppcheck
|
|
|
|
run: |
|
|
|
|
cd cppcheck
|
|
|
|
./run.cmd
|
2023-06-15 09:23:04 +00:00
|
|
|
|
|
|
|
- name: Archive full error list
|
2024-12-02 20:46:59 +00:00
|
|
|
if: '!cancelled()'
|
2024-01-26 14:31:52 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-06-15 09:23:04 +00:00
|
|
|
with:
|
|
|
|
name: errors_full-windows
|
|
|
|
path: cppcheck/errors_full.txt
|
2023-12-23 10:04:54 +00:00
|
|
|
|
|
|
|
- name: Archive checkers report
|
2024-12-02 20:46:59 +00:00
|
|
|
if: '!cancelled()'
|
2024-02-01 11:47:44 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-12-23 10:04:54 +00:00
|
|
|
with:
|
|
|
|
name: checkers_report-windows
|
|
|
|
path: cppcheck/checkers_report.txt
|