From 684942475050518c311220beec796751eb6afd56 Mon Sep 17 00:00:00 2001 From: microcai Date: Thu, 17 Oct 2024 15:37:00 +0800 Subject: [PATCH] ci: also build Debug variant to reflect the qt build fix --- .github/workflows/ci.yml | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f07b4ab..6ed7beb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,30 +24,27 @@ jobs: # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. matrix: os: [ubuntu-24.04, windows-latest] - build_type: [Release] - c_compiler: [gcc, clang, cl] - include: - - os: windows-latest - c_compiler: cl - cpp_compiler: cl - - os: ubuntu-24.04 - c_compiler: gcc - cpp_compiler: g++ - - os: ubuntu-24.04 - c_compiler: clang - cpp_compiler: clang++ + build_type: [Release, Debug] + compiler: [gcc, clang, cl] exclude: - os: windows-latest - c_compiler: gcc + compiler: gcc - os: windows-latest - c_compiler: clang + compiler: clang - os: ubuntu-24.04 - c_compiler: cl + compiler: cl steps: - uses: actions/checkout@v4 - name: Install ninja-build tool uses: seanmiddleditch/gha-setup-ninja@v5 + + - name: compiler setup + if: startsWith(runner.os, 'Linux') + shell: bash + run: | + echo "CC=${{ matrix.compiler }}" >> $GITHUB_ENV + echo "CXX=${{ matrix.compiler }}++" >> $GITHUB_ENV - name: Install Qt # You may pin to the exact commit or the version. @@ -96,9 +93,7 @@ jobs: # 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 run: > - cmake -B ${{ steps.strings.outputs.build-output-dir }} - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + cmake -G Ninja -B ${{ steps.strings.outputs.build-output-dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S ${{ github.workspace }} -D "BOOST_ROOT=${{ env.BOOST_ROOT }}"