Skip to content

Commit 29a5e6b

Browse files
bump conan from 1.66 to 2.11
1 parent b98484a commit 29a5e6b

File tree

2 files changed

+35
-22
lines changed

2 files changed

+35
-22
lines changed

.github/workflows/buildAndTest.yml

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,24 @@ jobs:
1111
build:
1212
strategy:
1313
matrix:
14-
os: [ubuntu-22.04, windows-2019]
14+
os: [ubuntu-22.04, windows-2022]
1515
BUILD_TYPE: [RelWithDebInfo, Debug]
1616
include:
1717
- CONAN_BUILD_TYPE: Debug
1818
BUILD_TYPE: Debug
1919
- CONAN_BUILD_TYPE: Release
2020
BUILD_TYPE: RelWithDebInfo
21+
# preset names are handled differently by conan as on windows it uses a multi-config generator, on linux a single config generator
22+
# See https://docs.conan.io/2/examples/tools/cmake/cmake_toolchain/build_project_cmake_presets.html#building-the-project-using-cmakepresets
23+
- BUILD_TYPE: RelWithDebInfo
24+
os: ubuntu-22.04
25+
presetName: conan-relwithdebinfo
26+
- BUILD_TYPE: Debug
27+
os: ubuntu-22.04
28+
presetName: conan-debug
29+
- os: windows-2022
30+
presetName: conan-default
31+
2132

2233
runs-on: ${{matrix.os}}
2334
steps:
@@ -27,33 +38,37 @@ jobs:
2738
id: conan
2839
uses: turtlebrowser/get-conan@main
2940
with:
30-
version: 1.66.0
41+
version: 2.12.0
3142

3243
- name: Detect Conan Profile
33-
run: conan profile new default --detect
34-
35-
- name: Fix libcxx setting
36-
run: conan profile update settings.compiler.libcxx=libstdc++11 default
37-
if: matrix.os == 'ubuntu-22.04'
38-
44+
run: conan profile detect
45+
3946
- name: Install Dependencies
40-
run: conan install --install-folder ${{github.workspace}}/build -s build_type=${{matrix.CONAN_BUILD_TYPE}} -o sqlite3:shared=True .
41-
#run: conan install --install-folder ${{github.workspace}}/build -s build_type=${{matrix.CONAN_BUILD_TYPE}} .
47+
# "&:build_type=..." specifies the consumer packages build type, see https://github.com/conan-io/conan/issues/16852
48+
run: conan install . --output-folder ${{github.workspace}}/build -s build_type=${{matrix.CONAN_BUILD_TYPE}} -s "&:build_type=${{matrix.BUILD_TYPE}}" -o "sqlite3/*:shared=True" --build=missing
4249

4350
- name: Configure CMake
44-
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
45-
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
46-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DBUILD_SHARED_LIBS=True
51+
# Configure CMake in a 'build' subdirectory.
52+
run: cmake --preset ${{matrix.presetName}} . -DBUILD_SHARED_LIBS=ON
4753

4854
- name: Build
4955
# Build your program with the given configuration
5056
run: cmake --build ${{github.workspace}}/build --config ${{matrix.BUILD_TYPE}}
5157

52-
- name: Test
58+
- name: Test (Win)
59+
working-directory: ${{github.workspace}}/build
60+
# Execute tests defined by the CMake configuration.
61+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
62+
run: .\conanrun.bat && ctest -C ${{matrix.BUILD_TYPE}} --output-on-failure
63+
shell: cmd
64+
if: runner.os == 'Windows'
65+
66+
- name: Test (Linux)
5367
working-directory: ${{github.workspace}}/build
5468
# Execute tests defined by the CMake configuration.
5569
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
56-
run: ctest -C ${{matrix.BUILD_TYPE}} --output-on-failure
70+
run: source conanrun.sh && ctest -C ${{matrix.BUILD_TYPE}} --output-on-failure
71+
if: runner.os == 'Linux'
5772

5873
- name: CPack
5974
if: ${{ github.event_name == 'release' }}
@@ -77,7 +92,7 @@ jobs:
7792
if: ${{ github.event_name == 'release' }}
7893
strategy:
7994
matrix:
80-
artifact_os: [ubuntu-22.04, windows-2019]
95+
artifact_os: [ubuntu-22.04, windows-2022]
8196
artifact_build_type: [RelWithDebInfo, Debug]
8297
runs-on: ubuntu-22.04
8398
steps:

conanfile.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
[requires]
2-
sqlite3/3.47.0
2+
sqlite3/3.48.0
33
gtest/1.15.0
4-
fmt/11.0.0
4+
fmt/11.1.1
55
[generators]
6-
cmake_find_package
7-
8-
[imports]
9-
bin, *.dll -> . # Copies all dll files from packages bin folder to build folder
6+
CMakeDeps
7+
CMakeToolchain

0 commit comments

Comments
 (0)