aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/c-std.yml34
1 files changed, 28 insertions, 6 deletions
diff --git a/.github/workflows/c-std.yml b/.github/workflows/c-std.yml
index 64a1c86..a0e6a9e 100644
--- a/.github/workflows/c-std.yml
+++ b/.github/workflows/c-std.yml
@@ -133,18 +133,30 @@ jobs:
133 - name: Generate project files (cmake) 133 - name: Generate project files (cmake)
134 if: matrix.builder == 'cmake' 134 if: matrix.builder == 'cmake'
135 run: | 135 run: |
136 cmake -S . -B . -D CMAKE_BUILD_TYPE=Release ${{ matrix.os.cmake-opt }} -DZLIB_BUILD_MINIZIP=ON 136 cmake -S . -B ./build1 -D CMAKE_BUILD_TYPE=Release ${{ matrix.os.cmake-opt }} -DZLIB_BUILD_TESTING=OFF
137 env: 137 env:
138 CC: ${{ matrix.compiler }} 138 CC: ${{ matrix.compiler }}
139 CFLAGS: -std=${{ matrix.std.value }} ${{ matrix.arch.compiler-opt }} -Werror -Wall -Wextra 139 CFLAGS: -std=${{ matrix.std.value }} ${{ matrix.arch.compiler-opt }} -Werror -Wall -Wextra
140 140
141 - name: Generate project files with tests (cmake)
142 if: matrix.builder == 'cmake'
143 run: |
144 cmake -S . -B ./build2 -D CMAKE_BUILD_TYPE=Release ${{ matrix.os.cmake-opt }} -DZLIB_BUILD_MINIZIP=ON
145 env:
146 CC: ${{ matrix.compiler }}
147 CFLAGS: -std=${{ matrix.std.value }} ${{ matrix.arch.compiler-opt }} -Wall -Wextra
148
141 - name: Compile source code (cmake) 149 - name: Compile source code (cmake)
142 if: matrix.builder == 'cmake' 150 if: matrix.builder == 'cmake'
143 run: cmake --build . --config Release 151 run: cmake --build ./build1 --config Release
152
153 - name: Compile source code with tests (cmake)
154 if: matrix.builder == 'cmake'
155 run: cmake --build ./build --config Release
144 156
145 - name: Run test cases (cmake) 157 - name: Run test cases (cmake)
146 if: matrix.builder == 'cmake' 158 if: matrix.builder == 'cmake'
147 run: ctest -C Release --output-on-failure --max-width 120 159 run: ctest ./build2 -C Release --output-on-failure --max-width 120
148 160
149 161
150 msvc: 162 msvc:
@@ -196,13 +208,23 @@ jobs:
196 208
197 - name: Generate project files (cmake) 209 - name: Generate project files (cmake)
198 run: | 210 run: |
199 cmake -S . -B . ${{ matrix.arch.value }} -D CMAKE_BUILD_TYPE=Release -DZLIB_BUILD_MINIZIP=ON 211 cmake -S . -B ./build1 ${{ matrix.arch.value }} -D CMAKE_BUILD_TYPE=Release -DZLIB_BUILD_TESTING=OFF
200 env: 212 env:
201 CC: ${{ matrix.compiler }} 213 CC: ${{ matrix.compiler }}
202 CFLAGS: /WX ${{ matrix.std.value }} 214 CFLAGS: /WX ${{ matrix.std.value }}
203 215
216 - name: Generate project files with tests (cmake)
217 run: |
218 cmake -S . -B ./build2 ${{ matrix.arch.value }} -D CMAKE_BUILD_TYPE=Release -DZLIB_BUILD_MINIZIP=ON
219 env:
220 CC: ${{ matrix.compiler }}
221 CFLAGS: ${{ matrix.std.value }}
222
204 - name: Compile source code (cmake) 223 - name: Compile source code (cmake)
205 run: cmake --build . --config Release -v 224 run: cmake --build ./build1 --config Release -v
225
226 - name: Compile source code with tests(cmake)
227 run: cmake --build ./build2 --config Release -v
206 228
207 - name: Run test cases (cmake) 229 - name: Run test cases (cmake)
208 run: ctest -C Release --output-on-failure --max-width 120 230 run: ctest ./build2 -C Release --output-on-failure --max-width 120