Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 2.3.2
version: 2.3.2

- name: Fetch conan recipes
uses: actions/checkout@v4

- name: Install conan CI profile
shell: bash
run: |
Expand All @@ -35,7 +35,6 @@ jobs:
conan create --version 1.6.0-alpha2 up-core-api/release
conan create --version 1.6.0-alpha3 up-core-api/release
conan create --version 1.6.0-alpha4 up-core-api/release


- name: Build up-cpp conan package
shell: bash
Expand Down Expand Up @@ -109,11 +108,13 @@ jobs:
shell: bash
run: |
conan create --version 1.0.0-rc5 zenohc-tmp/prebuilt
conan create --version 1.2.1 zenohc-tmp/prebuilt

- name: Build zenohcpp conan package
shell: bash
run: |
conan create --version 1.0.0-rc5 zenohcpp-tmp/from-source
conan create --version 1.2.1 zenohcpp-tmp/from-source

- name: Build up-transport-zenoh-cpp conan package
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_conan_profile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
os=Linux
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# uProtocol C++ Conan Recipes (up-conan-recipes)

This is a collection of Conan recipes for uProtocol C++ libraries. For each
uP package, two recipes are provided: release and developer.
This is a collection of Conan recipes for uProtocol C++ libraries. For each uP
package, two recipes are provided: release and developer.

The release recipes aim to provide a repeatable way to build all tagged releases
of the various uProtocol libraries. They pull the source archive for a given
tag from github, confirm the checksum, and build the package.
of the various uProtocol libraries. They pull the source archive for a given tag
from github, confirm the checksum, and build the package.

The developer packages are intended to support arbitrary builds for developers.
They will, by default, clone eclipse-uprotocol/[repo] and build the main branch.
Expand All @@ -16,20 +16,20 @@ out and built.

With Conan 2:

```
```shell
conan create --version 1.6.0-alpha4 --build=missing up-core-api/release/
conan create --version 1.0.1 --build=missing up-cpp/release/
conan create --version 1.0.0-rc3 --build=missing up-transport-zenoh-cpp/release/
```

## Building Developer Packages

The default fork and checkout commit can be overridden with
`-o fork=[fork]` and `-o commitish=[commit/branch/tag]`
The default fork and checkout commit can be overridden with `-o fork=[fork]` and
`-o commitish=[commit/branch/tag]`

With Conan 2:

```
```shell
conan create --version 1.6.1-dev --build=missing up-core-api/developer/
conan create --version 1.1.0-dev --build=missing up-cpp/developer/
conan create --version 1.0.0-dev --build=missing up-transport-zenoh-cpp/developer/
Expand All @@ -48,14 +48,14 @@ would be removed with `conan remove 'up-cpp'`.
At time of writing, conan packages were not available for zenoh-c and zenoh-cpp.
They are prerequisites for the up-transport-zenoh-cpp packages. With Conan 2:

```
conan create --version 1.0.0-rc5 zenohc-tmp/prebuilt
conan create --version 1.0.0-rc5 zenohcpp-tmp/from-source
```shell
conan create --version 1.2.1 zenohc-tmp/prebuilt
conan create --version 1.2.1 zenohcpp-tmp/from-source
```

## Running in a clean docker container

```
```shell
cd tools/ubuntu-24.04-docker/
./launch-shell.sh

