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

Add more ci targets #8

Merged
merged 6 commits into from
Feb 18, 2024
Merged
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
17 changes: 10 additions & 7 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ on:

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
runner: ['ubuntu-22.04', 'windows-2022']
build_type: ['debug', 'release']

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

steps:
- name: Checkout Repository
Expand All @@ -26,13 +29,13 @@ jobs:

- name: Configure
working-directory: ${{github.workspace}}
run: cmake --preset ci-x64-windows-vs2022-release
run: cmake --preset gh-${{matrix.runner}}-${{matrix.build_type}}

- name: Build
working-directory: ${{github.workspace}}
run: cmake --build --preset ci-x64-windows-vs2022-release
run: cmake --build --preset gh-${{matrix.runner}}-${{matrix.build_type}}

- name: Test
working-directory: ${{github.workspace}}
run: ctest --preset ci-x64-windows-vs2022-release
run: ctest --preset gh-${{matrix.runner}}-${{matrix.build_type}}

3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ project(VcpkgSQLiteIntegrationDemo CXX)
enable_testing()

find_package(SQLite3 REQUIRED)
find_package(Threads REQUIRED)

add_executable(vcpkg-sqlite-demo demo.cpp)
target_link_libraries(vcpkg-sqlite-demo PUBLIC SQLite::SQLite3)
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")
Expand Down
109 changes: 89 additions & 20 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,22 +203,47 @@
"hidden": true
},


