change ci and lint

This commit is contained in:
GyuH13 2025-02-05 10:44:03 +09:00
parent 2d757bbe99
commit b3289de7f0
3 changed files with 57 additions and 27 deletions

View File

@ -1,39 +1,34 @@
name: humble
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# Specifies the events that trigger the workflow
on:
push:
branches: [ main, humble ]
pull_request:
branches: [ main, humble ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# Defines a set of jobs to be run as part of the workflow
jobs:
humble:
runs-on: ubuntu-latest
# The name of the job
ROS_CI:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ros_distribution:
#- foxy
# - galactic
- humble
# - rolling
include:
# Foxy Fitzroy (June 2020 - May 2023)
# - docker_image: ubuntu:focal
# ros_distribution: foxy
# ros_version: 2
# # Galactic Geochelone (May 2021)
# - docker_image: ubuntu:focal
# ros_distribution: galactic
# ros_version: 2
# Humble Hawksbill (May 2027)
- docker_image: ubuntu:jammy
ros_distribution: humble
ros_version: 2
# # Rolling
# - docker_image: ubuntu:jammy
# ROS 2 Jazzy Jalisco
# - docker_image: ubuntu:noble
# ros_distribution: jazzy
# ros_version: 2
# ROS 2 Rolling Ridley
# - docker_image: ubuntu:noble
# ros_distribution: rolling
# ros_version: 2
container:
@ -41,18 +36,23 @@ jobs:
steps:
- name: Setup directories
run: mkdir -p ros_ws/src
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ros_ws/src
- name: Setup ROS environment
uses: ros-tooling/setup-ros@0.3.3
uses: ros-tooling/setup-ros@0.7
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: Build and Test
uses: ros-tooling/action-ros-ci@0.2.5
uses: ros-tooling/action-ros-ci@0.3
with:
package-name: turtlebot3_simulations
target-ros2-distro: ${{ matrix.ros_distribution }}
vcs-repo-file-url: "https://raw.githubusercontent.com/ROBOTIS-GIT/turtlebot3_simulations/ros2-devel/turtlebot3_simulations_ci.repos"
target-ros2-distro: ${{ matrix.ros_distribution }}
vcs-repo-file-url: "https://raw.githubusercontent.com/ROBOTIS-GIT/turtlebot3_simulations/main/turtlebot3_simulations_ci.repos"
package-name: |
turtlebot3_simulations
turtlebot3_gazebo
turtlebot3_fake_node

30
.github/workflows/ros-lint.yml vendored Normal file
View File

@ -0,0 +1,30 @@
# The name of the workflow
name: Lint
# Specifies the events that trigger the workflow
on:
pull_request:
# Defines a set of jobs to be run as part of the workflow
jobs:
ament_lint:
runs-on: ubuntu-latest
container:
image: rostooling/setup-ros-docker:ubuntu-noble-ros-rolling-ros-base-latest
strategy:
fail-fast: false
matrix:
linter: [cppcheck, cpplint, uncrustify, flake8, pep257, lint_cmake, xmllint, copyright]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ROS environment
uses: ros-tooling/setup-ros@v0.7
- name: Run Linter
uses: ros-tooling/action-ros-lint@master
with:
linter: ${{ matrix.linter }}
distribution: rolling
package-name: "*"

View File

@ -2,16 +2,16 @@ repositories:
turtlebot3/turtlebot3:
type: git
url: https://github.com/ROBOTIS-GIT/turtlebot3.git
version: ros2-devel
version: main
turtlebot3/turtlebot3_msgs:
type: git
url: https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
version: ros2-devel
version: main
utils/DynamixelSDK:
type: git
url: https://github.com/ROBOTIS-GIT/DynamixelSDK.git
version: ros2-devel
version: main
utils/hls_lfcd_lds_driver:
type: git
url: https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver.git
version: ros2-devel
version: main