Expand Down
28 changes: 18 additions & 10 deletions zenohc-tmp/prebuilt/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
sources:
"1.2.1":
"Linux":
"x86_64":
url: "https://github.com/eclipse-zenoh/zenoh-c/releases/download/1.2.1/zenoh-c-1.2.1-x86_64-unknown-linux-gnu-standalone.zip"
sha256: "eb870ffa4f01044c79ae9f4878e869be129e3e63eb7481e017fabdda811694a7"
"license":
url: "https://github.com/eclipse-zenoh/zenoh-c/raw/1.2.1/LICENSE"
sha256: "01a44774f7b1a453595c7c6d7f7308284ba6a1059dc49e14dad6647e1d44a338"
"1.0.0-rc6":
"Linux":
"x86_64":
url: "https://github.com/eclipse-zenoh/zenoh-c/releases/download/1.0.0.6/zenoh-c-1.0.0.6-x86_64-unknown-linux-gnu-standalone.zip"
sha256: "2eaff1c0a0c735633b7bcf52971f78699a4e92b527888ecb95b82829d0b5cdd8"
"license":
url: "https://github.com/eclipse-zenoh/zenoh-c/raw/1.0.0.6/LICENSE"
sha256: "01a44774f7b1a453595c7c6d7f7308284ba6a1059dc49e14dad6647e1d44a338"
url: "https://github.com/eclipse-zenoh/zenoh-c/raw/1.0.0.6/LICENSE"
sha256: "01a44774f7b1a453595c7c6d7f7308284ba6a1059dc49e14dad6647e1d44a338"
"1.0.0-rc5":
"Linux":
"x86_64":
url: "https://github.com/eclipse-zenoh/zenoh-c/releases/download/1.0.0.5/zenoh-c-1.0.0.5-x86_64-unknown-linux-gnu-standalone.zip"
sha256: "ef5cc62efb1b1c465dd5edce0c6ed1f6cb83b8ab083940e06226ec11ade42229"
"license":
url: "https://github.com/eclipse-zenoh/zenoh-c/raw/1.0.0.5/LICENSE"
sha256: "01a44774f7b1a453595c7c6d7f7308284ba6a1059dc49e14dad6647e1d44a338"
url: "https://github.com/eclipse-zenoh/zenoh-c/raw/1.0.0.5/LICENSE"
sha256: "01a44774f7b1a453595c7c6d7f7308284ba6a1059dc49e14dad6647e1d44a338"
"1.0.0-rc4":
"Linux":
"x86_64":
url: "https://github.com/eclipse-zenoh/zenoh-c/releases/download/1.0.0.4/zenoh-c-1.0.0.4-x86_64-unknown-linux-gnu-standalone.zip"
sha256: "4f25cb46241157b188069a881a437ea0b3dd2e488b313b1fa36333c866902a63"
"license":
url: "https://github.com/eclipse-zenoh/zenoh-c/raw/1.0.0.4/LICENSE"
sha256: "01a44774f7b1a453595c7c6d7f7308284ba6a1059dc49e14dad6647e1d44a338"
url: "https://github.com/eclipse-zenoh/zenoh-c/raw/1.0.0.4/LICENSE"
sha256: "01a44774f7b1a453595c7c6d7f7308284ba6a1059dc49e14dad6647e1d44a338"
"0.11.0":
"Linux":
"x86_64":
url: "https://github.com/eclipse-zenoh/zenoh-c/releases/download/0.11.0/zenoh-c-0.11.0-x86_64-unknown-linux-gnu-standalone.zip"
sha256: "eab23235f65b763280d45d3d4ba46a3a4c31fbd25f711c661440729735286469"
"license":
url: "https://github.com/eclipse-zenoh/zenoh-c/raw/0.11.0/LICENSE"
sha256: "01a44774f7b1a453595c7c6d7f7308284ba6a1059dc49e14dad6647e1d44a338"
url: "https://github.com/eclipse-zenoh/zenoh-c/raw/0.11.0/LICENSE"
sha256: "01a44774f7b1a453595c7c6d7f7308284ba6a1059dc49e14dad6647e1d44a338"
"0.11.0.3":
"Windows":
"x86_64":
Expand All @@ -57,5 +65,5 @@ sources:
url: "https://github.com/eclipse-zenoh/zenoh-c/releases/download/0.11.0.3/zenoh-c-0.11.0.3-aarch64-apple-darwin-standalone.zip"
sha256: "fb4311cfa3668aa5e7fd9bb3af0f1b3c9caf8fc9452f087398f867ae12336875"
"license":
url: "https://github.com/eclipse-zenoh/zenoh-c/raw/0.11.0.3/LICENSE"
sha256: "01a44774f7b1a453595c7c6d7f7308284ba6a1059dc49e14dad6647e1d44a338"
url: "https://github.com/eclipse-zenoh/zenoh-c/raw/0.11.0.3/LICENSE"
sha256: "01a44774f7b1a453595c7c6d7f7308284ba6a1059dc49e14dad6647e1d44a338"
18 changes: 11 additions & 7 deletions zenohc-tmp/prebuilt/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ def _supported_platforms(self):
]

