Skip to content

Commit

Permalink
Create x64-linux-dynamic preset (#14)
Browse files Browse the repository at this point in the history
Closes #13
  • Loading branch information
SchaichAlonso authored Feb 21, 2024
1 parent 46f370c commit 29c80a7
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ jobs:
strategy:
fail-fast: false
matrix:
runner: ['ubuntu-22.04', 'windows-2022']
target: ['ubuntu-22.04', 'ubuntu-22.04-dynamic', 'windows-2022']
build_type: ['debug', 'release']
include:
- target: 'ubuntu-22.04'
runner: 'ubuntu-22.04'
- target: 'ubuntu-22.04-dynamic'
runner: 'ubuntu-22.04'
- target: 'windows-2022'
runner: 'windows-2022'

runs-on: ${{ matrix.runner }}

Expand All @@ -29,13 +36,13 @@ jobs:

- name: Configure
working-directory: ${{github.workspace}}
run: cmake --preset gh-${{matrix.runner}}-${{matrix.build_type}}
run: cmake --preset gh-${{matrix.target}}-${{matrix.build_type}}

- name: Build
working-directory: ${{github.workspace}}
run: cmake --build --preset gh-${{matrix.runner}}-${{matrix.build_type}}
run: cmake --build --preset gh-${{matrix.target}}-${{matrix.build_type}}

- name: Test
working-directory: ${{github.workspace}}
run: ctest --preset gh-${{matrix.runner}}-${{matrix.build_type}}
run: ctest --preset gh-${{matrix.target}}-${{matrix.build_type}}

4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ target_link_libraries(vcpkg-sqlite-demo PUBLIC SQLite::SQLite3 Threads::Threads)
add_test(NAME vcpkg-sqlite-demo COMMAND vcpkg-sqlite-demo COMMAND_EXPAND_LISTS)
set_property(TEST vcpkg-sqlite-demo PROPERTY ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin")
set_property(TEST vcpkg-sqlite-demo APPEND PROPERTY ENVIRONMENT_MODIFICATION "QT_PLUGIN_PATH=set:${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/Qt6/plugins")

if(UNIX)
add_test(NAME ldd COMMAND ldd vcpkg-sqlite-demo COMMAND_EXPAND_LISTS)
endif(UNIX)
40 changes: 40 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@
},
"hidden": true
},
{
"name": "x64-linux-dynamic",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-linux-dynamic"
},
"inherits": [ "x64-linux" ],
"hidden": true
},
{
"name": "x64-windows",
"architecture": "x64",
Expand Down Expand Up @@ -214,6 +222,16 @@
"description": "For github hosted `ubuntu-22.04` runner",
"inherits": [ "ci-base", "make", "x64-linux", "release" ]
},
{
"name": "gh-ubuntu-22.04-dynamic-debug",
"description": "For github hosted `ubuntu-22.04` runner",
"inherits": [ "ci-base", "make", "x64-linux-dynamic", "debug" ]
},
{
"name": "gh-ubuntu-22.04-dynamic-release",
"description": "For github hosted `ubuntu-22.04` runner",
"inherits": [ "ci-base", "make", "x64-linux-dynamic", "release" ]
},
{
"name": "gh-ubuntu-22.04-llvm14-debug",
"description": "For github hosted `ubuntu-22.04` runner",
Expand Down Expand Up @@ -346,6 +364,18 @@
"configuration": "Release",
"inherits": [ "linux" ]
},
{
"name": "gh-ubuntu-22.04-dynamic-debug",
"configurePreset": "gh-ubuntu-22.04-dynamic-debug",
"configuration": "Debug",
"inherits": [ "linux" ]
},
{
"name": "gh-ubuntu-22.04-dynamic-release",
"configurePreset": "gh-ubuntu-22.04-dynamic-release",
"configuration": "Release",
"inherits": [ "linux" ]
},
{
"name": "gh-ubuntu-22.04-llvm14-debug",
"configurePreset": "gh-ubuntu-22.04-llvm14-debug",
Expand Down Expand Up @@ -509,6 +539,16 @@
"configurePreset": "gh-ubuntu-22.04-release",
"inherits": [ "ci", "linux", "release" ]
},
{
"name": "gh-ubuntu-22.04-dynamic-debug",
"configurePreset": "gh-ubuntu-22.04-dynamic-debug",
"inherits": [ "ci", "linux", "debug" ]
},
{
"name": "gh-ubuntu-22.04-dynamic-release",
"configurePreset": "gh-ubuntu-22.04-dynamic-release",
"inherits": [ "ci", "linux", "release" ]
},
{
"name": "gh-ubuntu-22.04-llvm14-debug",
"configurePreset": "gh-ubuntu-22.04-llvm14-debug",
Expand Down

0 comments on commit 29c80a7

Please sign in to comment.