-
Notifications
You must be signed in to change notification settings - Fork 2
165 lines (135 loc) · 5.42 KB
/
ci.yml
File metadata and controls
165 lines (135 loc) · 5.42 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
repository_dispatch:
types: [ros2_medkit_updated]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check for trailing whitespace
run: |
! git grep -I --line-number --perl-regexp '\s+$' -- \
'*.md' '*.py' '*.yaml' '*.yml' || \
(echo "Found trailing whitespace in the files above" && exit 1)
- name: Check shell scripts with shellcheck
run: |
sudo apt-get update && sudo apt-get install -y shellcheck
find . \( -name "*.sh" -o -name "*.bash" \) -type f | xargs shellcheck
- name: Validate YAML files
run: |
sudo apt-get update && sudo apt-get install -y yamllint
YAMLLINT_CONFIG="{extends: relaxed, rules: {line-length: {max: 120}}}"
find . \( -name "*.yaml" -o -name "*.yml" \) -type f | xargs yamllint -d "$YAMLLINT_CONFIG"
build-and-test-sensor:
runs-on: ubuntu-24.04
steps:
- name: Show triggering source
if: github.event_name == 'repository_dispatch'
run: |
SHA="${{ github.event.client_payload.sha }}"
RUN_URL="${{ github.event.client_payload.run_url }}"
echo "## Triggered by ros2_medkit" >> "$GITHUB_STEP_SUMMARY"
echo "- Commit: \`${SHA:-unknown}\`" >> "$GITHUB_STEP_SUMMARY"
if [ -n "$RUN_URL" ]; then
echo "- Run: [View triggering run]($RUN_URL)" >> "$GITHUB_STEP_SUMMARY"
else
echo "- Run: (URL not provided)" >> "$GITHUB_STEP_SUMMARY"
fi
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and start sensor_diagnostics demo
working-directory: demos/sensor_diagnostics
run: docker compose --profile ci up -d --build sensor-demo-ci
- name: Run smoke tests
run: ./tests/smoke_test.sh
- name: Show container logs on failure
if: failure()
working-directory: demos/sensor_diagnostics
run: docker compose --profile ci logs sensor-demo-ci --tail=200
- name: Teardown
if: always()
working-directory: demos/sensor_diagnostics
run: docker compose --profile ci down
build-and-test-turtlebot:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and start turtlebot3 demo
working-directory: demos/turtlebot3_integration
run: docker compose --profile ci up -d --build turtlebot3-demo-ci
- name: Run smoke tests
run: ./tests/smoke_test_turtlebot3.sh
- name: Show container logs on failure
if: failure()
working-directory: demos/turtlebot3_integration
run: docker compose --profile ci logs turtlebot3-demo-ci --tail=200
- name: Teardown
if: always()
working-directory: demos/turtlebot3_integration
run: docker compose --profile ci down
build-and-test-moveit:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and start moveit demo
working-directory: demos/moveit_pick_place
run: docker compose --profile ci up -d --build moveit-demo-ci
- name: Run smoke tests
run: ./tests/smoke_test_moveit.sh
- name: Show container logs on failure
if: failure()
working-directory: demos/moveit_pick_place
run: docker compose --profile ci logs moveit-demo-ci --tail=200
- name: Teardown
if: always()
working-directory: demos/moveit_pick_place
run: docker compose --profile ci down
build-and-test-multi-ecu:
needs: lint
runs-on: ubuntu-24.04
steps:
- name: Show triggering source
if: github.event_name == 'repository_dispatch'
run: |
SHA="${{ github.event.client_payload.sha }}"
RUN_URL="${{ github.event.client_payload.run_url }}"
echo "## Triggered by ros2_medkit" >> "$GITHUB_STEP_SUMMARY"
echo "- Commit: \`${SHA:-unknown}\`" >> "$GITHUB_STEP_SUMMARY"
if [ -n "$RUN_URL" ]; then
echo "- Run: [View triggering run]($RUN_URL)" >> "$GITHUB_STEP_SUMMARY"
else
echo "- Run: (URL not provided)" >> "$GITHUB_STEP_SUMMARY"
fi
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and start multi-ECU demo
working-directory: demos/multi_ecu_aggregation
run: docker compose --profile ci up -d --build perception-ecu-ci planning-ecu-ci actuation-ecu-ci
- name: Run smoke tests
run: ./tests/smoke_test_multi_ecu.sh
- name: Show perception ECU logs on failure
if: failure()
working-directory: demos/multi_ecu_aggregation
run: docker compose --profile ci logs perception-ecu-ci --tail=200
- name: Show planning ECU logs on failure
if: failure()
working-directory: demos/multi_ecu_aggregation
run: docker compose --profile ci logs planning-ecu-ci --tail=200
- name: Show actuation ECU logs on failure
if: failure()
working-directory: demos/multi_ecu_aggregation
run: docker compose --profile ci logs actuation-ecu-ci --tail=200
- name: Teardown
if: always()
working-directory: demos/multi_ecu_aggregation
run: docker compose --profile ci down