Skip to content

Commit

Permalink
Add github actions ci, update hostProfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Tereius committed Dec 19, 2024
1 parent 1085bbd commit e055f9a
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 38 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Create Conan Package"
on: push

jobs:
build_linux:
name: "Linux"
uses: Privatehive/conan-workflows/.github/workflows/createPackage.yml@master
with:
image: "ghcr.io/privatehive/conan-ubuntu:latest"
machine_type: c2d-standard-8
conan_remotes: https://conan.privatehive.de/artifactory/api/conan/public-conan
conan_options: "libONVIF/*openssl:=True"

build_windows:
name: "Windows"
uses: Privatehive/conan-workflows/.github/workflows/createPackage.yml@master
with:
image: "ghcr.io/privatehive/conan-wine:latest"
machine_type: c2d-standard-8
conan_host_profile: "windowsMinGW"
conan_remotes: https://conan.privatehive.de/artifactory/api/conan/public-conan
conan_options: "libONVIF/*openssl:=False"

build_android:
name: "Android"
uses: Privatehive/conan-workflows/.github/workflows/createPackage.yml@master
with:
image: "ghcr.io/privatehive/conan-ubuntu:latest"
machine_type: c2d-standard-8
conan_host_profile: "androidArmv8"
conan_remotes: https://conan.privatehive.de/artifactory/api/conan/public-conan
conan_options: "libONVIF/*openssl:=True"

upload_recipe:
name: "Finalize"
uses: Privatehive/conan-workflows/.github/workflows/uploadRecipe.yml@master
needs: [ build_linux, build_windows, build_android ]
if: ${{ success() }}
secrets: inherit
with:
publish_property: ${{ github.ref == 'refs/heads/master' }}
conan_upload_remote: https://conan.privatehive.de/artifactory/api/conan/public-conan
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CMakeUserPresets.json
build-*
.idea
# Created by https://www.toptal.com/developers/gitignore/api/vscode,clion,conan,qt
# Edit at https://www.toptal.com/developers/gitignore?templates=vscode,clion,conan,qt

Expand Down
2 changes: 1 addition & 1 deletion INSTALL_CH
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

本项目使用 CMake(参见 www.cmake.org)。请确保 cmake 已正确安装。

