From 10bbcdbf2be3ad3aa56febcf4c7662d771460a99 Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Sat, 9 Jul 2022 19:55:49 +0200 Subject: [PATCH] Add Debug configurations to CI --- .github/workflows/cmake.yml | 64 +++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c9042131..e6ddba28 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -2,10 +2,6 @@ name: CMake on: [push, pull_request] -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release - jobs: build: # The CMake configure and build commands are platform agnostic and should work equally @@ -22,30 +18,49 @@ jobs: - { name: "Linux g++ 10.2 C++17", os: ubuntu-20.04, + buildtype: Release, cxx: "g++-10", cxxver: 17, } - { name: "Linux g++ 10.2 C++20", os: ubuntu-20.04, + buildtype: Release, cxx: "g++-10", cxxver: 20, } + - { + name: "Linux g++ 11 C++17 Debug", + os: ubuntu-20.04, + buildtype: Debug, + cxx: "g++-11", + cxxver: 17, + } + - { + name: "Linux g++ 11 C++20 Debug", + os: ubuntu-20.04, + buildtype: Release, + cxx: "g++-11", + cxxver: 20, + } - { name: "Linux g++ 11 C++17", os: ubuntu-20.04, + buildtype: Debug, cxx: "g++-11", cxxver: 17, } - { name: "Linux g++ 11 C++20", os: ubuntu-20.04, + buildtype: Release, cxx: "g++-11", cxxver: 20, } - { name: "Linux clang-10 C++17", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-10", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, @@ -54,6 +69,7 @@ jobs: - { name: "Linux clang-10 C++20", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-10", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, @@ -62,6 +78,7 @@ jobs: - { name: "Linux clang-11 C++17", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-11", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, @@ -70,6 +87,7 @@ jobs: - { name: "Linux clang-11 C++20", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-11", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, @@ -78,6 +96,7 @@ jobs: - { name: "Linux clang-12 C++17", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-12", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, @@ -86,6 +105,7 @@ jobs: - { name: "Linux clang-12 C++20", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-12", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, @@ -94,6 +114,7 @@ jobs: - { name: "Linux clang-13 C++17", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-13", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, @@ -102,6 +123,7 @@ jobs: - { name: "Linux clang-13 C++20", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-13", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, @@ -110,6 +132,7 @@ jobs: - { name: "Linux clang-14 C++17", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-14", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, @@ -118,14 +141,34 @@ jobs: - { name: "Linux clang-14 C++20", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-14", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, cxxver: 20, } + - { + name: "Linux clang-15 C++17 Debug", + os: ubuntu-20.04, + buildtype: Debug, + cxx: "clang++-15", + cxx_flags: -stdlib=libc++, + exe_linker_flags: -lc++, + cxxver: 17, + } + - { + name: "Linux clang-15 C++20 Debug", + os: ubuntu-20.04, + buildtype: Debug, + cxx: "clang++-15", + cxx_flags: -stdlib=libc++, + exe_linker_flags: -lc++, + cxxver: 20, + } - { name: "Linux clang-15 C++17", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-15", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, @@ -134,6 +177,7 @@ jobs: - { name: "Linux clang-15 C++20", os: ubuntu-20.04, + buildtype: Release, cxx: "clang++-15", cxx_flags: -stdlib=libc++, exe_linker_flags: -lc++, @@ -142,6 +186,7 @@ jobs: - { name: "Windows MSVC 2017 (x64) C++17", os: windows-2019, + buildtype: Release, cxx: "cl", environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat", cxxver: 17, @@ -150,6 +195,7 @@ jobs: - { name: "Windows MSVC 2017 (x64) C++20", os: windows-2019, + buildtype: Release, cxx: "cl", environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat", cxxver: 20, @@ -158,6 +204,7 @@ jobs: - { name: "Windows MSVC 2019 (x64) C++17", os: windows-2019, + buildtype: Release, cxx: "cl", environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat", cxxver: 17, @@ -165,6 +212,7 @@ jobs: - { name: "Windows MSVC 2019 (x64) C++20", os: windows-2019, + buildtype: Release, cxx: "cl", environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat", cxxver: 20, @@ -172,6 +220,7 @@ jobs: - { name: "Windows MSVC 2022 (x64) C++17", os: windows-2022, + buildtype: Release, cxx: "cl", environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", cxxver: 17, @@ -179,6 +228,7 @@ jobs: - { name: "Windows MSVC 2022 (x64) C++20", os: windows-2022, + buildtype: Release, cxx: "cl", environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", cxxver: 20, @@ -301,7 +351,7 @@ jobs: [ -n "${{ matrix.config.environment_script }}" ] && "${{ matrix.config.environment_script }}" cmake $GITHUB_WORKSPACE \ - -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ + -DCMAKE_BUILD_TYPE=${{ matrix.config.buildtype }} \ -DCMAKE_CXX_STANDARD=${{ matrix.config.cxxver }} \ -DBUILD_TESTING=ON \ -DCMAKE_CXX_FLAGS=${{ matrix.config.cxx_flags }} \ @@ -312,11 +362,11 @@ jobs: working-directory: ${{runner.workspace}}/build shell: bash # Execute the build. You can specify a specific target with "--target " - run: cmake --build . --config $BUILD_TYPE + run: cmake --build . --config ${{ matrix.config.buildtype }} - name: Test working-directory: ${{runner.workspace}}/build shell: bash # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest --output-on-failure -C $BUILD_TYPE + run: ctest --output-on-failure -C ${{ matrix.config.buildtype }}