Skip to content

Commit

Permalink
CI: Convert to actually supplying CMakePresets
Browse files Browse the repository at this point in the history
  • Loading branch information
MeFisto94 committed Dec 23, 2023
1 parent ba3bced commit b2fe829
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
uses: lukka/run-cmake@v10
with:
cmakeListsTxtPath: '${{ github.workspace }}/server/Native/CMakeLists.txt'
configurePreset: ninja-multi-vcpkg
buildPreset: ninja-multi-vcpkg
buildPresetAdditionalArgs: '[`--config Release`]'
- name: List $RUNNER_WORKSPACE after build
Expand Down
1 change: 1 addition & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ADD protocol /workspace/protocol
# generate and build
RUN vcpkg install --triplet=x64-linux
RUN sed -i 's\../../shared/protocol\protocol\g' /workspace/CMakeLists.txt
# TODO: Use CMakePresets instead.
RUN cmake -DCMAKE_TOOLCHAIN_FILE:STRING=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug \
-H/workspace -B/workspace/build -G Ninja
Expand Down
37 changes: 37 additions & 0 deletions server/Native/CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "ninja-vcpkg",
"displayName": "Ninja Configure Settings",
"description": "Configure with vcpkg toolchain",
"binaryDir": "${sourceDir}/build/${presetName}",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": {
"type": "FILEPATH",
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
}
}
],
"buildPresets": [
{
"name": "ninja-vcpkg",
"configurePreset": "ninja-vcpkg",
"displayName": "Build ninja-vcpkg",
"description": "Build ninja-vcpkg Configurations"
}
],
"testPresets": [
{
"name": "ninja-vcpkg",
"configurePreset": "ninja-vcpkg"
}
]
}

0 comments on commit b2fe829

Please sign in to comment.