Skip to content

Commit

Permalink
[CI] add linter CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthou committed Jun 9, 2024
1 parent 136a0de commit d391cef
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Clang linter

on: [push, workflow_dispatch]

jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
include:
- operating-system: ubuntu-22.04
ros_distro: humble
distro: jammy
env:
ROS_CI_DESKTOP: ${{ matrix.distro }}
CI_SOURCE_PATH: $(pwd)
ROS_DISTRO: ${{ matrix.ros_distro }}
steps:
- name: Setup ROS
uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.ros_distro }}

- name: Install deps
run: |
sudo apt install dpkg
sudo apt install -y qtbase5-dev qtdeclarative5-dev
sudo apt install -y libcppunit-dev libcurl4-openssl-dev
sudo apt-get install python3-rosdep
sudo apt install ros-cmake-modules
sudo apt install ros-$ROS_DISTRO-std-msgs ros-$ROS_DISTRO-pluginlib
sudo apt install g++-12
source /opt/ros/$ROS_DISTRO/setup.bash
- name: Setup Workspace
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
export CXX=clang++
export CC=clang
cmake --version
cd $GITHUB_WORKSPACE
mkdir -p ros2_ws/src/ontologenius
cd ros2_ws
colcon build --symlink-install
- name: Checkout
uses: actions/checkout@v4
with:
path: ros2_ws/src/ontologenius

- name: Build
run: |
cd $GITHUB_WORKSPACE/ros2_ws
source install/setup.bash
export ROS_LOCALHOST_ONLY=
export CXX=clang++
export CC=clang
colcon build --symlink-install
- name: Lint
run: |
cd $GITHUB_WORKSPACE/ros2_ws/src/ontologenius
ls
python3 .github/run_clang_tidy.py . ../../build/

0 comments on commit d391cef

Please sign in to comment.