Skip to content

Commit

Permalink
Add Debug configurations to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasbuhr committed Jul 13, 2022
1 parent 9c333f9 commit 10bbcdb
Showing 1 changed file with 57 additions and 7 deletions.
64 changes: 57 additions & 7 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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++,
Expand All @@ -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++,
Expand All @@ -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++,
Expand All @@ -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++,
Expand All @@ -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++,
Expand All @@ -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++,
Expand All @@ -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++,
Expand All @@ -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++,
Expand All @@ -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++,
Expand All @@ -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++,
Expand All @@ -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++,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -158,27 +204,31 @@ 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,
}
- {
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,
}
- {
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,
}
- {
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,
Expand Down Expand Up @@ -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 }} \
Expand All @@ -312,11 +362,11 @@ jobs:
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
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 }}

0 comments on commit 10bbcdb

Please sign in to comment.