From 29c80a73aa49cd0fddac616a33134b028feeb9dd Mon Sep 17 00:00:00 2001 From: Alonso Schaich Date: Wed, 21 Feb 2024 16:32:36 +0000 Subject: [PATCH] Create x64-linux-dynamic preset (#14) Closes #13 --- .github/workflows/cmake.yml | 15 ++++++++++---- CMakeLists.txt | 4 ++++ CMakePresets.json | 40 +++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index bfbbe7c..bfea851 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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 }} @@ -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}} diff --git a/CMakeLists.txt b/CMakeLists.txt index 7709dfe..79589cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}$<$:/debug>/bin") set_property(TEST vcpkg-sqlite-demo APPEND PROPERTY ENVIRONMENT_MODIFICATION "QT_PLUGIN_PATH=set:${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/Qt6/plugins") + +if(UNIX) + add_test(NAME ldd COMMAND ldd vcpkg-sqlite-demo COMMAND_EXPAND_LISTS) +endif(UNIX) diff --git a/CMakePresets.json b/CMakePresets.json index d66150f..da4abec 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -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", @@ -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", @@ -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", @@ -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",