diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65fdb3d..8790c03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [ main ] + branches: [main] pull_request: branches: ["**"] @@ -15,9 +15,20 @@ jobs: - name: Install Conan id: conan uses: turtlebrowser/get-conan@main + with: + version: 2.3.2 - - name: Create default Conan profile - run: conan profile detect + - name: Fetch up-transport-zenoh-cpp + uses: actions/checkout@v4 + with: + path: up-transport-zenoh-cpp + + - name: Install conan CI profile + shell: bash + run: | + conan profile detect + cp up-transport-zenoh-cpp/.github/workflows/ci_conan_profile "$(conan profile path default)" + conan profile show - name: Fetch up-core-api conan recipe uses: actions/checkout@v4 @@ -41,11 +52,6 @@ jobs: conan create --version 1.0.0-rc5 up-conan-recipes/zenohc-tmp/prebuilt conan create --version 1.0.0-rc5 up-conan-recipes/zenohcpp-tmp/from-source - - name: Fetch up-transport-zenoh-cpp - uses: actions/checkout@v4 - with: - path: up-transport-zenoh-cpp - - name: Build up-transport-zenoh-cpp with tests shell: bash run: | @@ -104,7 +110,7 @@ jobs: if: success() || failure() with: name: test-results - path: 'up-transport-zenoh-cpp/build/Release/test/results/*.xml' + path: "up-transport-zenoh-cpp/build/Release/test/results/*.xml" lint: name: Lint C++ sources @@ -146,9 +152,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: repo-root: up-transport-zenoh-cpp - ignore: 'test' - style: 'file' # read .clang-format for configuration - tidy-checks: '' # Read .clang-tidy for configuration + ignore: "test" + style: "file" # read .clang-format for configuration + tidy-checks: "" # Read .clang-tidy for configuration database: compile_commands.json - name: Run linters on tests @@ -158,13 +164,15 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: repo-root: up-transport-zenoh-cpp - ignore: 'src|include' - style: 'file' # read .clang-format for configuration - tidy-checks: '' # Read .clang-tidy for configuration + ignore: "src|include" + style: "file" # read .clang-format for configuration + tidy-checks: "" # Read .clang-tidy for configuration database: compile_commands.json - name: Report lint failure - if: steps.source-linter.outputs.checks-failed > 0 || steps.test-linter.outputs.checks-failed > 0 + if: + steps.source-linter.outputs.checks-failed > 0 || + steps.test-linter.outputs.checks-failed > 0 run: | exit 1 diff --git a/.github/workflows/ci_conan_profile b/.github/workflows/ci_conan_profile new file mode 100644 index 0000000..86745c5 --- /dev/null +++ b/.github/workflows/ci_conan_profile @@ -0,0 +1,8 @@ +[settings] +arch=x86_64 +build_type=Release +compiler=gcc +compiler.cppstd=gnu17 +compiler.libcxx=libstdc++11 +compiler.version=11 +os=Linux \ No newline at end of file diff --git a/README.md b/README.md index 9c000fd..4ca71a9 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This library provides a Zenoh-based uProtocol transport for C++ uEntities. -*_IMPORTANT NOTE:_ This project is under active development* +_*IMPORTANT NOTE:* This project is under active development_ This module contains the Zenoh implementation of the Layer 1 `UTransport` API from [up-cpp][cpp-api-repo]. @@ -12,6 +12,7 @@ from [up-cpp][cpp-api-repo]. ## Getting Started ### Requirements: + - Compiler: GCC/G++ 11 or Clang 13 - Conan : 1.59 or latest 2.X @@ -20,11 +21,13 @@ from [up-cpp][cpp-api-repo]. Using the recipes found in [up-conan-recipes][conan-recipe-repo], build these Conan packages: -1. [up-core-api][spec-repo] - `conan create --version 1.6.0 --build=missing up-core-api/release` -1. [up-cpp][cpp-api-repo] - `conan create --version 1.0.1-rc1 --build=missing up-cpp/release` -2. [zenoh-c][zenoh-repo] - `conan create --version 0.11.0 zenoh-tmp/from-source` +1. [up-core-api][spec-repo] - + `conan create --version 1.6.0 --build=missing up-core-api/release` +1. [up-cpp][cpp-api-repo] - + `conan create --version 1.0.1-rc1 --build=missing up-cpp/release` +1. [zenoh-c][zenoh-repo] - `conan create --version 0.11.0 zenoh-tmp/from-source` -**NOTE:** all `conan` commands in this document use Conan 2.x syntax. Please +**NOTE:** all `conan` commands in this document use Conan 2.x syntax. Please adjust accordingly when using Conan 1.x. ## How to Use the Library @@ -45,8 +48,8 @@ cmake_layout ``` **NOTE:** If using conan version 1.59 Ensure that the conan profile is -configured to use ABI 11 (libstdc++11: New ABI) standards according to -[the Conan documentation for managing gcc ABIs][conan-abi-docs]. +configured to use ABI 11 (libstdc++11: New ABI) standards according to [the +Conan documentation for managing gcc ABIs][conan-abi-docs]. ## Building locally