Skip to content

Commit 69c863e

Browse files
committed
Build with warnings enabled and as errors.
1 parent 42f8cd0 commit 69c863e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/cmake-single-platform.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424
- uses: mpi4py/setup-mpi@v1
25+
with:
26+
mpi: mpich
2527

2628
- name: Configure CMake
2729
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
2830
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
29-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
31+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_FLAGS='-Wall -Wextra -pedantic' -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
3032

3133
- name: Build
3234
# Build your program with the given configuration
@@ -36,5 +38,5 @@ jobs:
3638
working-directory: ${{github.workspace}}/build
3739
# Execute tests defined by the CMake configuration.
3840
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
39-
run: ctest -C ${{env.BUILD_TYPE}}
41+
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
4042

0 commit comments

Comments
 (0)