diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 07c90a86..7dd4881f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,6 +11,7 @@ jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: docker_image: ['ros:iron-ros-base', 'ros:rolling-ros-base'] container: @@ -21,7 +22,7 @@ jobs: run: | apt update && apt install -y curl - name: Setup Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@1.75.0 - uses: actions/checkout@v2 - name: rosdep run: | diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 5c3a7160..04f818b1 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -10,6 +10,7 @@ jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: docker_image: ['ros:iron-ros-base', 'ros:rolling-ros-base'] container: diff --git a/.github/workflows/tmp_build_noble.yaml b/.github/workflows/tmp_build_noble.yaml new file mode 100644 index 00000000..17d9fe2e --- /dev/null +++ b/.github/workflows/tmp_build_noble.yaml @@ -0,0 +1,36 @@ +name: build_noble +on: + pull_request: + push: + branches: [ rolling ] + workflow_dispatch: +defaults: + run: + shell: bash +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + docker_image: ['ubuntu:noble-20240225'] + container: + image: ${{ matrix.docker_image }} + timeout-minutes: 30 + steps: + - name: Setup rolling + run: | + apt update && apt install curl -y + curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null + apt update && apt install ros-dev-tools -y + apt install ros-rolling-ros-base -y + - uses: actions/checkout@v2 + - name: rosdep + run: | + rosdep init + rosdep update + rosdep install --from-paths . --rosdistro rolling -yir + - name: build + run: | + source /opt/ros/rolling/setup.bash + colcon build diff --git a/README.md b/README.md index 1d831c3c..278ebc26 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,12 @@ For information about the Design please visit [design](docs/design.md) page. ## Setup -Install latest rustc. -> Note: The version of rustc that can be installed via apt is outdated. +Install latest rustc via `rustup` if building on Ubuntu Jammy. +Skip this step if building on Ubuntu Noble as `cargo` and `rustc` will be +installed via `rosdep`. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +rustup install 1.75.0 ``` Build `rmw_zenoh_cpp` diff --git a/rmw_zenoh_cpp/src/rmw_zenoh.cpp b/rmw_zenoh_cpp/src/rmw_zenoh.cpp index fe3203b7..802a1269 100644 --- a/rmw_zenoh_cpp/src/rmw_zenoh.cpp +++ b/rmw_zenoh_cpp/src/rmw_zenoh.cpp @@ -878,7 +878,7 @@ rmw_publish( } }); auto free_msg_bytes = rcpputils::make_scope_exit( - [msg_bytes, allocator, &shmbuf]() { + [&msg_bytes, allocator, &shmbuf]() { if (msg_bytes && !shmbuf.has_value()) { allocator->deallocate(msg_bytes, allocator->state); } diff --git a/zenoh_c_vendor/CMakeLists.txt b/zenoh_c_vendor/CMakeLists.txt index 6d09093b..81211fae 100644 --- a/zenoh_c_vendor/CMakeLists.txt +++ b/zenoh_c_vendor/CMakeLists.txt @@ -24,12 +24,11 @@ find_package(ament_cmake_vendor_package REQUIRED) # when expanded. set(ZENOHC_CARGO_FLAGS "--no-default-features$--features=zenoh/transport_tcp zenoh/shared-memory") -# Set VCS_VERSION to include changes from https://github.com/eclipse-zenoh/zenoh/pull/830 -# and https://github.com/eclipse-zenoh/zenoh/pull/848 which was synced to zenoh-c in -# https://github.com/eclipse-zenoh/zenoh-c/pull/293. +# Set VCS_VERSION to include changes from https://github.com/eclipse-zenoh/zenoh/pull/875 +# which was synced to zenoh-c in https://github.com/eclipse-zenoh/zenoh-c/pull/307. ament_vendor(zenoh_c_vendor VCS_URL https://github.com/eclipse-zenoh/zenoh-c.git - VCS_VERSION bd0fe98772b7d65e8fb71eb0369d7c85c9b09c73 + VCS_VERSION c1498fcaf08d3dad15e49b1ac15cd380c0dc175c CMAKE_ARGS "-DZENOHC_CARGO_FLAGS=${ZENOHC_CARGO_FLAGS}" ) @@ -40,5 +39,4 @@ ament_vendor(zenoh_c_vendor # DESTINATION "lib/${PROJECT_NAME}" # USE_SOURCE_PERMISSIONS # ) - ament_package() diff --git a/zenoh_c_vendor/package.xml b/zenoh_c_vendor/package.xml index 6515c1e9..55c17616 100644 --- a/zenoh_c_vendor/package.xml +++ b/zenoh_c_vendor/package.xml @@ -12,7 +12,7 @@ ament_cmake ament_cmake_vendor_package - + cargo clang