From ee50d14e4e528a6ffe599434dfb47ea259e979b9 Mon Sep 17 00:00:00 2001 From: Patrick Roncagliolo Date: Thu, 16 Nov 2023 09:41:58 +0100 Subject: [PATCH] Add Iron CI (#10) --- .github/workflows/iron.yml | 36 ++++++++++++++++++++++ .github/workflows/main.yml | 3 +- README.md | 3 ++ src/SensorMsgImage_CvMat.cpp | 10 +++--- src/SensorMsgPointCloud2_PCLPointCloud.cpp | 10 +++--- 5 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/iron.yml diff --git a/.github/workflows/iron.yml b/.github/workflows/iron.yml new file mode 100644 index 0000000..bdba8c5 --- /dev/null +++ b/.github/workflows/iron.yml @@ -0,0 +1,36 @@ +name: Ubuntu 22.04 Iron Build + +on: + pull_request: + push: + branches: + - iron + +jobs: + Build: + runs-on: self-hosted + container: + image: osrf/ros:iron-desktop-full-jammy + + steps: + - name: Update + run: apt update + + - name: Install PIP + run: apt install -y python3-pip lcov + + - name: Install colcon tools + run: python3 -m pip install colcon-lcov-result colcon-coveragepy-result + + - name: Run Tests + uses: ros-tooling/action-ros-ci@0.3.5 + with: + target-ros2-distro: iron + import-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Logs + uses: actions/upload-artifact@v1 + with: + name: colcon-logs + path: ros_ws/log + if: always() diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4536956..ecbfd17 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,8 +23,9 @@ jobs: run: python3 -m pip install colcon-lcov-result colcon-coveragepy-result - name: Run Tests - uses: ros-tooling/action-ros-ci@0.2.7 + uses: ros-tooling/action-ros-ci@0.3.5 with: + ref: main target-ros2-distro: humble import-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 3cee501..4d0ccd0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # ROS2 Native Adapters +[![Ubuntu 22.04 Humble Build](https://github.com/roncapat/ros2_native_adapters/actions/workflows/main.yml/badge.svg)](https://github.com/roncapat/ros2_native_adapters/actions/workflows/main.yml) +[![Ubuntu 22.04 Iron Build](https://github.com/roncapat/ros2_native_adapters/actions/workflows/iron.yml/badge.svg)](https://github.com/roncapat/ros2_native_adapters/actions/workflows/iron.yml) + This package provides the following ROS2 type adaptations: | Adapted Message | Native wrapper | Underlying native class | Header | diff --git a/src/SensorMsgImage_CvMat.cpp b/src/SensorMsgImage_CvMat.cpp index 6dda7fa..a854979 100644 --- a/src/SensorMsgImage_CvMat.cpp +++ b/src/SensorMsgImage_CvMat.cpp @@ -11,21 +11,21 @@ Copyright 2023 Patrick Roncagliolo, Antonino Bongiovanni StampedImage_CV::StampedImage_CV(const StampedImage_CV & other) { - //RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Copy constructor called"); + // RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Copy constructor called"); this->header = other.header; this->mat = other.mat.clone(); } StampedImage_CV::StampedImage_CV(StampedImage_CV && other) { - //RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Move constructor called"); + // RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Move constructor called"); this->header = std::move(other.header); this->mat = std::move(other.mat); } StampedImage_CV & StampedImage_CV::operator=(const StampedImage_CV & other) { - //RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Assignment operator called"); + // RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Assignment operator called"); if (this == &other) {return *this;} this->header = other.header; @@ -36,7 +36,7 @@ StampedImage_CV & StampedImage_CV::operator=(const StampedImage_CV & other) void rclcpp::TypeAdapter::convert_to_ros_message( const custom_type & source, ros_message_type & destination) { - //RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Conversion to message"); + // RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Conversion to message"); int cv_type {source.mat.type()}; std::string encoding {}; @@ -95,7 +95,7 @@ void rclcpp::TypeAdapter::convert_to_r void rclcpp::TypeAdapter::convert_to_custom( const ros_message_type & source, custom_type & destination) { - //RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Conversion from message"); + // RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Conversion from message"); destination.header = source.header; destination.mat = std::move(cv_bridge::toCvCopy(source, source.encoding)->image); diff --git a/src/SensorMsgPointCloud2_PCLPointCloud.cpp b/src/SensorMsgPointCloud2_PCLPointCloud.cpp index 4ac5341..900239a 100644 --- a/src/SensorMsgPointCloud2_PCLPointCloud.cpp +++ b/src/SensorMsgPointCloud2_PCLPointCloud.cpp @@ -9,7 +9,7 @@ Copyright 2023 Patrick Roncagliolo StampedPointCloud_PCL::StampedPointCloud_PCL(const StampedPointCloud_PCL & other) { - //RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Copy constructor called"); + // RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Copy constructor called"); // raise(SIGTRAP); this->header = other.header; this->cloud = other.cloud; @@ -17,7 +17,7 @@ StampedPointCloud_PCL::StampedPointCloud_PCL(const StampedPointCloud_PCL & other StampedPointCloud_PCL::StampedPointCloud_PCL(StampedPointCloud_PCL && other) { - //RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Move constructor called"); + // RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Move constructor called"); // raise(SIGTRAP); this->header = std::move(other.header); this->cloud = std::move(other.cloud); @@ -25,7 +25,7 @@ StampedPointCloud_PCL::StampedPointCloud_PCL(StampedPointCloud_PCL && other) StampedPointCloud_PCL & StampedPointCloud_PCL::operator=(const StampedPointCloud_PCL & other) { - //RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Assignment operator called"); + // RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Assignment operator called"); // raise(SIGTRAP); if (this == &other) {return *this;} this->header = other.header; @@ -67,7 +67,7 @@ void rclcpp::TypeAdapter::convert_to_custom( const sensor_msgs::msg::PointCloud2 & source, StampedPointCloud_PCL & destination) { - //RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Conversion from message"); + // RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Conversion from message"); // raise(SIGTRAP); bool rgb = false;