Repository navigation
executable file
·90 lines (88 loc) · 3.31 KB
/
Copy pathci.yml
File metadata and controls
executable file
·90 lines (88 loc) · 3.31 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
name: micro-ROS HIL tests
on:
workflow_dispatch:
inputs:
name:
description: "Manual trigger"
schedule:
- cron: '00 6 * * *'
jobs:
micro_ros_renesas_testbench:
strategy:
fail-fast: false
matrix:
include:
- ros_distribution: humble
branch: humble
board_id: 19
- ros_distribution: jazzy
branch: jazzy
board_id: 20
- ros_distribution: rolling
branch: rolling
board_id: 21
runs-on: rpi-ros2-${{ matrix.ros_distribution }}-${{ matrix.board_id }}
timeout-minutes: 240
steps:
- name: Runner health
run: |
uptime
free -h
swapon --show
df -h . /dev/shm
# Clean shm segments (RAM) in /dev/shm left by previous runs killed by a crash, timeout or cancellation
- name: Clean stale Fast DDS shared memory
run: |
source /opt/ros/${{ matrix.ros_distribution }}/setup.sh
fastdds shm clean || true
du -sh /dev/shm
- name: Create ROS 2 workspace
run: |
rm -rf ros_ws/src ros_ws/log
mkdir -p ros_ws/src
- uses: actions/checkout@v4
with:
path: ros_ws/src/micro_ros_renesas_testbench
submodules: recursive
ref: ${{ matrix.branch }}
- name: Download dependencies
run: |
cd ros_ws
vcs import --force --shallow --input src/micro_ros_renesas_testbench/requirements.repos src
- name: Build micro-ROS library
timeout-minutes: 90
run: |
bash ros_ws/src/micro_ros_renesas_testbench/test/micro_ros_renesas_testbench/scripts/build_microros.sh
- name: Build and run tests
timeout-minutes: 60
env:
# The runners have 4 GB of RAM and no swap, compiling the tests with one job per core can run
# out of memory, which stalls the board and takes the runner offline
MAKEFLAGS: "-j2"
run: |
source /opt/ros/${{ matrix.ros_distribution }}/setup.sh
cd ros_ws
source install/local_setup.bash
colcon build --cmake-clean-cache --cmake-force-configure --packages-select micro_ros_renesas_testbench
# colcon test --event-handlers console_direct+ --packages-select=micro_ros_renesas_testbench --return-code-on-test-failure --ctest-args -E "(cpplint)|(lint_cmake)|(uncrustify)|(xmllint)"
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ./build/micro_ros_renesas_testbench/micro_ros_renesas_testbench_test --gtest_filter=-HardwareTestMemoryProfiling*:*ThroughputTest*:*BenchmarkTestAllTransports*
- name: Run profiling
timeout-minutes: 60
run: |
source /opt/ros/${{ matrix.ros_distribution }}/setup.sh
cd ros_ws
source install/local_setup.bash
rm -rf *.txt
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ./build/micro_ros_renesas_testbench/micro_ros_renesas_testbench_test --gtest_filter=HardwareTestMemoryProfiling*:*ThroughputTest*:*BenchmarkTestAllTransports*
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: benchmark-results-${{ matrix.ros_distribution }}-${{ matrix.board_id }}
path: ros_ws/*.txt
- name: Post-run cleanup
if: always()
run: |
source /opt/ros/${{ matrix.ros_distribution }}/setup.sh
fastdds shm clean || true
du -sh /dev/shm
free -h