From 12e30f58ecfd8ceac12a2f97fecd52d5011ceff8 Mon Sep 17 00:00:00 2001 From: "Justin Goshi (from Dev Box)" Date: Thu, 3 Aug 2023 12:00:16 -1000 Subject: [PATCH] Address a few comments on the PR --- ci/cmake-multi-platform.yml | 27 ++++++++++++++++++------ ci/properties/cmake-multi-platform.json | 2 +- ci/properties/cmake-single-platform.json | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/ci/cmake-multi-platform.yml b/ci/cmake-multi-platform.yml index 70475c1..a520c1a 100644 --- a/ci/cmake-multi-platform.yml +++ b/ci/cmake-multi-platform.yml @@ -25,14 +25,24 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] build_type: [Release] - compiler: [gcc, clang, cl] + c_compiler: [gcc, clang, cl] + include: + - os: windows-latest + c_compiler: cl + cpp_compiler: cl + - os: ubuntu-latest + c_compiler: gcc + cpp_compiler: g++ + - os: ubuntu-latest + c_compiler: clang + cpp_compiler: clang++ exclude: - os: windows-latest - compiler: gcc + c_compiler: gcc - os: windows-latest - compiler: clang + c_compiler: clang - os: ubuntu-latest - compiler: cl + c_compiler: cl steps: - uses: actions/checkout@v3 @@ -47,7 +57,12 @@ jobs: - 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 - run: cmake -B ${{ steps.strings.outputs.build-output-dir }} -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCMAKE_C_COMPILER=${{matrix.compiler}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -S ${{github.workspace}} + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -DCMAKE_CXX_COMPILER=${{matrix.cpp_compiler}} + -DCMAKE_C_COMPILER=${{matrix.c_compiler}} + -DCMAKE_BUILD_TYPE=${{matrix.build_type}} + -S ${{github.workspace}} - 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). @@ -57,4 +72,4 @@ jobs: working-directory: ${{ steps.strings.outputs.build-output-dir }} # Execute tests defined by the CMake configuration. Note that -C is needed because the default Windows generator is a multi-config generator (Visual Studio generator). # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest -C ${{matrix.build_type}} + run: ctest --build-config ${{matrix.build_type}} diff --git a/ci/properties/cmake-multi-platform.json b/ci/properties/cmake-multi-platform.json index d26e2c2..ef44fcf 100644 --- a/ci/properties/cmake-multi-platform.json +++ b/ci/properties/cmake-multi-platform.json @@ -1,5 +1,5 @@ { - "name": "CMake based multi-platform projects", + "name": "CMake based, multi-platform projects", "description": "Build and test a CMake based project on multiple platforms.", "iconName": "cmake", "categories": ["Continuous integration", "C", "C++"] diff --git a/ci/properties/cmake-single-platform.json b/ci/properties/cmake-single-platform.json index f843cf9..8c7260e 100644 --- a/ci/properties/cmake-single-platform.json +++ b/ci/properties/cmake-single-platform.json @@ -1,5 +1,5 @@ { - "name": "CMake based single-platform projects", + "name": "CMake based, single-platform projects", "description": "Build and test a CMake based project on a single-platform.", "iconName": "cmake", "categories": ["Continuous integration", "C", "C++"]