Skip to content

Commit d29656c

Browse files
committed
Use workflow_call to organize CI sensically
1 parent b6de492 commit d29656c

File tree

6 files changed

+49
-61
lines changed

6 files changed

+49
-61
lines changed

.github/workflows/ci.yaml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ jobs:
8686
sudo rm -rf /usr/local
8787
df -h
8888
- uses: actions/checkout@v4
89-
# NOTE: Testspace is temporarily disabled and needs to be installed for the MoveIt org
90-
# See: https://github.com/moveit/moveit2/issues/2852
91-
# - uses: testspace-com/setup-testspace@v1
92-
# if: github.repository == 'moveit/moveit2'
93-
# with:
94-
# domain: moveit
89+
# NOTE: Testspace is temporarily disabled and needs to be installed for the MoveIt org
90+
# See: https://github.com/moveit/moveit2/issues/2852
91+
# - uses: testspace-com/setup-testspace@v1
92+
# if: github.repository == 'moveit/moveit2'
93+
# with:
94+
# domain: moveit
9595
- name: Get latest release date for rosdistro
9696
id: rosdistro_release_date
9797
uses: JafarAbdi/latest-rosdistro-release-date-action@main
@@ -145,12 +145,12 @@ jobs:
145145
name: Run industrial_ci
146146
uses: ros-industrial/industrial_ci@master
147147
env: ${{ matrix.env }}
148-
# NOTE: Testspace is temporarily disabled and needs to be installed for the MoveIt org
149-
# See: https://github.com/moveit/moveit2/issues/2852
150-
# - name: Push result to Testspace
151-
# if: always() && (github.repository == 'moveit/moveit2')
152-
# run: |
153-
# testspace "[ ${{ matrix.env.IMAGE }} ]${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml"
148+
# NOTE: Testspace is temporarily disabled and needs to be installed for the MoveIt org
149+
# See: https://github.com/moveit/moveit2/issues/2852
150+
# - name: Push result to Testspace
151+
# if: always() && (github.repository == 'moveit/moveit2')
152+
# run: |
153+
# testspace "[ ${{ matrix.env.IMAGE }} ]${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml"
154154
- name: Upload test artifacts (on failure)
155155
uses: actions/upload-artifact@v4
156156
if: failure() && (steps.ici.outputs.run_target_test || steps.ici.outputs.target_test_results)
@@ -184,3 +184,13 @@ jobs:
184184
sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete
185185
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src
186186
du -sh ${{ env.BASEDIR }}/target_ws
187+
docker:
188+
uses: ./docker.yaml
189+
docker_lint:
190+
uses: ./docker_lint.yaml
191+
format:
192+
uses: ./format.yaml
193+
sonar:
194+
uses: ./sonar.yaml
195+
tutorial_docker:
196+
uses: ./tutorial_docker.yaml

.github/workflows/docker.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,9 @@ name: docker
33
on:
44
schedule:
55
# 5 PM UTC every Sunday
6-
- cron: '0 17 * * 6'
6+
- cron: "0 17 * * 6"
77
workflow_dispatch:
8-
push:
9-
branches:
10-
- main
11-
pull_request:
12-
paths:
13-
- .docker/**
14-
- .github/workflows/docker.yaml
15-
- moveit2.repos
8+
workflow_call:
169

1710
jobs:
1811
release:
@@ -156,7 +149,7 @@ jobs:
156149
username: ${{ secrets.DOCKERHUB_USERNAME }}
157150
password: ${{ secrets.DOCKERHUB_TOKEN }}
158151
- name: "Remove .dockerignore"
159-
run: rm .dockerignore # enforce full source context
152+
run: rm .dockerignore # enforce full source context
160153
- name: Build and Push
161154
uses: docker/build-push-action@v6
162155
with:

.github/workflows/docker_lint.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@ name: Docker Lint
22

33
on:
44
workflow_dispatch:
5-
push:
6-
paths:
7-
- .docker/**
8-
- .github/workflows/docker_lint.yaml
9-
pull_request:
10-
paths:
11-
- .docker/**
12-
- .github/workflows/docker_lint.yaml
5+
workflow_call:
136

147
jobs:
158
docker-lint:

.github/workflows/format.yaml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,23 @@ name: Formatting (pre-commit)
55

66
on:
77
workflow_dispatch:
8-
pull_request:
9-
merge_group:
10-
push:
11-
branches:
12-
- main
8+
workflow_call:
139

1410
jobs:
1511
pre-commit:
1612
name: Format
1713
runs-on: ubuntu-22.04
1814
steps:
19-
- uses: actions/checkout@v4
20-
- uses: actions/setup-python@v6
21-
with:
22-
python-version: 3.x
23-
- name: Install clang-format-14
24-
run: sudo apt-get install clang-format-14
25-
- uses: pre-commit/action@v3.0.1
26-
id: precommit
27-
- name: Upload pre-commit changes
28-
if: failure() && steps.precommit.outcome == 'failure'
29-
uses: rhaschke/upload-git-patch-action@main
30-
with:
31-
name: pre-commit
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v6
17+
with:
18+
python-version: 3.x
19+
- name: Install clang-format-14
20+
run: sudo apt-get install clang-format-14
21+
- uses: pre-commit/action@v3.0.1
22+
id: precommit
23+
- name: Upload pre-commit changes
24+
if: failure() && steps.precommit.outcome == 'failure'
25+
uses: rhaschke/upload-git-patch-action@main
26+
with:
27+
name: pre-commit

.github/workflows/sonar.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: SonarScan
55

66
on:
7-
push:
7+
workflow_call:
88

99
jobs:
1010
default:
@@ -56,11 +56,11 @@ jobs:
5656
sudo rm -rf /usr/local
5757
df -h
5858
- uses: actions/checkout@v4
59-
# Testspace disabled temporarily: https://github.com/moveit/moveit2/issues/2852
60-
# - uses: testspace-com/setup-testspace@v1
61-
# if: github.repository == 'moveit/moveit2'
62-
# with:
63-
# domain: ros-planning
59+
# Testspace disabled temporarily: https://github.com/moveit/moveit2/issues/2852
60+
# - uses: testspace-com/setup-testspace@v1
61+
# if: github.repository == 'moveit/moveit2'
62+
# with:
63+
# domain: ros-planning
6464
- name: Get latest release date for rosdistro
6565
id: rosdistro_release_date
6666
uses: JafarAbdi/latest-rosdistro-release-date-action@main

.github/workflows/tutorial_docker.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ name: "Tutorial Docker Images"
33
on:
44
schedule:
55
# 5 PM UTC every Sunday
6-
- cron: '0 17 * * 6'
6+
- cron: "0 17 * * 6"
77
workflow_dispatch:
8-
pull_request:
9-
merge_group:
10-
push:
11-
branches:
12-
- main
8+
workflow_call:
139

1410
jobs:
1511
tutorial-source:
@@ -44,7 +40,7 @@ jobs:
4440
username: ${{ secrets.DOCKERHUB_USERNAME }}
4541
password: ${{ secrets.DOCKERHUB_TOKEN }}
4642
- name: "Remove .dockerignore"
47-
run: rm .dockerignore # enforce full source context
43+
run: rm .dockerignore # enforce full source context
4844
- name: Cache ccache
4945
uses: actions/cache@v4
5046
with:

0 commit comments

Comments
 (0)