Skip to content

Commit 628ed22

Browse files
committed
split jobs
1 parent 6243299 commit 628ed22

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/main.yaml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,23 @@ on:
66
push:
77

88
jobs:
9-
build_and_run:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Install clang-format
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install -y clang-format
19+
20+
- name: Check formatting
21+
run: |
22+
find src -iname *.h -o -iname *.hpp -o -iname *.cpp -o -iname *.c | xargs clang-format --dry-run --Werror
23+
24+
build:
25+
needs: lint
1026
runs-on: ubuntu-22.04
1127
container:
1228
image: ros:humble-ros-base
@@ -65,15 +81,6 @@ jobs:
6581
6682
# Install dependencies from all packages in src/
6783
rosdep install --from-paths src --ignore-src -r -y
68-
69-
- name: Install clang-format
70-
run: |
71-
apt-get update
72-
apt-get install -y clang-format
73-
74-
- name: Check formatting
75-
run: |
76-
find src -iname *.h -o -iname *.hpp -o -iname *.cpp -o -iname *.c | xargs clang-format --dry-run --Werror
7784
7885
- name: Build with colcon
7986
shell: bash

0 commit comments

Comments
 (0)