Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add debug builds for CI #1641

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ on:

jobs:
build-and-test:
name: Build & Test (${{ matrix.os }})
name: Build & Test (${{ matrix.os }} - ${{ matrix.cfg }})
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
os: [ windows-2022, ubuntu-22.04, macos-13 ]
cfg: [ debug, release ]

steps:
- uses: actions/checkout@v3
Expand All @@ -33,9 +34,9 @@ jobs:
- name: cmake
uses: lukka/run-cmake@v10
with:
configurePreset: "ci-${{matrix.os}}"
buildPreset: "ci-${{matrix.os}}"
testPreset: "ci-${{matrix.os}}"
configurePreset: "ci-${{matrix.os}}-${{matrix.cfg}}"
buildPreset: "ci-${{matrix.os}}-${{matrix.cfg}}"
testPreset: "ci-${{matrix.os}}-${{matrix.cfg}}"
- name: artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
356 changes: 235 additions & 121 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,128 +1,242 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"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
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 14,
"patch": 0
},
"configurePresets": [
{
"name": "default",
"displayName": "Default configure step",
"description": "Use 'build' dir and Unix makefiles",
"binaryDir": "${sourceDir}/build",
"generator": "Unix Makefiles"
},
"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
{
"name": "ci-debug",
"displayName": "CI configure step for Debug",
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "ci-release",
"displayName": "CI configure step for Release",
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "ci-ubuntu-22.04-release",
"displayName": "CI configure step for Ubuntu",
"description": "Same as default, Used in GitHub actions workflow",
"inherits": "ci-release"
},
{
"name": "ci-ubuntu-22.04-debug",
"displayName": "CI configure step for Ubuntu",
"description": "Same as default, Used in GitHub actions workflow",
"inherits": "ci-debug"
},
{
"name": "ci-macos-13-release",
"displayName": "CI configure step for MacOS",
"description": "Same as default, Used in GitHub actions workflow",
"inherits": "ci-release"
},
{
"name": "ci-macos-13-debug",
"displayName": "CI configure step for MacOS",
"description": "Same as default, Used in GitHub actions workflow",
"inherits": "ci-debug"
},
"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": {
{
"name": "ci-windows-2022-release",
"displayName": "CI configure step for Windows",
"description": "Set architecture to 64-bit (b/c RakNet)",
"inherits": "ci-release",
"generator": "Visual Studio 17 2022",
"architecture": {
"value": "x64"
}
},
{
"name": "ci-windows-2022-debug",
"displayName": "CI configure step for Windows",
"description": "Set architecture to 64-bit (b/c RakNet)",
"inherits": "ci-debug",
"generator": "Visual Studio 17 2022",
"architecture": {
"value": "x64"
}
},
{
"name": "windows-default-release",
"inherits": "ci-windows-2022-release",
"displayName": "Windows only Configure Settings (Release)",
"description": "Sets build and install directories",
"generator": "Ninja",
"architecture": {
"value": "x64",
"strategy": "external"
}
},
{
"name": "windows-default-debug",
"inherits": "ci-windows-2022-debug",
"displayName": "Windows only Configure Settings (Debug)",
"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
},
"output": {
"outputOnFailure": true
},
"filter": {
"exclude": {
"name": "((example)|(minigzip))+"
{
"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",
"configuration": "RelWithDebInfo",
"inherits": "default"
},
{
"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))+"
}
}
}
}
]
}
]
}
Loading
Loading