Skip to content

Commit e548b5d

Browse files
committed
CI-windows.yml: perform debug and release builds in separate jobs
1 parent 150ff4b commit e548b5d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/CI-windows.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
matrix:
2323
os: [windows-2019, windows-2022]
2424
arch: [x64, x86]
25+
config: [debug, release]
2526
fail-fast: false
2627

2728
runs-on: ${{ matrix.os }}
@@ -34,6 +35,7 @@ jobs:
3435
- uses: actions/checkout@v3
3536

3637
- name: Set up Python 3.11
38+
if: matrix.config == 'release'
3739
uses: actions/setup-python@v4
3840
with:
3941
python-version: '3.11'
@@ -76,6 +78,7 @@ jobs:
7678
CL: /MP
7779

7880
- name: Install missing Python packages
81+
if: matrix.config == 'release'
7982
run: |
8083
python -m pip install pip --upgrade || exit /b !errorlevel!
8184
python -m pip install pytest || exit /b !errorlevel!
@@ -92,6 +95,7 @@ jobs:
9295
cmake -S . -B build -DBUILD_TESTS=On || exit /b !errorlevel!
9396
9497
- name: Build CLI debug configuration using MSBuild
98+
if: matrix.config == 'debug'
9599
run: |
96100
set ARCH=${{ matrix.arch }}
97101
if "${{ matrix.arch }}" == "x86" (
@@ -101,9 +105,11 @@ jobs:
101105
msbuild -m cppcheck.sln /p:Configuration=Debug-PCRE;Platform=%ARCH% -maxcpucount || exit /b !errorlevel!
102106
103107
- name: Run Debug test
108+
if: matrix.config == 'debug'
104109
run: .\bin\debug\testrunner.exe || exit /b !errorlevel!
105110

106111
- name: Build CLI release configuration using MSBuild
112+
if: matrix.config == 'release'
107113
run: |
108114
set ARCH=${{ matrix.arch }}
109115
if "${{ matrix.arch }}" == "x86" (
@@ -113,9 +119,11 @@ jobs:
113119
msbuild -m cppcheck.sln /p:Configuration=Release-PCRE;Platform=%ARCH% -maxcpucount || exit /b !errorlevel!
114120
115121
- name: Run Release test
122+
if: matrix.config == 'release'
116123
run: .\bin\testrunner.exe || exit /b !errorlevel!
117124

118125
- name: Run test/cli
126+
if: matrix.config == 'release'
119127
run: |
120128
:: since FILESDIR is not set copy the binary to the root so the addons are found
121129
:: copy .\build\bin\Release\cppcheck.exe .\cppcheck.exe || exit /b !errorlevel!
@@ -131,6 +139,7 @@ jobs:
131139
python -m pytest test-suppress-syntaxError.py || exit /b !errorlevel!
132140
133141
- name: Test addons
142+
if: matrix.config == 'release'
134143
run: |
135144
.\cppcheck --addon=threadsafety addons\test\threadsafety || exit /b !errorlevel!
136145
.\cppcheck --addon=threadsafety --std=c++03 addons\test\threadsafety || exit /b !errorlevel!

0 commit comments

Comments
 (0)