diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index fc44885d..5a5a3996 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -13,7 +13,7 @@ jobs: continue-on-error: true strategy: matrix: - os: [ windows-2022, ubuntu-22.04, macos-13 ] + os: [ windows-2022, ubuntu-22.04, macos-13, windows-2022-debug ] steps: - uses: actions/checkout@v3 diff --git a/CMakePresets.json b/CMakePresets.json index 2feabc53..cb6ebdbb 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -5,124 +5,163 @@ "minor": 14, "patch": 0 }, - "configurePresets": [ - { - "name": "default", - "displayName": "Default configure step", - "description": "Use 'build' dir and Unix makefiles", - "binaryDir": "${sourceDir}/build", - "generator": "Unix Makefiles" - }, - { - "name": "ci-ubuntu-22.04", - "displayName": "CI configure step for Ubuntu", - "description": "Same as default, Used in GitHub actions workflow", - "inherits": "default" - }, - { - "name": "ci-macos-13", - "displayName": "CI configure step for MacOS", - "description": "Same as default, Used in GitHub actions workflow", - "inherits": "default" - }, - { - "name": "ci-windows-2022", - "displayName": "CI configure step for Windows", - "description": "Set architecture to 64-bit (b/c RakNet)", - "inherits": "default", - "generator": "Visual Studio 17 2022", - "architecture": { - "value": "x64" - }, - "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithDebInfo" - } - }, - { - "name": "windows-default", - "inherits": "ci-windows-2022", - "displayName": "Windows only Configure Settings", - "description": "Sets build and install directories", - "generator": "Ninja", - "architecture": { - "value": "x64", - "strategy": "external" - } - } - ], - "buildPresets": [ - { - "name": "default", - "configurePreset": "default", - "displayName": "Default Build", - "description": "Default Build", - "jobs": 2 - }, - { - "name": "ci-windows-2022", - "configurePreset": "ci-windows-2022", - "displayName": "Windows CI Build", - "description": "This preset is used by the CI build on windows", - "configuration": "RelWithDebInfo", - "jobs": 2 - }, - { - "name": "ci-ubuntu-22.04", - "configurePreset": "ci-ubuntu-22.04", - "displayName": "Linux CI Build", - "description": "This preset is used by the CI build on linux", - "jobs": 2 - }, - { - "name": "ci-macos-13", - "configurePreset": "ci-macos-13", - "displayName": "MacOS CI Build", - "description": "This preset is used by the CI build on MacOS", - "jobs": 2 - } - ], - "testPresets": [ - { - "name": "ci-ubuntu-22.04", - "configurePreset": "ci-ubuntu-22.04", - "displayName": "CI Tests on Linux", - "description": "Runs all tests on a linux configuration", - "execution": { - "jobs": 2 - }, - "output": { - "outputOnFailure": true - } - }, - { - "name": "ci-macos-13", - "configurePreset": "ci-macos-13", - "displayName": "CI Tests on MacOS", - "description": "Runs all tests on a Mac configuration", - "execution": { - "jobs": 2 - }, - "output": { - "outputOnFailure": true - } - }, - { - "name": "ci-windows-2022", - "configurePreset": "ci-windows-2022", - "displayName": "CI Tests on windows", - "description": "Runs all tests on a windows configuration", - "configuration": "RelWithDebInfo", - "execution": { - "jobs": 2 - }, - "output": { - "outputOnFailure": true - }, - "filter": { - "exclude": { - "name": "((example)|(minigzip))+" - } + "configurePresets": [ + { + "name": "default", + "displayName": "Default configure step", + "description": "Use 'build' dir and Unix makefiles", + "binaryDir": "${sourceDir}/build", + "generator": "Unix Makefiles" + }, + { + "name": "ci-ubuntu-22.04", + "displayName": "CI configure step for Ubuntu", + "description": "Same as default, Used in GitHub actions workflow", + "inherits": "default" + }, + { + "name": "ci-macos-13", + "displayName": "CI configure step for MacOS", + "description": "Same as default, Used in GitHub actions workflow", + "inherits": "default" + }, + { + "name": "ci-windows-2022", + "displayName": "CI configure step for Windows", + "description": "Set architecture to 64-bit (b/c RakNet)", + "inherits": "default", + "generator": "Visual Studio 17 2022", + "architecture": { + "value": "x64" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo" + } + }, + { + "name": "ci-windows-2022-debug", + "displayName": "CI configure step for Windows", + "description": "Set architecture to 64-bit (b/c RakNet)", + "inherits": "default", + "generator": "Visual Studio 17 2022", + "architecture": { + "value": "x64" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "windows-default", + "inherits": "ci-windows-2022", + "displayName": "Windows only Configure Settings", + "description": "Sets build and install directories", + "generator": "Ninja", + "architecture": { + "value": "x64", + "strategy": "external" + } + } + ], + "buildPresets": [ + { + "name": "default", + "configurePreset": "default", + "displayName": "Default Build", + "description": "Default Build", + "jobs": 2 + }, + { + "name": "ci-windows-2022", + "configurePreset": "ci-windows-2022", + "displayName": "Windows CI Build", + "description": "This preset is used by the CI build on windows", + "configuration": "RelWithDebInfo", + "jobs": 2 + }, + { + "name": "ci-windows-2022-debug", + "configurePreset": "ci-windows-2022-debug", + "displayName": "Windows CI Build", + "description": "This preset is used by the CI build on windows for debug", + "configuration": "Debug", + "jobs": 2 + }, + { + "name": "ci-ubuntu-22.04", + "configurePreset": "ci-ubuntu-22.04", + "displayName": "Linux CI Build", + "description": "This preset is used by the CI build on linux", + "jobs": 2 + }, + { + "name": "ci-macos-13", + "configurePreset": "ci-macos-13", + "displayName": "MacOS CI Build", + "description": "This preset is used by the CI build on MacOS", + "jobs": 2 + } + ], + "testPresets": [ + { + "name": "ci-ubuntu-22.04", + "configurePreset": "ci-ubuntu-22.04", + "displayName": "CI Tests on Linux", + "description": "Runs all tests on a linux configuration", + "execution": { + "jobs": 2 + }, + "output": { + "outputOnFailure": true + } + }, + { + "name": "ci-macos-13", + "configurePreset": "ci-macos-13", + "displayName": "CI Tests on MacOS", + "description": "Runs all tests on a Mac configuration", + "execution": { + "jobs": 2 + }, + "output": { + "outputOnFailure": true + } + }, + { + "name": "ci-windows-2022", + "configurePreset": "ci-windows-2022", + "displayName": "CI Tests on windows", + "description": "Runs all tests on a windows configuration", + "configuration": "RelWithDebInfo", + "execution": { + "jobs": 2 + }, + "output": { + "outputOnFailure": true + }, + "filter": { + "exclude": { + "name": "((example)|(minigzip))+" } - } - ] + } + }, + { + "name": "ci-windows-2022-debug", + "configurePreset": "ci-windows-2022-debug", + "displayName": "CI Tests on windows", + "description": "Runs all tests on a windows configuration for debug", + "configuration": "Debug", + "execution": { + "jobs": 2 + }, + "output": { + "outputOnFailure": true + }, + "filter": { + "exclude": { + "name": "((example)|(minigzip))+" + } + } + } + ] } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e8765191..fb7c8519 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -15,6 +15,9 @@ endif() add_custom_target(conncpp_tests ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +add_custom_target(zlib_tests + ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + # Add the subdirectories add_subdirectory(dCommonTests) add_subdirectory(dGameTests) diff --git a/tests/dCommonTests/CMakeLists.txt b/tests/dCommonTests/CMakeLists.txt index ef7c4cba..a11f51c0 100644 --- a/tests/dCommonTests/CMakeLists.txt +++ b/tests/dCommonTests/CMakeLists.txt @@ -17,7 +17,7 @@ list(APPEND DCOMMONTEST_SOURCES ${DENUMS_TESTS}) # Set our executable add_executable(dCommonTests ${DCOMMONTEST_SOURCES}) -add_dependencies(dCommonTests conncpp_tests) +add_dependencies(dCommonTests conncpp_tests zlib_tests) # Apple needs some special linkage for the mariadb connector for tests. if(APPLE)