Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/conan_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
CC: ${{ matrix.compiler[0] }}
CXX: ${{ matrix.compiler[1] }}
run: |
conan create . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:build_all=True -o celix/*:enable_ccache=True -pr:b default -pr:h default -s:h build_type=${{ matrix.type }} -tf examples/conan_test_package_v2 -o celix/*:celix_cxx17=True -o celix/*:celix_install_deprecated_api=True
conan create . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:build_all=True -o celix/*:enable_ccache=True -pr:b default -pr:h default -s:h build_type=${{ matrix.type }} -o celix/*:celix_cxx17=True -o celix/*:celix_install_deprecated_api=True
- name: Dependency Deduction Test
env:
CC: ${{ matrix.compiler[0] }}
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
${{ runner.os }}-ccache-Release-
- name: Create Celix
run: |
conan create . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:build_all=True -o celix/*:enable_ccache=True -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -tf examples/conan_test_package_v2 -o celix/*:celix_cxx17=True -o celix/*:celix_install_deprecated_api=True -o celix/*:enable_address_sanitizer=True
conan create . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:build_all=True -o celix/*:enable_ccache=True -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -o celix/*:celix_cxx17=True -o celix/*:celix_install_deprecated_api=True -o celix/*:enable_address_sanitizer=True
- name: Dependency Deduction Test
run: |
conan inspect . | awk 'BEGIN { FS="[\t:]+"; output=0 } /build/ && !/build_all/ && !/build_rsa_remote_service_admin_shm_v2/ && !/build_rsa_discovery_zeroconf/ { if(output) print $1} /^options/ {output=1} /^options_definitions/ {output=0}' | while read option; do conan build . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:${option}=True -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -of ${option}_dir -o celix/*:celix_cxx17=True -o celix/*:enable_ccache=True -o celix/*:celix_install_deprecated_api=True || exit 1; done
Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CelixConan(ConanFile):
url = "https://github.com/apache/celix.git"
topics = ("conan", "celix", "osgi", "embedded", "linux", "C/C++")
exports_sources = ("CMakeLists.txt", "bundles*", "cmake*", "!cmake-build*", "examples*", "libs*", "misc*",
"LICENSE", "!examples/conan_test_package*")
"LICENSE")
generators = "CMakeDeps", "VirtualRunEnv"
settings = "os", "arch", "compiler", "build_type"
license = " Apache-2.0"
Expand Down
136 changes: 0 additions & 136 deletions examples/conan_test_package/conanfile.py

This file was deleted.

19 changes: 0 additions & 19 deletions examples/conan_test_package_v2/CMakeLists.txt

This file was deleted.

File renamed without changes.
11 changes: 3 additions & 8 deletions examples/conan_test_package/README.md → test_package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,14 @@ a Celix package is properly installed in the local Conan cache. To this end, it
To create a Celix package in the local cache with C++ support and verify that it's properly installed, run the following command in the Celix root directory:

```BASH
conan create . celix/2.2.3@zhengpeng/testing -tf examples/conan_test_package/ -o celix:celix_cxx17=True
conan create . -o celix_cxx17=True
```

To verify a Celix package with C++ support is properly installed in the local cache, run the following command in the Celix root directory:

```BASH
conan test examples/conan_test_package/ celix/2.2.3@zhengpeng/testing -o celix:celix_cxx17=True
conan test test_package celix/3.0.0@ -o celix_cxx17=True
```

Though it might not be wise to spend time reading C/C++ codes in this folder, it's instructive to have a look at `conanfile.py` and `CMakeLists.txt`,
which illustrates a non-intrusive way of using Conan with CMake build system. Pay attention to our use of `cmake_paths` `cmake_find_package` generators
and the following line:

```python
cmake.definitions["CMAKE_PROJECT_test_package_INCLUDE"] = os.path.join(self.build_folder, "conan_paths.cmake")
```
which illustrates a non-intrusive way of using Conan with CMake build system.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test(self):
with chdir(self, self.build_folder):
celix_options = self.dependencies["celix"].options
if celix_options.build_framework:
self.run("./conan_test_package/use_framework", env="conanrun")
self.run("./use_framework", env="conanrun")
if celix_options.build_http_admin:
self.run("./use_http_admin", cwd=os.path.join("deploy", "use_http_admin"), env="conanrun")
if celix_options.build_log_service:
Expand All @@ -92,8 +92,8 @@ def test(self):
self.run("./use_syslog_writer", cwd=os.path.join("deploy", "use_syslog_writer"), env="conanrun")
if celix_options.build_remote_service_admin:
self.run("./use_my_rsa", cwd=os.path.join("deploy", "use_my_rsa"), env="conanrun")
self.run("./conan_test_package/use_c_rsa_spi", env="conanrun")
self.run("./conan_test_package/use_rsa_utils", env="conanrun")
self.run("./use_c_rsa_spi", env="conanrun")
self.run("./use_rsa_utils", env="conanrun")

if celix_options.build_rsa_remote_service_admin_dfi and celix_options.build_launcher:
self.run("./use_rsa_dfi", cwd=os.path.join("deploy", "use_rsa_dfi"), env="conanrun")
Expand All @@ -109,42 +109,42 @@ def test(self):
self.run("./use_rsa_discovery_zeroconf",
cwd=os.path.join("deploy", "use_rsa_discovery_zeroconf"), env="conanrun")
if celix_options.build_shell:
self.run("./conan_test_package/use_shell", env="conanrun")
self.run("./use_shell", env="conanrun")
if celix_options.celix_cxx17 or celix_options.celix_cxx14:
self.run("./conan_test_package/use_cxx_shell", env="conanrun")
self.run("./use_cxx_shell", env="conanrun")
if celix_options.build_remote_shell:
self.run("./use_remote_shell", cwd=os.path.join("deploy", "use_remote_shell"), env="conanrun")
if celix_options.build_shell_tui:
self.run("./use_shell_tui", cwd=os.path.join("deploy", "use_shell_tui"), env="conanrun")
if celix_options.build_shell_wui:
self.run("./use_shell_wui", cwd=os.path.join("deploy", "use_shell_wui"), env="conanrun")
if celix_options.build_celix_etcdlib:
self.run("./conan_test_package/use_etcd_lib", env="conanrun")
self.run("./use_etcd_lib", env="conanrun")
if celix_options.build_launcher:
self.run("./use_launcher", cwd=os.path.join("deploy", "use_launcher"), env="conanrun")
if celix_options.build_promises:
self.run("./conan_test_package/use_promises", env="conanrun")
self.run("./use_promises", env="conanrun")
if celix_options.build_pushstreams:
self.run("./conan_test_package/use_pushstreams", env="conanrun")
self.run("./use_pushstreams", env="conanrun")
if celix_options.build_log_helper:
self.run("./conan_test_package/use_log_helper", env="conanrun")
self.run("./use_log_helper", env="conanrun")
if celix_options.build_log_service_api:
self.run("./conan_test_package/use_log_service_api", env="conanrun")
self.run("./use_log_service_api", env="conanrun")
if celix_options.build_cxx_remote_service_admin:
self.run("./use_cxx_remote_service_admin",
cwd=os.path.join("deploy", "use_cxx_remote_service_admin"), env="conanrun")
self.run("./conan_test_package/use_rsa_spi", env="conanrun")
self.run("./use_rsa_spi", env="conanrun")
if celix_options.build_shell_api:
self.run("./conan_test_package/use_shell_api", env="conanrun")
self.run("./use_shell_api", env="conanrun")
if celix_options.build_celix_dfi:
self.run("./conan_test_package/use_celix_dfi", env="conanrun")
self.run("./use_celix_dfi", env="conanrun")
if celix_options.build_utils:
self.run("./conan_test_package/use_utils", env="conanrun")
self.run("./use_utils", env="conanrun")
if celix_options.build_event_admin:
self.run("./use_event_admin",
cwd=os.path.join("deploy", "use_event_admin"), env="conanrun")
self.run("./conan_test_package/use_event_admin_api", env="conanrun")
self.run("./conan_test_package/use_event_admin_spi", env="conanrun")
self.run("./use_event_admin_api", env="conanrun")
self.run("./use_event_admin_spi", env="conanrun")
if celix_options.build_event_admin_remote_provider_mqtt:
self.run("./use_event_admin_remote_provider_mqtt",
cwd=os.path.join("deploy", "use_event_admin_remote_provider_mqtt"), env="conanrun")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading