chore(CPP) install conan dependencies in CI

This commit is contained in:
Stefan 2022-06-30 13:13:14 +02:00 committed by Stefan Dunca
parent cecfd7f8e8
commit c296fa21bc
5 changed files with 21 additions and 4 deletions

View File

@ -29,7 +29,7 @@ Platform specific conan profile
- Intel: `conan install . --profile=vendor/conan-configs/apple-arm64.ini -s build_type=Release --build=missing -if=build/conan`
- Apple silicon: `conan install . --profile=vendor/conan-configs/apple-x86_64.ini -s build_type=Release --build=missing -if=build/conan`
- Windows: TODO
- Linux: `conan install . -s build_type=Release --build=missing -if=build/conan`
- Linux: `conan install . --profile=./vendor/conan-configs/linux.ini -s build_type=Release --build=missing -if=build/conan`
## Buid, test & run

View File

@ -35,13 +35,17 @@ pipeline {
TARGET = 'linux-cpp'
/* Control output the filename */
STATUS_CLIENT_APPIMAGE = "pkg/${utils.pkgFilename(ext: 'AppImage')}"
CONAN_USER_HOME = "${env.WORKSPACE}/build/conan/conan_home"
CONAN_NON_INTERACTIVE = 1
}
// TODO: Move all stages to the Makefile as targets "*-linux-using-docker"
stages {
stage('CMake Build') {
steps {
sh "qt-cmake ${env.WORKSPACE} -G Ninja -B ${env.WORKSPACE}/build -DCMAKE_BUILD_TYPE=Release"
sh "conan install ${env.WORKSPACE}/ --profile=${env.WORKSPACE}/vendor/conan-configs/linux.ini -s build_type=Release --build=missing -if=${env.WORKSPACE}/build/conan -of=${env.WORKSPACE}/build"
// TODO: switch CMAKE_PREFIX_PATH with "-DCMAKE_TOOLCHAIN_FILE=${env.WORKSPACE}/build/conan/conan_toolchain.cmake" after fixing error "c++: error: unrecognized command line option '-stdlib=libc++'"
sh "qt-cmake ${env.WORKSPACE} -G Ninja -B ${env.WORKSPACE}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${env.WORKSPACE}/build/conan/conan_home/.conan/data/gtest/1.11.0/_/_/package/521ce6d2b56041e08ea425948717819429cfbc29/"
sh "cmake --build ${env.WORKSPACE}/build"
}
}

View File

@ -2,7 +2,9 @@ FROM stateoftheartio/qt6:6.3-gcc-aqt
RUN export DEBIAN_FRONTEND=noninteractive \
&& sudo apt update -yq \
&& sudo apt install -yq libgl-dev libvulkan-dev libxcb*-dev libxkbcommon-x11-dev
&& sudo apt install -yq libgl-dev libvulkan-dev libxcb*-dev libxkbcommon-x11-dev python3-pip gcc-10
RUN sudo pip install conan
# TODO finish installing dependencies then enable building the appimage in CI
# RUN cd /tmp && git clone --single-branch --recursive https://github.com/AppImage/AppImageKit && cd AppImageKit/ && cmake -B ./build -S .

View File

@ -5,7 +5,7 @@ class StatusDesktop(ConanFile):
name = "status-desktop"
settings = "os", "compiler", "build_type", "arch"
requires = "fruit/3.6.0", "gtest/1.11.0"
requires = "gtest/1.11.0" #"fruit/3.6.0",
# cmake_find_package and cmake_find_package_multi should be substituted with CMakeDeps
# as soon as Conan 2.0 is released and all conan-center packages are adapted

11
vendor/conan-configs/linux.ini vendored Normal file
View File

@ -0,0 +1,11 @@
[settings]
compiler=gcc
compiler.version=10
compiler.libcxx=libstdc++
arch=x86_64
os=Linux
build_type=Release
[env]
CC=/usr/bin/gcc-10
CXX=/usr/bin/g++-10