diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml index 01d3d30..7c58d4c 100644 --- a/.github/workflows/cppcheck.yml +++ b/.github/workflows/cppcheck.yml @@ -27,17 +27,25 @@ jobs: cppcheck-windows: - runs-on: windows-latest + runs-on: windows-2022 steps: - - name: Install cppcheck - run: choco install cppcheck - - name: Checkout repository uses: actions/checkout@v2 with: submodules: true + - 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 + - name: Setup cmake uses: lukka/get-cmake@latest diff --git a/cppcheck/run.cmd b/cppcheck/run.cmd index 362c1bf..e15acd6 100644 --- a/cppcheck/run.cmd +++ b/cppcheck/run.cmd @@ -1,5 +1,5 @@ @echo off -"C:\Program Files\cppcheck\cppcheck.exe" --project=..\build\p2pool.vcxproj --project-configuration="Release|x64" -DZMQ_STATIC --platform=win64 --std=c++14 --enable=all --inconclusive --inline-suppr --template="{file}:{line}:{id}{inconclusive: INCONCLUSIVE} {message}" --includes-file=includes.txt --suppressions-list=suppressions.txt --output-file=errors_full.txt +"..\cppcheck-main\bin\cppcheck.exe" --project=..\build\p2pool.vcxproj --project-configuration="Release|x64" -DZMQ_STATIC --platform=win64 --std=c++14 --enable=all --inconclusive --inline-suppr --template="{file}:{line}:{id}{inconclusive: INCONCLUSIVE} {message}" --includes-file=includes.txt --suppressions-list=suppressions.txt --output-file=errors_full.txt findstr /V /C:"external\src" errors_full.txt > errors_filtered.txt for /f %%i in ("errors_filtered.txt") do set size=%%~zi if %size% gtr 0 (