Skip to content

Commit

Permalink
Use ament cmake tests via colcon
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsowa committed Nov 6, 2023
1 parent 5a94bbc commit 29cc119
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 33 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
5 changes: 4 additions & 1 deletion leo_bringup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
4 changes: 4 additions & 0 deletions leo_bringup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@

<!-- <exec_depend>web_video_server</exec_depend> -->

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_cmake_lint_cmake</test_depend>
<test_depend>ament_cmake_xmllint</test_depend>

<export>
<build_type>ament_cmake</build_type>
<architecture_independent/>
Expand Down
5 changes: 5 additions & 0 deletions leo_fw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
14 changes: 10 additions & 4 deletions leo_fw/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
<package format="3">
<name>leo_fw</name>
<version>1.3.0</version>
<description>
Binary releases of Leo Rover firmware and related utilities
</description>
<description> Binary releases of Leo Rover firmware and related utilities </description>

<maintainer email="[email protected]">Fictionlab</maintainer>

Expand Down Expand Up @@ -44,7 +42,15 @@
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>nav_msgs</exec_depend>
<exec_depend>leo_msgs</exec_depend>


<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_cmake_black</test_depend>
<test_depend>ament_cmake_copyright</test_depend>
<test_depend>ament_cmake_lint_cmake</test_depend>
<test_depend>ament_cmake_mypy</test_depend>
<test_depend>ament_cmake_uncrustify</test_depend>
<test_depend>ament_cmake_xmllint</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down

0 comments on commit 29cc119

Please sign in to comment.