From 5fe747e220861f29952eec66703d5c7017141ada Mon Sep 17 00:00:00 2001 From: Pavel Artsishevsky Date: Sat, 8 Jun 2024 02:00:29 +0200 Subject: [PATCH] Fix CI Signed-off-by: Pavel Artsishevsky --- .github/workflows/cmake-multi-platform.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 9e3657b..0d91194 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -24,7 +24,7 @@ jobs: # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. matrix: os: [ubuntu-24.04, windows-2022] - build_type: [Release] + build_type: [Debug] c_compiler: [gcc, clang, cl] include: - os: windows-2022 @@ -54,6 +54,10 @@ jobs: run: | echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + - name: Install dependencies + if: runner.os == 'Linux' + run: sudo apt-get install -y libfmt-dev clang-tidy clang-format cppcheck iwyu + - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type @@ -61,8 +65,16 @@ jobs: cmake -B ${{ steps.strings.outputs.build-output-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -DENABLE_ANALYZERS=ON + -DENABLE_FORMATTERS=ON + -DENABLE_SANITIZERS=ON -S ${{ github.workspace }} + - name: Check formatting + # Run only on Ubuntu 22.04 because we need clang-format >= 17.0 for this + if: matrix.os == 'ubuntu-24.04' + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target formatcheck + - name: Build # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}