{
"name": "gh-ubuntu-22.04-debug",
"description": "For github hosted `ubuntu-22.04` runner",
"inherits": [ "ci-base", "make", "x64-linux", "debug" ]
},
{
"name": "gh-ubuntu-22.04-release",
"description": "For github hosted `ubuntu-22.04` runner",
"inherits": [ "ci-base", "make", "x64-linux", "release" ]
},
{
"name": "gh-ubuntu22.04-llvm14-debug",
"name": "gh-ubuntu-22.04-llvm14-debug",
"description": "For github hosted `ubuntu-22.04` runner",
"inherits": [ "ci-base", "make", "x64-linux", "llvm-14", "debug", "coverage" ]
},
{
"name": "gh-ubuntu22.04-llvm14-release",
"name": "gh-ubuntu-22.04-llvm14-release",
"description": "For github hosted `ubuntu-22.04` runner",
"inherits": [ "ci-base", "make", "x64-linux", "llvm-14", "release" ]
},
{
"name": "gh-ubuntu22.04-llvm15-debug",
"name": "gh-ubuntu-22.04-llvm15-debug",
"description": "For github hosted `ubuntu-22.04` runner",
"inherits": [ "ci-base", "make", "x64-linux", "llvm-15", "debug", "coverage" ]
},
{
"name": "gh-ubuntu22.04-llvm15-release",
"name": "gh-ubuntu-22.04-llvm15-release",
"description": "For github hosted `ubuntu-22.04` runner",
"inherits": [ "ci-base", "make", "x64-linux", "llvm-15", "release" ]
},
{
"name": "gh-windows-2022-debug",
"description": "For github hosted `windows-2022` runner",
"inherits": [ "ci-base", "vs2022", "x64-windows", "debug" ]
},
{
"name": "gh-windows-2022-release",
"description": "For github hosted `windows-2022` runner",
"inherits": [ "ci-base", "vs2022", "x64-windows", "release" ]
},
{
"name": "ci-x64-linux-debug",
"inherits": [ "ci-base", "make", "x64-linux", "debug", "coverage" ]
Expand Down Expand Up @@ -310,29 +335,53 @@
"hidden": true
},
{
"name": "gh-ubuntu22.04-llvm14-debug",
"configurePreset": "gh-ubuntu22.04-llvm14-debug",
"name": "gh-ubuntu-22.04-debug",
"configurePreset": "gh-ubuntu-22.04-debug",
"configuration": "Debug",
"inherits": [ "linux" ]
},
{
"name": "gh-ubuntu-22.04-release",
"configurePreset": "gh-ubuntu-22.04-release",
"configuration": "Release",
"inherits": [ "linux" ]
},
{
"name": "gh-ubuntu-22.04-llvm14-debug",
"configurePreset": "gh-ubuntu-22.04-llvm14-debug",
"configuration": "Debug",
"inherits": [ "linux" ]
},
{
"name": "gh-ubuntu22.04-llvm14-release",
"configurePreset": "gh-ubuntu22.04-llvm14-release",
"name": "gh-ubuntu-22.04-llvm14-release",
"configurePreset": "gh-ubuntu-22.04-llvm14-release",
"configuration": "Release",
"inherits": [ "linux" ]
},
{
"name": "gh-ubuntu22.04-llvm15-debug",
"configurePreset": "gh-ubuntu22.04-llvm15-debug",
"name": "gh-ubuntu-22.04-llvm15-debug",
"configurePreset": "gh-ubuntu-22.04-llvm15-debug",
"configuration": "Debug",
"inherits": [ "linux" ]
},
{
"name": "gh-ubuntu22.04-llvm15-release",
"configurePreset": "gh-ubuntu22.04-llvm15-release",
"name": "gh-ubuntu-22.04-llvm15-release",
"configurePreset": "gh-ubuntu-22.04-llvm15-release",
"configuration": "Release",
"inherits": [ "linux" ]
},
{
"name": "gh-windows-2022-debug",
"configurePreset": "gh-windows-2022-debug",
"configuration": "Debug",
"inherits": [ "windows" ]
},
{
"name": "gh-windows-2022-release",
"configurePreset": "gh-windows-2022-release",
"configuration": "Release",
"inherits": [ "windows" ]
},
{
"name": "ci-x64-freebsd-debug",
"configurePreset": "ci-x64-freebsd-debug",
Expand Down Expand Up @@ -451,25 +500,45 @@
"hidden": true
},
{
"name": "gh-ubuntu22.04-llvm14-debug",
"configurePreset": "gh-ubuntu22.04-llvm14-debug",
"name": "gh-ubuntu-22.04-debug",
"configurePreset": "gh-ubuntu-22.04-debug",
"inherits": [ "ci", "linux", "debug" ]
},
{
"name": "gh-ubuntu-22.04-release",
"configurePreset": "gh-ubuntu-22.04-release",
"inherits": [ "ci", "linux", "release" ]
},
{
"name": "gh-ubuntu-22.04-llvm14-debug",
"configurePreset": "gh-ubuntu-22.04-llvm14-debug",
"inherits": [ "ci", "linux", "debug" ]
},
{
"name": "gh-ubuntu22.04-llvm14-release",
"configurePreset": "gh-ubuntu22.04-llvm14-release",
"name": "gh-ubuntu-22.04-llvm14-release",
"configurePreset": "gh-ubuntu-22.04-llvm14-release",
"inherits": [ "ci", "linux", "release" ]
},
{
"name": "gh-ubuntu22.04-llvm15-debug",
"configurePreset": "gh-ubuntu22.04-llvm15-debug",
"name": "gh-ubuntu-22.04-llvm15-debug",
"configurePreset": "gh-ubuntu-22.04-llvm15-debug",
"inherits": [ "ci", "linux", "debug" ]
},
{
"name": "gh-ubuntu22.04-llvm15-release",
"configurePreset": "gh-ubuntu22.04-llvm15-release",
"name": "gh-ubuntu-22.04-llvm15-release",
"configurePreset": "gh-ubuntu-22.04-llvm15-release",
"inherits": [ "ci", "linux", "release" ]
},
{
"name": "gh-windows-2022-debug",
"configurePreset": "gh-windows-2022-debug",
"inherits": [ "ci", "windows", "debug" ]
},
{
"name": "gh-windows-2022-release",
"configurePreset": "gh-windows-2022-release",
"inherits": [ "ci", "windows", "release" ]
},
{
"name": "ci-x64-freebsd-debug",
"configurePreset": "ci-x64-freebsd-debug",
Expand Down
Loading