Skip to content

Commit 48792d1

Browse files
bump conan from 1.66 to 2.11
1 parent b98484a commit 48792d1

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

.github/workflows/buildAndTest.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ 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
@@ -27,33 +27,37 @@ jobs:
2727
id: conan
2828
uses: turtlebrowser/get-conan@main
2929
with:
30-
version: 1.66.0
30+
version: 2.11.0
3131

3232
- 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-
33+
run: conan profile detect
34+
3935
- 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}} .
36+
# "&:build_type=..." specifies the consumer packages build type, see https://github.com/conan-io/conan/issues/16852
37+
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
4238

4339
- 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
40+
# Configure CMake in a 'build' subdirectory.
41+
run: cmake --preset conan-default . -DBUILD_SHARED_LIBS=ON
4742

4843
- name: Build
4944
# Build your program with the given configuration
5045
run: cmake --build ${{github.workspace}}/build --config ${{matrix.BUILD_TYPE}}
5146

52-
- name: Test
47+
- name: Test (Win)
48+
working-directory: ${{github.workspace}}/build
49+
# Execute tests defined by the CMake configuration.
50+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
51+
run: .\conanrun.bat && ctest -C ${{matrix.BUILD_TYPE}} --output-on-failure
52+
shell: cmd
53+
if: runner.os == 'Windows'
54+
55+
- name: Test (Linux)
5356
working-directory: ${{github.workspace}}/build
5457
# Execute tests defined by the CMake configuration.
5558
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
56-
run: ctest -C ${{matrix.BUILD_TYPE}} --output-on-failure
59+
run: source conanrun.sh && ctest -C ${{matrix.BUILD_TYPE}} --output-on-failure
60+
if: runner.os == 'Linux'
5761

5862
- name: CPack
5963
if: ${{ github.event_name == 'release' }}
@@ -77,7 +81,7 @@ jobs:
7781
if: ${{ github.event_name == 'release' }}
7882
strategy:
7983
matrix:
80-
artifact_os: [ubuntu-22.04, windows-2019]
84+
artifact_os: [ubuntu-22.04, windows-2022]
8185
artifact_build_type: [RelWithDebInfo, Debug]
8286
runs-on: ubuntu-22.04
8387
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)