@@ -90,18 +90,27 @@ jobs:
9090 windeployqt Build\gui || exit /b !errorlevel!
9191 del Build\gui\cppcheck-gui.ilk || exit /b !errorlevel!
9292 del Build\gui\cppcheck-gui.pdb || exit /b !errorlevel!
93-
94- - name : Build CLI debug configuration using MSBuild
93+
94+ - name : Configure MSBuild
9595 run : |
9696 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} || exit /b !errorlevel!
9797 set ARCH=${{ matrix.arch }}
9898 if "${{ matrix.arch }}" == "x86" (
9999 set ARCH=Win32
100100 )
101- msbuild -m cppcheck.sln /p:Configuration=Debug-PCRE;Platform=%ARCH% -maxcpucount || exit /b !errorlevel!
101+ rm -rf build
102+ mkdir build
103+ cd build
104+ cmake -DBUILD_TESTS=On ..
102105
103- - name : Run Debug test
104- run : .\bin\debug\testrunner.exe || exit /b !errorlevel!
106+ - name : Build CLI debug configuration using MSBuild
107+ run : |
108+ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} || exit /b !errorlevel!
109+ set ARCH=${{ matrix.arch }}
110+ if "${{ matrix.arch }}" == "x86" (
111+ set ARCH=Win32
112+ )
113+ cmake --build build --target check --config Debug
105114
106115 - name : Build CLI release configuration using MSBuild
107116 run : |
@@ -110,16 +119,12 @@ jobs:
110119 if "${{ matrix.arch }}" == "x86" (
111120 set ARCH=Win32
112121 )
113- msbuild -m cppcheck.sln /p:Configuration=Release-PCRE;Platform=%ARCH% -maxcpucount || exit /b !errorlevel!
114-
115- - name : Run Release test
116- run : .\bin\testrunner.exe || exit /b !errorlevel!
122+ cmake --build build --target check --config Release
117123
118124 - name : Run test/cli
119125 run : |
120126 :: since FILESDIR is not set copy the binary to the root so the addons are found
121- copy .\bin\cppcheck.exe .\cppcheck.exe || exit /b !errorlevel!
122- copy .\bin\cppcheck-core.dll .\cppcheck-core.dll || exit /b !errorlevel!
127+ copy .\build\bin\Release\cppcheck.exe .\cppcheck.exe || exit /b !errorlevel!
123128 cd test/cli || exit /b !errorlevel!
124129 python -m pytest --suppress-no-test-exit-code test-clang-import.py || exit /b !errorlevel!
125130 python -m pytest test-helloworld.py || exit /b !errorlevel!
0 commit comments