mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-12 19:28:21 +00:00
Update to have debug and release builds
This commit is contained in:
parent
e0b54645dc
commit
0509aaf855
9
.github/workflows/build-and-test.yml
vendored
9
.github/workflows/build-and-test.yml
vendored
@ -13,7 +13,8 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ windows-2022, ubuntu-22.04, macos-13, windows-2022-debug ]
|
os: [ windows-2022, ubuntu-22.04, macos-13 ]
|
||||||
|
cfg: [ debug, release ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -33,9 +34,9 @@ jobs:
|
|||||||
- name: cmake
|
- name: cmake
|
||||||
uses: lukka/run-cmake@v10
|
uses: lukka/run-cmake@v10
|
||||||
with:
|
with:
|
||||||
configurePreset: "ci-${{matrix.os}}"
|
configurePreset: "ci-${{matrix.os}}-${{matrix.cfg}}"
|
||||||
buildPreset: "ci-${{matrix.os}}"
|
buildPreset: "ci-${{matrix.os}}-${{matrix.cfg}}"
|
||||||
testPreset: "ci-${{matrix.os}}"
|
testPreset: "ci-${{matrix.os}}-${{matrix.cfg}}"
|
||||||
- name: artifacts
|
- name: artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
@ -1,167 +1,242 @@
|
|||||||
{
|
{
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"cmakeMinimumRequired": {
|
"cmakeMinimumRequired": {
|
||||||
"major": 3,
|
"major": 3,
|
||||||
"minor": 14,
|
"minor": 14,
|
||||||
"patch": 0
|
"patch": 0
|
||||||
},
|
|
||||||
"configurePresets": [
|
|
||||||
{
|
|
||||||
"name": "default",
|
|
||||||
"displayName": "Default configure step",
|
|
||||||
"description": "Use 'build' dir and Unix makefiles",
|
|
||||||
"binaryDir": "${sourceDir}/build",
|
|
||||||
"generator": "Unix Makefiles"
|
|
||||||
},
|
},
|
||||||
{
|
"configurePresets": [
|
||||||
"name": "ci-ubuntu-22.04",
|
{
|
||||||
"displayName": "CI configure step for Ubuntu",
|
"name": "default",
|
||||||
"description": "Same as default, Used in GitHub actions workflow",
|
"displayName": "Default configure step",
|
||||||
"inherits": "default"
|
"description": "Use 'build' dir and Unix makefiles",
|
||||||
},
|
"binaryDir": "${sourceDir}/build",
|
||||||
{
|
"generator": "Unix Makefiles"
|
||||||
"name": "ci-macos-13",
|
},
|
||||||
"displayName": "CI configure step for MacOS",
|
{
|
||||||
"description": "Same as default, Used in GitHub actions workflow",
|
"name": "ci-debug",
|
||||||
"inherits": "default"
|
"displayName": "CI configure step for Debug",
|
||||||
},
|
"inherits": "default",
|
||||||
{
|
"cacheVariables": {
|
||||||
"name": "ci-windows-2022",
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
"displayName": "CI configure step for Windows",
|
}
|
||||||
"description": "Set architecture to 64-bit (b/c RakNet)",
|
},
|
||||||
"inherits": "default",
|
{
|
||||||
"generator": "Visual Studio 17 2022",
|
"name": "ci-release",
|
||||||
"architecture": {
|
"displayName": "CI configure step for Release",
|
||||||
"value": "x64"
|
"inherits": "default",
|
||||||
},
|
"cacheVariables": {
|
||||||
"cacheVariables": {
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
}
|
||||||
}
|
},
|
||||||
},
|
{
|
||||||
{
|
"name": "ci-ubuntu-22.04-release",
|
||||||
"name": "ci-windows-2022-debug",
|
"displayName": "CI configure step for Ubuntu",
|
||||||
"displayName": "CI configure step for Windows",
|
"description": "Same as default, Used in GitHub actions workflow",
|
||||||
"description": "Set architecture to 64-bit (b/c RakNet)",
|
"inherits": "ci-release"
|
||||||
"inherits": "default",
|
},
|
||||||
"generator": "Visual Studio 17 2022",
|
{
|
||||||
"architecture": {
|
"name": "ci-ubuntu-22.04-debug",
|
||||||
"value": "x64"
|
"displayName": "CI configure step for Ubuntu",
|
||||||
},
|
"description": "Same as default, Used in GitHub actions workflow",
|
||||||
"cacheVariables": {
|
"inherits": "ci-debug"
|
||||||
"CMAKE_BUILD_TYPE": "Debug"
|
},
|
||||||
}
|
{
|
||||||
},
|
"name": "ci-macos-13-release",
|
||||||
{
|
"displayName": "CI configure step for MacOS",
|
||||||
"name": "windows-default",
|
"description": "Same as default, Used in GitHub actions workflow",
|
||||||
"inherits": "ci-windows-2022",
|
"inherits": "ci-release"
|
||||||
"displayName": "Windows only Configure Settings",
|
},
|
||||||
"description": "Sets build and install directories",
|
{
|
||||||
"generator": "Ninja",
|
"name": "ci-macos-13-debug",
|
||||||
"architecture": {
|
"displayName": "CI configure step for MacOS",
|
||||||
"value": "x64",
|
"description": "Same as default, Used in GitHub actions workflow",
|
||||||
"strategy": "external"
|
"inherits": "ci-debug"
|
||||||
}
|
},
|
||||||
}
|
{
|
||||||
],
|
"name": "ci-windows-2022-release",
|
||||||
"buildPresets": [
|
"displayName": "CI configure step for Windows",
|
||||||
{
|
"description": "Set architecture to 64-bit (b/c RakNet)",
|
||||||
"name": "default",
|
"inherits": "ci-release",
|
||||||
"configurePreset": "default",
|
"generator": "Visual Studio 17 2022",
|
||||||
"displayName": "Default Build",
|
"architecture": {
|
||||||
"description": "Default Build",
|
"value": "x64"
|
||||||
"jobs": 2
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ci-windows-2022",
|
"name": "ci-windows-2022-debug",
|
||||||
"configurePreset": "ci-windows-2022",
|
"displayName": "CI configure step for Windows",
|
||||||
"displayName": "Windows CI Build",
|
"description": "Set architecture to 64-bit (b/c RakNet)",
|
||||||
"description": "This preset is used by the CI build on windows",
|
"inherits": "ci-debug",
|
||||||
"configuration": "RelWithDebInfo",
|
"generator": "Visual Studio 17 2022",
|
||||||
"jobs": 2
|
"architecture": {
|
||||||
},
|
"value": "x64"
|
||||||
{
|
}
|
||||||
"name": "ci-windows-2022-debug",
|
},
|
||||||
"configurePreset": "ci-windows-2022-debug",
|
{
|
||||||
"displayName": "Windows CI Build",
|
"name": "windows-default-release",
|
||||||
"description": "This preset is used by the CI build on windows for debug",
|
"inherits": "ci-windows-2022-release",
|
||||||
"configuration": "Debug",
|
"displayName": "Windows only Configure Settings (Release)",
|
||||||
"jobs": 2
|
"description": "Sets build and install directories",
|
||||||
},
|
"generator": "Ninja",
|
||||||
{
|
"architecture": {
|
||||||
"name": "ci-ubuntu-22.04",
|
"value": "x64",
|
||||||
"configurePreset": "ci-ubuntu-22.04",
|
"strategy": "external"
|
||||||
"displayName": "Linux CI Build",
|
}
|
||||||
"description": "This preset is used by the CI build on linux",
|
},
|
||||||
"jobs": 2
|
{
|
||||||
},
|
"name": "windows-default-debug",
|
||||||
{
|
"inherits": "ci-windows-2022-debug",
|
||||||
"name": "ci-macos-13",
|
"displayName": "Windows only Configure Settings (Debug)",
|
||||||
"configurePreset": "ci-macos-13",
|
"description": "Sets build and install directories",
|
||||||
"displayName": "MacOS CI Build",
|
"generator": "Ninja",
|
||||||
"description": "This preset is used by the CI build on MacOS",
|
"architecture": {
|
||||||
"jobs": 2
|
"value": "x64",
|
||||||
}
|
"strategy": "external"
|
||||||
],
|
}
|
||||||
"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))+"
|
|
||||||
}
|
}
|
||||||
}
|
],
|
||||||
},
|
"buildPresets": [
|
||||||
{
|
{
|
||||||
"name": "ci-windows-2022-debug",
|
"name": "default",
|
||||||
"configurePreset": "ci-windows-2022-debug",
|
"configurePreset": "default",
|
||||||
"displayName": "CI Tests on windows",
|
"displayName": "Default Build",
|
||||||
"description": "Runs all tests on a windows configuration for debug",
|
"description": "Default Build",
|
||||||
"configuration": "Debug",
|
"jobs": 2
|
||||||
"execution": {
|
},
|
||||||
"jobs": 2
|
{
|
||||||
},
|
"name": "ci-windows-2022-debug",
|
||||||
"output": {
|
"configurePreset": "ci-windows-2022-debug",
|
||||||
"outputOnFailure": true
|
"displayName": "Windows CI Build",
|
||||||
},
|
"description": "This preset is used by the CI build on windows",
|
||||||
"filter": {
|
"configuration": "RelWithDebInfo",
|
||||||
"exclude": {
|
"inherits": "default"
|
||||||
"name": "((example)|(minigzip))+"
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-windows-2022-release",
|
||||||
|
"configurePreset": "ci-windows-2022-release",
|
||||||
|
"displayName": "Windows CI Build",
|
||||||
|
"description": "This preset is used by the CI build on windows",
|
||||||
|
"configuration": "RelWithDebInfo",
|
||||||
|
"inherits": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-ubuntu-22.04-debug",
|
||||||
|
"configurePreset": "ci-ubuntu-22.04-debug",
|
||||||
|
"displayName": "Linux CI Build",
|
||||||
|
"description": "This preset is used by the CI build on linux",
|
||||||
|
"inherits": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-ubuntu-22.04-release",
|
||||||
|
"configurePreset": "ci-ubuntu-22.04-release",
|
||||||
|
"displayName": "Linux CI Build",
|
||||||
|
"description": "This preset is used by the CI build on linux",
|
||||||
|
"inherits": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-macos-13-debug",
|
||||||
|
"configurePreset": "ci-macos-13-debug",
|
||||||
|
"displayName": "MacOS CI Build",
|
||||||
|
"description": "This preset is used by the CI build on MacOS",
|
||||||
|
"inherits": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-macos-13-release",
|
||||||
|
"configurePreset": "ci-macos-13-release",
|
||||||
|
"displayName": "MacOS CI Build",
|
||||||
|
"description": "This preset is used by the CI build on MacOS",
|
||||||
|
"inherits": "default"
|
||||||
}
|
}
|
||||||
}
|
],
|
||||||
}
|
"testPresets": [
|
||||||
]
|
{
|
||||||
}
|
"name": "ci-ubuntu-22.04-debug",
|
||||||
|
"configurePreset": "ci-ubuntu-22.04-debug",
|
||||||
|
"displayName": "CI Tests on Linux",
|
||||||
|
"description": "Runs all tests on a linux configuration",
|
||||||
|
"configuration": "Debug",
|
||||||
|
"execution": {
|
||||||
|
"jobs": 2
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"outputOnFailure": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-ubuntu-22.04-release",
|
||||||
|
"configurePreset": "ci-ubuntu-22.04-release",
|
||||||
|
"displayName": "CI Tests on Linux",
|
||||||
|
"description": "Runs all tests on a linux configuration",
|
||||||
|
"configuration": "RelWithDebInfo",
|
||||||
|
"execution": {
|
||||||
|
"jobs": 2
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"outputOnFailure": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-macos-13-debug",
|
||||||
|
"configurePreset": "ci-macos-13-debug",
|
||||||
|
"displayName": "CI Tests on MacOS",
|
||||||
|
"description": "Runs all tests on a Mac configuration",
|
||||||
|
"configuration": "Debug",
|
||||||
|
"execution": {
|
||||||
|
"jobs": 2
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"outputOnFailure": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-macos-13-release",
|
||||||
|
"configurePreset": "ci-macos-13-release",
|
||||||
|
"displayName": "CI Tests on MacOS",
|
||||||
|
"description": "Runs all tests on a Mac configuration",
|
||||||
|
"configuration": "RelWithDebInfo",
|
||||||
|
"execution": {
|
||||||
|
"jobs": 2
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"outputOnFailure": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-windows-2022-release",
|
||||||
|
"configurePreset": "ci-windows-2022-release",
|
||||||
|
"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))+"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
@ -15,8 +15,10 @@ endif()
|
|||||||
add_custom_target(conncpp_tests
|
add_custom_target(conncpp_tests
|
||||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
|
|
||||||
add_custom_target(zlib_tests
|
if(MSVC)
|
||||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:zlib> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
add_custom_target(zlib_tests
|
||||||
|
${CMAKE_COMMAND} -E copy $<TARGET_FILE:ZLIB::ZLIB> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
|
endif()
|
||||||
|
|
||||||
# Add the subdirectories
|
# Add the subdirectories
|
||||||
add_subdirectory(dCommonTests)
|
add_subdirectory(dCommonTests)
|
||||||
|
@ -17,8 +17,10 @@ list(APPEND DCOMMONTEST_SOURCES ${DENUMS_TESTS})
|
|||||||
|
|
||||||
# Set our executable
|
# Set our executable
|
||||||
add_executable(dCommonTests ${DCOMMONTEST_SOURCES})
|
add_executable(dCommonTests ${DCOMMONTEST_SOURCES})
|
||||||
add_dependencies(dCommonTests conncpp_tests zlib_tests)
|
add_dependencies(dCommonTests conncpp_tests)
|
||||||
|
if(MSVC)
|
||||||
|
add_dependencies(dCommonTests zlib_tests)
|
||||||
|
endif()
|
||||||
# Apple needs some special linkage for the mariadb connector for tests.
|
# Apple needs some special linkage for the mariadb connector for tests.
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
add_custom_command(TARGET dCommonTests POST_BUILD
|
add_custom_command(TARGET dCommonTests POST_BUILD
|
||||||
|
Loading…
Reference in New Issue
Block a user