Skip to content

Commit c83f82d

Browse files
committed
Added ci, lint
Signed-off-by: Wonho Yun <[email protected]>
1 parent 4171d29 commit c83f82d

File tree

2 files changed

+58
-14
lines changed

2 files changed

+58
-14
lines changed

.github/workflows/ros-ci.yml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,57 @@
1-
name: ros-ci
1+
# The name of the workflow
2+
name: CI
23

3-
# Controls when the action will run. Triggers the workflow on push or pull request
4+
# Specifies the events that trigger the workflow
45
on:
56
push:
6-
branches: [ humble ]
7+
branches: [ main, humble ]
78
pull_request:
8-
branches: [ humble ]
9+
branches: [ main, humble ]
910

10-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
11+
# Defines a set of jobs to be run as part of the workflow
1112
jobs:
12-
humble:
13+
# The name of the job
14+
ROS_CI:
1315
runs-on: ubuntu-22.04
1416
strategy:
1517
fail-fast: false
1618
matrix:
1719
ros_distribution:
1820
- humble
21+
# - jazzy
22+
# - rolling
1923
include:
24+
# ROS 2 Humble Hawksbill
2025
- docker_image: ubuntu:jammy
2126
ros_distribution: humble
2227
ros_version: 2
23-
# # Rolling
24-
# - docker_image: ubuntu:jammy
28+
# ROS 2 Jazzy Jalisco
29+
# - docker_image: ubuntu:noble
30+
# ros_distribution: jazzy
31+
# ros_version: 2
32+
# ROS 2 Rolling Ridley
33+
# - docker_image: ubuntu:noble
2534
# ros_distribution: rolling
2635
# ros_version: 2
2736
container:
2837
image: ${{ matrix.docker_image }}
2938
steps:
30-
- name: Setup directories
39+
- name: Setup workspace
3140
run: mkdir -p ros_ws/src
32-
- name: checkout
33-
uses: actions/checkout@v3
41+
42+
- name: Checkout code
43+
uses: actions/checkout@v4
3444
with:
3545
path: ros_ws/src
46+
3647
- name: Setup ROS environment
37-
uses: ros-tooling/setup-ros@0.7.1
48+
uses: ros-tooling/setup-ros@v0.7
3849
with:
3950
required-ros-distributions: ${{ matrix.ros_distribution }}
51+
4052
- name: Build and Test
41-
uses: ros-tooling/action-ros-ci@0.3.5
53+
uses: ros-tooling/action-ros-ci@v0.3
4254
with:
43-
package-name: dynamixel_hardware_interface
4455
target-ros2-distro: ${{ matrix.ros_distribution }}
4556
vcs-repo-file-url: "https://raw.githubusercontent.com/ROBOTIS-GIT/dynamixel_hardware_interface/main/dynamixel_hardware_interface_ci.repos"
57+
package-name: dynamixel_hardware_interface

.github/workflows/ros-lint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# The name of the workflow
2+
name: Lint
3+
4+
# Specifies the events that trigger the workflow
5+
on:
6+
pull_request:
7+
8+
# Defines a set of jobs to be run as part of the workflow
9+
jobs:
10+
ament_lint:
11+
runs-on: ubuntu-latest
12+
container:
13+
image: rostooling/setup-ros-docker:ubuntu-noble-ros-rolling-ros-base-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
linter: [cppcheck, cpplint, uncrustify, flake8, pep257, lint_cmake, xmllint, copyright]
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup ROS environment
23+
uses: ros-tooling/[email protected]
24+
25+
- name: Run Linter
26+
env:
27+
AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: 1
28+
uses: ros-tooling/action-ros-lint@master
29+
with:
30+
linter: ${{ matrix.linter }}
31+
distribution: rolling
32+
package-name: "*"

0 commit comments

Comments
 (0)