linting #84
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: camera_ros build | |
on: | |
pull_request: | |
paths-ignore: | |
- "README.md" | |
jobs: | |
linting: | |
name: linting | |
runs-on: ubuntu-latest | |
container: | |
image: ros:rolling | |
strategy: | |
fail-fast: false | |
matrix: | |
linter: [cppcheck, cpplint, pclint, pyflakes, uncrustify] | |
include: | |
- {linter: flake8, args: "--ignore=Q000"} | |
- {linter: mypy} | |
- {linter: pep257, args: ""} | |
- {linter: pep8, args: ""} | |
- {linter: xmllint, args: ""} | |
- {linter: clang-format, args: "--config .clang-format"} | |
- {linter: clang-tidy, args: ""} | |
- {linter: lint-cmake, args: ""} | |
# - {linter: cppcheck, args: ""} | |
# - {linter: cpplint, args: ""} | |
# - {linter: pclint} | |
steps: | |
- name: system information | |
run: | | |
uname -sr | |
lsb_release -a | |
- uses: actions/checkout@v4 | |
- name: install rosdep | |
run: | | |
apt update | |
apt install python3-rosdep | |
apt install ros-rolling-ament-pep8 | |
- uses: ros-tooling/action-ros-lint@master | |
with: | |
package-name: camera_ros | |
linter: ${{ matrix.linter }} | |
arguments: ${{ matrix.args }} | |
build: | |
name: build (${{ matrix.distribution }}) | |
needs: linting | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- # latest LTS | |
version: 22.04 | |
distribution: humble | |
continue-on-error: ${{ matrix.distribution == 'rolling' }} | |
container: | |
image: ubuntu:${{ matrix.version }} | |
steps: | |
- name: fetch source | |
uses: actions/checkout@v4 | |
- name: install ROS2 ${{ matrix.distribution }} | |
uses: ros-tooling/setup-ros@v0.7 | |
- name: build and test | |
uses: ros-tooling/action-ros-ci@v0.3 | |
with: | |
package-name: camera_ros | |
target-ros2-distro: ${{ matrix.distribution }} | |
colcon-defaults: | | |
{ | |
"build": { | |
"mixin": ["asan-gcc", "tsan", "coverage-gcc", "memcheck"] | |
} | |
} | |
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/5d51dff38097e8c2bf46d7a5b804e65935aa7f47/index.yaml |