def layout(self):
pass
self.cpp.package.libs = ["zenohc"]
self.cpp.package.libdirs = ["lib"]
self.cpp.package.includedirs = ["include"]


def configure(self):
self.settings.rm_safe("compiler.cppstd")
Expand All @@ -81,14 +84,15 @@ def build(self):

def package(self):
copy(self, "LICENSE", self.build_folder, os.path.join(self.package_folder, "licenses"))
copy(self, "*.so", os.path.join(self.build_folder), os.path.join(self.package_folder, "lib"))
copy(self, "*.a", os.path.join(self.build_folder), os.path.join(self.package_folder, "lib"))
# HACK adapt if versions are added or deprecated
if (self.version.startswith('0.') or self.version.startswith('1.0')):
copy(self, "*.so", os.path.join(self.build_folder), os.path.join(self.package_folder, "lib"))
copy(self, "*.a", os.path.join(self.build_folder), os.path.join(self.package_folder, "lib"))
else:
copy(self, "*.so", os.path.join(self.build_folder), self.package_folder)
copy(self, "*.a", os.path.join(self.build_folder), self.package_folder)
copy(self, "*", os.path.join(self.build_folder, "include"), os.path.join(self.package_folder, "include"))

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "zenohc")
self.cpp_info.set_property("cmake_target_name", "zenohc::lib")

self.cpp_info.libs = ["zenohc"]
self.cpp_info.libdirs = ["lib"]
self.cpp_info.includedirs = ["include"]
9 changes: 7 additions & 2 deletions zenohcpp-tmp/from-source/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.2.1":
url: "https://github.com/eclipse-zenoh/zenoh-cpp/archive/refs/tags/1.2.1.tar.gz"
sha256: "2ad821e1c69d60c082688af7f66e8ff2029d94988767fa7ce5b6c889b3eb545a"
"1.0.0-rc6":
url: "https://github.com/eclipse-zenoh/zenoh-cpp/archive/refs/tags/1.0.0.6.tar.gz"
sha256: "cb8ccadc9018312b6a27ae6df7b39795f2109291e5d06e9940de36428101a6ef"
Expand All @@ -15,10 +18,12 @@ sources:
url: "https://github.com/eclipse-zenoh/zenoh-cpp/archive/refs/tags/0.11.0.3.tar.gz"
sha256: "3c0a424809f464b9704480bca58c895a5438f4bb1586d4e3ff4838879c73b69d"
build:
"1.2.1":
build_script_folder: "."
"1.0.0-rc6":
build_script_folder: "."
build_script_folder: "."
"1.0.0-rc5":
build_script_folder: "."
build_script_folder: "."
"1.0.0-rc4":
build_script_folder: "install"
"0.11.0":
Expand Down
5 changes: 2 additions & 3 deletions zenohcpp-tmp/from-source/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ class ZenohCppPackageConan(ConanFile):

options = { }
default_options = { }
settings = "build_type"
settings = "os", "compiler", "build_type", "arch"

def layout(self):
self.cpp.package.includedirs = ["include"]
cmake_layout(self)

def requirements(self):
Expand All @@ -61,5 +62,3 @@ def package(self):
def package_info(self):
self.cpp_info.set_property("cmake_file_name", "zenohcpp")
self.cpp_info.set_property("cmake_target_name", "zenohcpp::lib")

self.cpp_info.includedirs = ["include"]