-
Notifications
You must be signed in to change notification settings - Fork 78
34 lines (31 loc) · 1.13 KB
/
format.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
# This is a format job. Pre-commit has a first-party GitHub action, so we use
# that: https://github.com/pre-commit/action
name: format
on:
workflow_dispatch:
pull_request:
push:
jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install clang-format-10
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-get install clang-format-10
- name: Install catkin-lint
run: |
lsb_release -sc
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-get -q update
sudo apt-get -q install python3-rosdep
sudo rm -rf /etc/ros/rosdep/sources.list.d/*
sudo rosdep init
rosdep update
sudo apt-get -q install catkin-lint
export ROS_DISTRO=noetic
- uses: pre-commit/[email protected]