-
Notifications
You must be signed in to change notification settings - Fork 1.1k
42 lines (36 loc) · 1.15 KB
/
ros-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 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/[email protected]
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.ros
key: ${{ runner.os }}-ros-${{ matrix.linter }}-${{ hashFiles('**/package.xml') }}
restore-keys: |
${{ runner.os }}-ros-${{ matrix.linter }}-
- name: Run Linter
uses: ros-tooling/action-ros-lint@master
with:
linter: ${{ matrix.linter }}
distribution: rolling
package-name: turtlebot3
- name: Post job cleanup
if: failure()
run: echo "Cleaning up after failure"