From 7046f3c8a745ef30e8d14cf3a5acf3f1ae68a44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Sowa?= Date: Mon, 6 Nov 2023 12:09:54 +0100 Subject: [PATCH] Use ament cmake tests via colcon (#7) --- .github/workflows/ci.yml | 28 ---------------------------- leo_bringup/CMakeLists.txt | 5 ++++- leo_bringup/package.xml | 4 ++++ leo_fw/CMakeLists.txt | 5 +++++ leo_fw/package.xml | 14 ++++++++++---- 5 files changed, 23 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec5c726..23b4c63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,31 +29,3 @@ jobs: UPSTREAM_WORKSPACE: "github:LeoRover/leo_common-ros2#humble" PYLINT_CHECK: true PYLINT_ARGS: "--rcfile=src/leo_robot-ros2/.pylintrc" - - ament_lint: - name: ament_${{ matrix.linter }} - runs-on: ubuntu-20.04 - container: - image: ros:humble - strategy: - fail-fast: false - matrix: - linter: [copyright, lint_cmake, mypy, uncrustify, xmllint] - steps: - - uses: actions/checkout@v3 - - uses: ros-tooling/action-ros-lint@v0.1 - with: - distribution: humble - linter: ${{ matrix.linter }} - package-name: | - leo_bringup - leo_fw - leo_robot - - black_check: - runs-on: ubuntu-20.04 - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Check formatting - uses: psf/black@stable diff --git a/leo_bringup/CMakeLists.txt b/leo_bringup/CMakeLists.txt index 312f552..fe7b6f8 100644 --- a/leo_bringup/CMakeLists.txt +++ b/leo_bringup/CMakeLists.txt @@ -17,6 +17,9 @@ install( DESTINATION lib/${PROJECT_NAME} ) - +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() +endif() ament_package() diff --git a/leo_bringup/package.xml b/leo_bringup/package.xml index d0429e4..7b0f137 100644 --- a/leo_bringup/package.xml +++ b/leo_bringup/package.xml @@ -34,6 +34,10 @@ + ament_lint_auto + ament_cmake_lint_cmake + ament_cmake_xmllint + ament_cmake diff --git a/leo_fw/CMakeLists.txt b/leo_fw/CMakeLists.txt index b77cd96..77319bb 100644 --- a/leo_fw/CMakeLists.txt +++ b/leo_fw/CMakeLists.txt @@ -54,4 +54,9 @@ install( DESTINATION share/${PROJECT_NAME} ) +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() +endif() + ament_package() diff --git a/leo_fw/package.xml b/leo_fw/package.xml index c73718d..b0249b4 100644 --- a/leo_fw/package.xml +++ b/leo_fw/package.xml @@ -3,9 +3,7 @@ leo_fw 1.3.0 - - Binary releases of Leo Rover firmware and related utilities - + Binary releases of Leo Rover firmware and related utilities Fictionlab @@ -44,7 +42,15 @@ sensor_msgs nav_msgs leo_msgs - + + ament_lint_auto + ament_cmake_black + ament_cmake_copyright + ament_cmake_lint_cmake + ament_cmake_mypy + ament_cmake_uncrustify + ament_cmake_xmllint + ament_cmake