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:
windows:
name: windows/msvc - ${{ matrix.link }}
runs-on: windows-latest
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
@ -33,21 +33,25 @@ jobs:
- name: Install conan packages
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
shell: bash
working-directory: ./build
run: |
[[ ${{ matrix.link }} == "SHARED" ]] && shared="ON" || shared="OFF"
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTING=on \
-DBUILD_SHARED_LIBS=$shared \
-DCMAKE_TOOLCHAIN_FILE="conan_paths.cmake" \
-DBUILD_CTL=ON \
-DBUILD_EXAMPLES=ON \
-DCMAKE_INSTALL_PREFIX=../install
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTING=on \
-DBUILD_SHARED_LIBS=$shared \
-DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" \
-DBUILD_CTL=ON \
-DBUILD_EXAMPLES=ON \
-DCMAKE_INSTALL_PREFIX=../install \
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW \
-DCMAKE_CXX_STANDARD=17
- name: Build
run: cmake --build build --target install --parallel

View File

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

View File

@ -132,8 +132,10 @@ echo "Hello, world!" >>hello.csp
cd ../build
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=conan_paths.cmake -DCMAKE_INSTALL_PREFIX=$src_dir/install"
cmake_gen="$cmake_gen -DCMAKE_TOOLCHAIN_FILE=$src_dir/conan_toolchain.cmake \
-DCMAKE_PREFIX_PATH=$src_dir/install \
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW \
-DCMAKE_CXX_STANDARD=17"
fi
cmake .. $cmake_gen

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