您可能需要使用 conan.io (https://conan.io/) 来构建依赖项(OpenSSL、Qt5)。这一步是可选的:你可以自己通过 conan(建议在 Windows 环境下使用)或使用软件包管理器(如 apt 或 yum)构建依赖项。
您可能需要使用 conan.io (https://conan.io/) 来构建依赖项(OpenSSL、Qt)。这一步是可选的:你可以自己通过 conan(建议在 Windows 环境下使用)或使用软件包管理器(如 apt 或 yum)构建依赖项。
要自行构建依赖项,必须先添加一个 conan 软件源:

conan remote add tereius https://conan.privatehive.de/artifactory/api/conan/public-conan
Expand Down
2 changes: 1 addition & 1 deletion INSTALL_EN
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ How to build and install libONVIF binaries

This projects uses CMake (see www.cmake.org). Make sure that cmake is properly installed.

You may want to use conan.io (https://conan.io/) to build the dependencies (OpenSSL, Qt5). This step is optional: You can build the dependencies via conan yourself (recommended for Windows) or obtain them using a package manager (like apt or yum).
You may want to use conan.io (https://conan.io/) to build the dependencies (OpenSSL, Qt). This step is optional: You can build the dependencies via conan yourself (recommended for Windows) or obtain them using a package manager (like apt or yum).
To build the dependencies yourself you have to add one conan repositories first:

conan remote add tereius https://conan.privatehive.de/artifactory/api/conan/public-conan
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
# libONVIF

[![Conan Remote Recipe](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.github.com%2Frepos%2FPrivatehive%2FlibONVIF%2Fproperties%2Fvalues&query=%24%5B0%5D.value&style=flat&logo=conan&label=conan&color=%232980b9)](https://conan.privatehive.de/ui/repos/tree/General/public-conan/de.privatehive/libonvif)

### Yet another ONVIF library

---

| os | arch | CI Status |
|-----------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Linux` | `x86_64` | [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Privatehive/libONVIF/main.yml?branch=master&style=flat&logo=github&label=create+package)](https://github.com/Privatehive/libONVIF/actions?query=branch%3Amaster) |
| `Windows` | `x86_64` | [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Privatehive/libONVIF/main.yml?branch=master&style=flat&logo=github&label=create+package)](https://github.com/Privatehive/libONVIF/actions?query=branch%3Amaster) |
| `Android` | `armv8` | [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Privatehive/libONVIF/main.yml?branch=master&style=flat&logo=github&label=create+package)](https://github.com/Privatehive/libONVIF/actions?query=branch%3Amaster) |

What does ONVIF stand for:

> ONVIF (Open Network Video Interface Forum) is a global and open industry forum with the goal of facilitating the development and use of a global open standard for the interface of physical IP-based security products – or, in other words, to create a standard for how IP products within video surveillance and other physical security areas can communicate with each other. [Wikipedia](https://en.wikipedia.org/wiki/ONVIF)
> ONVIF (Open Network Video Interface Forum) is a global and open industry forum with the goal of facilitating the
> development and use of a global open standard for the interface of physical IP-based security products – or, in other
> words, to create a standard for how IP products within video surveillance and other physical security areas can
> communicate with each other. [Wikipedia](https://en.wikipedia.org/wiki/ONVIF)
The idea behind this library is to hide some complexity of gsoap and to provide 'high level' classes including QT5
The idea behind this library is to hide some complexity of gsoap and to provide 'high level' classes including QT
goodness. Currently there are eleven client side service methods implemented:

- ONVIF analytics http://www.onvif.org/ver20/analytics/wsdl
Expand Down
6 changes: 4 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

required_conan_version = ">=2.0"


class LibonvifConan(ConanFile):
jsonInfo = json.load(open("info.json", 'r'))
# ---Package reference---
Expand All @@ -26,7 +27,7 @@ class LibonvifConan(ConanFile):
url = jsonInfo["repository"]
# ---Requirements---
requires = ["qt/[>=6.5.0]@%s/stable" % user]
tool_requires = ["cmake/3.21.7", "ninja/1.11.1", "qtappbase/[~1]@%s/snapshot" % user]
tool_requires = ["cmake/[>=3.23.5]", "ninja/[>=1.11.1]", "qtappbase/1.1.0@%s/stable" % user]
# ---Sources---
exports = ["info.json", "LICENSE"]
exports_sources = ["info.json", "src/*", "doc/*", "CMake/*", "CMakeLists.txt"]
Expand All @@ -44,7 +45,7 @@ class LibonvifConan(ConanFile):

def requirements(self):
if self.options.openssl:
self.requires("openssl/3.2.0@%s/stable" % self.user)
self.requires("openssl/3.3.2")

def configure(self):
if self.options.openssl:
Expand All @@ -67,6 +68,7 @@ def package(self):
cmake.install()

def package_info(self):
self.cpp_info.set_property("cmake_find_mode", "none")
self.cpp_info.builddirs = ['cmake']
self.cpp_info.defines = ['WITH_SELF_PIPE', 'WITH_DOM']
if self.options.openssl:
Expand Down
11 changes: 6 additions & 5 deletions hostProfiles/androidArmv7.profile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[settings]
os=Android
os.api_level=26
os.api_level=28
arch=armv7
compiler=clang
compiler.version=14
compiler.version=17
compiler.libcxx=c++_shared
build_type=Release
[options]
qt/*:opengl=es2
[tool_requires]
android-ndk/r25b@com.github.tereius/stable
android-sdk/latest@com.github.tereius/stable
openjdk/19.0.2@com.github.tereius/stable
android-ndk/r26b@de.privatehive/stable
android-sdk/latest@de.privatehive/stable
openjdk/19.0.2@de.privatehive/stable
11 changes: 6 additions & 5 deletions hostProfiles/androidArmv8.profile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[settings]
os=Android
os.api_level=26
os.api_level=28
arch=armv8
compiler=clang
compiler.version=14
compiler.version=17
compiler.libcxx=c++_shared
build_type=Release
[options]
qt/*:opengl=es2
[tool_requires]
android-ndk/r25b@com.github.tereius/stable
android-sdk/latest@com.github.tereius/stable
openjdk/19.0.2@com.github.tereius/stable
android-ndk/r26b@de.privatehive/stable
android-sdk/latest@de.privatehive/stable
openjdk/19.0.2@de.privatehive/stable
11 changes: 6 additions & 5 deletions hostProfiles/androidx86.profile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[settings]
os=Android
os.api_level=26
os.api_level=28
arch=x86
compiler=clang
compiler.version=14
compiler.version=17
compiler.libcxx=c++_shared
build_type=Release
[options]
qt/*:opengl=es2
[tool_requires]
android-ndk/r25b@com.github.tereius/stable
android-sdk/latest@com.github.tereius/stable
openjdk/19.0.2@com.github.tereius/stable
android-ndk/r26b@de.privatehive/stable
android-sdk/latest@de.privatehive/stable
openjdk/19.0.2@de.privatehive/stable
11 changes: 6 additions & 5 deletions hostProfiles/androidx86_64.profile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[settings]
os=Android
os.api_level=26
os.api_level=28
arch=x86_64
compiler=clang
compiler.version=14
compiler.version=17
compiler.libcxx=c++_shared
build_type=Release
[options]
qt/*:opengl=es2
[tool_requires]
android-ndk/r25b@com.github.tereius/stable
android-sdk/latest@com.github.tereius/stable
openjdk/19.0.2@com.github.tereius/stable
android-ndk/r26b@de.privatehive/stable
android-sdk/latest@de.privatehive/stable
openjdk/19.0.2@de.privatehive/stable
11 changes: 0 additions & 11 deletions hostProfiles/raspberrypios-bullseye.profile

This file was deleted.

2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"projectDescription": "A client side ONVIF library",
"vendor": "Björn Stresing",
"contact": "bjoern.stresing@gmx.de",
"domain": "com.github.tereius",
"domain": "de.privatehive",
"copyrightYear": "2018",
"repository": "https://github.com/Tereius/libONVIF",
"topics": [
Expand Down

0 comments on commit e055f9a

Please sign in to comment.