Skip to content

Commit 87db3db

Browse files
committed
feat: use conan and ownCloud artifactory
1 parent 8e2ec88 commit 87db3db

File tree

5 files changed

+119
-0
lines changed

5 files changed

+119
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[settings]
2+
arch=armv8
3+
build_type=Release
4+
compiler=apple-clang
5+
compiler.cppstd=17
6+
compiler.libcxx=libc++
7+
compiler.version=15
8+
os=Macos
9+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[settings]
2+
arch=x86_64
3+
build_type=Release
4+
compiler=gcc
5+
compiler.cppstd=gnu17
6+
compiler.libcxx=libstdc++11
7+
compiler.version=13
8+
os=Linux
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[settings]
2+
arch=x86_64
3+
build_type=Release
4+
compiler=msvc
5+
compiler.cppstd=17
6+
compiler.runtime=dynamic
7+
compiler.runtime_type=Debug
8+
compiler.version=194
9+
os=Windows

.github/workflows/conan.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build with conan
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
name: Building ${{ matrix.build_type }} ${{ matrix.profile }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
include:
18+
# Release build type
19+
- os: ubuntu-latest
20+
profile: ubuntu-latest-x86_64
21+
build_type: Release
22+
- os: macos-latest
23+
profile: macos-latest-armv8
24+
build_type: Release
25+
- os: windows-latest
26+
profile: windows-latest-x86_64
27+
build_type: Release
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v3
32+
33+
- name: Install Conan
34+
uses: conan-io/setup-conan@v1
35+
36+
- name: Add artifactory & set conan config
37+
run: |
38+
conan remote remove conancenter
39+
conan remote add oc https://artifactory.owncloud-demo.com/artifactory/api/conan/conan-local
40+
conan remote login oc ${{ secrets.CONAN_USER }} -p ${{ secrets.CONAN_PASSWORD }}
41+
conan remote list
42+
conan profile show
43+
44+
- name: Create build directory
45+
run: mkdir build
46+
47+
- name: Install dependencies with conan
48+
run: |
49+
conan install . --profile=.github/profiles/${{ matrix.profile }}.conanprofile -s build_type=${{ matrix.build_type }}
50+
51+
- name: Build the client
52+
working-directory: ./build
53+
run: |
54+
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
55+
cmake --build .
56+
57+
- name: Run tests
58+
working-directory: ./build
59+
run: ctest --output-on-failure

conanfile.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
from conan import ConanFile
2+
3+
class ClientRecipe(ConanFile):
4+
settings = "os", "compiler", "arch", "build_type"
5+
generators = "CMakeToolchain", "CMakeDeps"
6+
options = {"shared": [True, False]}
7+
default_options = {
8+
"shared": 'True',
9+
"*:fPIC": True,
10+
'qt/*:shared': 'True',
11+
'qt/*:qtdeclarative': 'True',
12+
'qt/*:qtquickcontrols2': 'True',
13+
'qt/*:qtshadertools': 'True',
14+
'qt/*:qttools': 'True',
15+
'qt/*:gui': 'True',
16+
'qt/*:widgets': 'True',
17+
'qt/*:with_dbus': 'True',
18+
}
19+
20+
def requirements(self):
21+
self.requires("extra-cmake-modules/6.2.0")
22+
self.requires("zlib/1.3.1")
23+
self.requires("sqlite3/3.49.1")
24+
self.requires("openssl/3.4.1")
25+
self.requires("nlohmann_json/3.11.3")
26+
self.requires("qt/6.8.3")
27+
self.requires("kdsingleapplication/1.2.0")
28+
self.requires("qtkeychain/0.15.0")
29+
self.requires("libregraphapi/1.0.4")
30+
if self.settings.os == "Macos":
31+
self.requires("sparkle/2.7.0")
32+
33+
def build_requirements(self):
34+
self.tool_requires("cmake/3.30.0")

0 commit comments

Comments
 (0)