From b3289de7f0a1d5951f3be157b6bd8969b6fdf9b7 Mon Sep 17 00:00:00 2001 From: GyuH13 Date: Wed, 5 Feb 2025 10:44:03 +0900 Subject: [PATCH] change ci and lint --- .github/workflows/ros-ci.yml | 46 ++++++++++++++++----------------- .github/workflows/ros-lint.yml | 30 +++++++++++++++++++++ turtlebot3_simulations_ci.repos | 8 +++--- 3 files changed, 57 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/ros-lint.yml diff --git a/.github/workflows/ros-ci.yml b/.github/workflows/ros-ci.yml index 6e8d6e6..674b990 100644 --- a/.github/workflows/ros-ci.yml +++ b/.github/workflows/ros-ci.yml @@ -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" - + 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 diff --git a/.github/workflows/ros-lint.yml b/.github/workflows/ros-lint.yml new file mode 100644 index 0000000..e259c6d --- /dev/null +++ b/.github/workflows/ros-lint.yml @@ -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: "*" diff --git a/turtlebot3_simulations_ci.repos b/turtlebot3_simulations_ci.repos index be0e451..bf70345 100644 --- a/turtlebot3_simulations_ci.repos +++ b/turtlebot3_simulations_ci.repos @@ -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