Fix a conan issue in github actions (#1517)

This commit is contained in:
An Tao 2023-02-27 14:30:38 +08:00 committed by GitHub
parent 313392a9b6
commit d321bd4fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 16 deletions

View File

@ -13,7 +13,7 @@ env:
jobs: jobs:
windows: windows:
name: windows/msvc - ${{ matrix.link }} name: windows/msvc - ${{ matrix.link }}
runs-on: windows-latest runs-on: windows-2019
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -33,21 +33,25 @@ jobs:
- name: Install conan packages - name: Install conan packages
working-directory: ./build working-directory: ./build
run: conan install .. -s compiler="Visual Studio" -s compiler.version=16 -sbuild_type=Debug -g cmake_paths run: |
conan profile detect
conan install .. -s compiler="msvc" -sbuild_type=Debug --build=missing -s compiler.cppstd=17
- name: Create Build Environment & Configure Cmake - name: Create Build Environment & Configure Cmake
shell: bash shell: bash
working-directory: ./build working-directory: ./build
run: | run: |
[[ ${{ matrix.link }} == "SHARED" ]] && shared="ON" || shared="OFF" [[ ${{ matrix.link }} == "SHARED" ]] && shared="ON" || shared="OFF"
cmake .. \ cmake .. \
-DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTING=on \ -DBUILD_TESTING=on \
-DBUILD_SHARED_LIBS=$shared \ -DBUILD_SHARED_LIBS=$shared \
-DCMAKE_TOOLCHAIN_FILE="conan_paths.cmake" \ -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" \
-DBUILD_CTL=ON \ -DBUILD_CTL=ON \
-DBUILD_EXAMPLES=ON \ -DBUILD_EXAMPLES=ON \
-DCMAKE_INSTALL_PREFIX=../install -DCMAKE_INSTALL_PREFIX=../install \
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW \
-DCMAKE_CXX_STANDARD=17
- name: Build - name: Build
run: cmake --build build --target install --parallel run: cmake --build build --target install --parallel

View File

@ -2,14 +2,14 @@
jsoncpp/1.9.4 jsoncpp/1.9.4
zlib/1.2.11 zlib/1.2.11
gtest/1.10.0 gtest/1.10.0
sqlite3/3.34.1 sqlite3/3.40.1
#libpq/13.2 #libpq/13.2
openssl/1.1.1j openssl/1.1.1t
hiredis/1.0.0 hiredis/1.0.0
brotli/1.0.9 brotli/1.0.9
[generators] [generators]
cmake_paths CMakeToolchain
[options] [options]

View File

@ -132,8 +132,10 @@ echo "Hello, world!" >>hello.csp
cd ../build cd ../build
if [ $os = "windows" ]; then if [ $os = "windows" ]; then
conan install $src_dir -s compiler="Visual Studio" -s compiler.version=16 -sbuild_type=Debug -g cmake_paths cmake_gen="$cmake_gen -DCMAKE_TOOLCHAIN_FILE=$src_dir/conan_toolchain.cmake \
cmake_gen="$cmake_gen -DCMAKE_TOOLCHAIN_FILE=conan_paths.cmake -DCMAKE_INSTALL_PREFIX=$src_dir/install" -DCMAKE_PREFIX_PATH=$src_dir/install \
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW \
-DCMAKE_CXX_STANDARD=17"
fi fi
cmake .. $cmake_gen cmake .. $cmake_gen

@ -1 +1 @@
Subproject commit 41fa158cae1c015bde3c52bc485c363d54a501b2 Subproject commit b7ae847d5a7adba0e03b3aa232fc91c8f66c3be3