From 576dd6d70fbeaade8a64c4cb4efbd6f89caad668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Sowa?= Date: Mon, 30 Sep 2024 15:13:10 +0200 Subject: [PATCH] Add CI workflow and ament_lint tests (#148) * Add CI workflow * Add ament_lint tests * Disable uncrustify for now * Use package format 3 and add xml schema * Fix cmake lint error --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ CMakeLists.txt | 13 +++++++++++-- package.xml | 11 +++++++++-- 3 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..749a442 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: + workflow_dispatch: + push: + branches: + - ros2 + pull_request: + branches: + - ros2 + +jobs: + industrial_ci: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + ROS_DISTRO: [humble, iron, jazzy, rolling] + ROS_REPO: [testing, main] + env: + ROS_DISTRO: ${{ matrix.ROS_DISTRO }} + ROS_REPO: ${{ matrix.ROS_REPO }} + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Source tests + uses: "ros-industrial/industrial_ci@master" diff --git a/CMakeLists.txt b/CMakeLists.txt index ac9c890..eeade93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,8 +77,17 @@ install(TARGETS ${PROJECT_NAME} ) install(DIRECTORY include/${PROJECT_NAME}/ - DESTINATION include/${PROJECT_NAME} - FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" + DESTINATION include/${PROJECT_NAME} + FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" ) +########### +## Tests ## +########### + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() +endif() + ament_package() diff --git a/package.xml b/package.xml index 6097cac..59ad8c5 100644 --- a/package.xml +++ b/package.xml @@ -1,11 +1,11 @@ - + + web_video_server 1.0.0 HTTP Streaming of ROS Image Topics in Multiple Formats Błażej Sowa - Mitchell Wills BSD @@ -13,6 +13,8 @@ https://github.com/RobotWebTools/web_video_server/issues https://github.com/RobotWebTools/web_video_server + Mitchell Wills + ament_cmake_ros rclcpp @@ -29,6 +31,11 @@ ffmpeg sensor_msgs + ament_lint_auto + ament_cmake_lint_cmake + ament_cmake_xmllint + + ament_cmake