Skip to content

Commit 576dd6d

Browse files
authored
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
1 parent 3a5432b commit 576dd6d

File tree

3 files changed

+47
-4
lines changed

3 files changed

+47
-4
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- ros2
8+
pull_request:
9+
branches:
10+
- ros2
11+
12+
jobs:
13+
industrial_ci:
14+
runs-on: ubuntu-22.04
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
ROS_DISTRO: [humble, iron, jazzy, rolling]
19+
ROS_REPO: [testing, main]
20+
env:
21+
ROS_DISTRO: ${{ matrix.ROS_DISTRO }}
22+
ROS_REPO: ${{ matrix.ROS_REPO }}
23+
steps:
24+
- name: Checkout repo
25+
uses: actions/checkout@v4
26+
- name: Source tests
27+
uses: "ros-industrial/industrial_ci@master"

CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,17 @@ install(TARGETS ${PROJECT_NAME}
7777
)
7878

7979
install(DIRECTORY include/${PROJECT_NAME}/
80-
DESTINATION include/${PROJECT_NAME}
81-
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp"
80+
DESTINATION include/${PROJECT_NAME}
81+
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp"
8282
)
8383

84+
###########
85+
## Tests ##
86+
###########
87+
88+
if(BUILD_TESTING)
89+
find_package(ament_lint_auto REQUIRED)
90+
ament_lint_auto_find_test_dependencies()
91+
endif()
92+
8493
ament_package()

package.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
<?xml version="1.0"?>
2-
<package format="2">
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
34
<name>web_video_server</name>
45
<version>1.0.0</version>
56
<description>HTTP Streaming of ROS Image Topics in Multiple Formats</description>
67

78
<maintainer email="[email protected]">Błażej Sowa</maintainer>
8-
<author email="[email protected]">Mitchell Wills</author>
99

1010
<license>BSD</license>
1111

1212
<url type="website">http://ros.org/wiki/web_video_server</url>
1313
<url type="bugtracker">https://github.com/RobotWebTools/web_video_server/issues</url>
1414
<url type="repository">https://github.com/RobotWebTools/web_video_server</url>
1515

16+
<author email="[email protected]">Mitchell Wills</author>
17+
1618
<buildtool_depend>ament_cmake_ros</buildtool_depend>
1719

1820
<build_depend>rclcpp</build_depend>
@@ -29,6 +31,11 @@
2931
<exec_depend>ffmpeg</exec_depend>
3032
<exec_depend>sensor_msgs</exec_depend>
3133

34+
<test_depend>ament_lint_auto</test_depend>
35+
<test_depend>ament_cmake_lint_cmake</test_depend>
36+
<test_depend>ament_cmake_xmllint</test_depend>
37+
<!-- <test_depend>ament_cmake_uncrustify</test_depend> -->
38+
3239
<export>
3340
<build_type>ament_cmake</build_type>
3441
</export>

0 commit comments

Comments
 (0)