Skip to content

Commit

Permalink
Use only Ninja generator on CI with Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausKlein committed Dec 1, 2024
1 parent 62951db commit 3d0fdf5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
# edit the "<name>" placeholder to your GitHub name.
# If you do not wish to use codecov, then simply delete this job from the
# workflow.
if: github.repository_owner == 'ClausKlein'
if: github.repository_owner == '<name>'

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
# simply delete this job similarly to the coverage one.
if: github.ref == 'refs/heads/master'
&& github.event_name == 'push'
&& github.repository_owner == 'ClausKlein'
&& github.repository_owner == '<name>'

steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 1 addition & 4 deletions asio/.CMakeUserPresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
"generator": "Ninja",
"inherits": [
"dev-mode"
],
"cacheVariables": {
"BUILD_MCSS_DOCS": "ON"
}
]
},
{
"name": "dev-Linux",
Expand Down
2 changes: 1 addition & 1 deletion asio/.cmakefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cmake/windows-set-path.cmake
module/asio.cppm
module/tests/main.hpp
module/tests/main.cpp
src/examples/CMakeLists.txt
module/tests/CMakeLists.txt
src/tests/CMakeLists.txt
'

Expand Down
16 changes: 9 additions & 7 deletions asio/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
"Note that all the flags after /W4 are required for MSVC to conform to the language standard",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CXX_COMPILER": "cl",
"CMAKE_CXX_FLAGS":
"/sdl /guard:cf /utf-8 /diagnostics:caret /w14165 /w44242 /w44254 /w44263 /w34265 /w34287 /w44296 /w44365 /w44388 /w44464 /w14545 /w14546 /w14547 /w14549 /w14555 /w34619 /w34640 /w24826 /w14905 /w14906 /w14928 /w45038 /W4 /permissive- /volatile:iso /Zc:inline /Zc:preprocessor /Zc:enumTypes /Zc:lambda /Zc:__cplusplus /Zc:externConstexpr /Zc:throwingNew /EHsc",
"CMAKE_EXE_LINKER_FLAGS": "/machine:x64 /guard:cf"
Expand All @@ -102,26 +104,26 @@
},
{
"name": "gen-Linux",
"generator": "Unix Makefiles",
"generator": "Ninja",
"hidden": true,
"inherits": [
"flags-Linux",
"ci-std"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "gen-Darwin",
"generator": "Unix Makefiles",
"generator": "Ninja",
"hidden": true,
"inherits": [
"flags-Darwin",
"ci-std"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
Expand All @@ -130,7 +132,7 @@
"flags-Windows",
"ci-std"
],
"generator": "Visual Studio 17 2022",
"generator": "Ninja",
"architecture": "x64",
"hidden": true
},
Expand All @@ -142,7 +144,7 @@
"cacheVariables": {
"ASIO_ENABLE_COVERAGE": "ON",
"CMAKE_BUILD_TYPE": "Coverage",
"CMAKE_CONFIGURATION_TYPES": "Coverage;Release;Debug",
"CMAKE_CONFIGURATION_TYPES": "Coverage",
"CMAKE_CXX_FLAGS_COVERAGE":
"-Og -g --coverage -fkeep-inline-functions -fkeep-static-functions",
"CMAKE_EXE_LINKER_FLAGS_COVERAGE": "--coverage",
Expand All @@ -169,7 +171,7 @@
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Sanitize",
"CMAKE_CONFIGURATION_TYPES": "Sanitize;Release;Debug",
"CMAKE_CONFIGURATION_TYPES": "Sanitize",
"CMAKE_CXX_FLAGS_SANITIZE":
"-O2 -g -fsanitize=address,undefined -fno-omit-frame-pointer -fno-common"
}
Expand Down
4 changes: 2 additions & 2 deletions asio/module/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ endif()
# list(APPEND ALL_EXAMPLES module/tests/main.cpp)
set(ALL_EXAMPLES main)

message(STATUS "Examples to be built: ${ALL_EXAMPLES}")
message(STATUS "Module tests to be built: ${ALL_EXAMPLES}")

foreach(example ${ALL_EXAMPLES})
add_executable(${example})
Expand All @@ -49,5 +49,5 @@ foreach(example ${ALL_EXAMPLES})
else()
target_link_libraries(${example} asio::asio_header)
endif()
add_test(NAME ${example} COMMAND echo Test | ${example})
add_test(NAME module_test_${example} COMMAND echo Test | ${example})
endforeach()

0 comments on commit 3d0fdf5

Please sign in to comment.