-
Notifications
You must be signed in to change notification settings - Fork 26
55 lines (47 loc) · 2.45 KB
/
ci.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI rmw_microxrcedds_c
on:
push:
branches:
- humble
- iron
- rolling
- jazzy
pull_request:
branches:
- '**'
jobs:
rmw_microxrcedds_ci:
runs-on: ubuntu-latest
container: microros/micro-ros-agent:jazzy
steps:
- uses: actions/checkout@v3
with:
path: src/rmw-microxrcedds
- name: Download dependencies
run: |
apt update && apt install -y python3-pip git python3-rosdep python3-colcon-common-extensions curl ros-$ROS_DISTRO-performance-test-fixture
git clone -b ros2 https://github.com/eProsima/Micro-CDR src/Micro-CDR
git clone -b ros2 https://github.com/eProsima/Micro-XRCE-DDS-Client src/Micro-XRCE-DDS-Client
git clone -b jazzy https://github.com/micro-ROS/rosidl_typesupport_microxrcedds src/rosidl_typesupport_microxrcedds
git clone -b jazzy https://github.com/ros2/rmw src/rmw
touch src/rosidl_typesupport_microxrcedds/test/COLCON_IGNORE
# Install coverage tools
apt install -y gcovr
. /opt/ros/$ROS_DISTRO/setup.sh
rosdep init && rosdep update
rosdep install --from-paths src -r
- name: Build
run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon build --symlink-install --cmake-args -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS="-ftest-coverage --coverage -fno-inline -fno-inline-small-functions -fno-default-inline" -DCMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON -DCMAKE_C_FLAGS="-ftest-coverage --coverage -fno-inline -fno-inline-small-functions -fno-default-inline" -DCMAKE_C_OUTPUT_EXTENSION_REPLACE=ON
- name: Test
run: |
. /opt/ros/$ROS_DISTRO/setup.sh && . /agent_ws/install/local_setup.sh && ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888 -d -v4 &
sleep 1
. /opt/ros/$ROS_DISTRO/setup.sh && . install/local_setup.sh
colcon test --event-handlers console_direct+ --packages-select=rmw_microxrcedds --return-code-on-test-failure
./build/rmw_microxrcedds/test/test-sizes 2> memanalisys_out
- name: Coverage
run: |
cd src/rmw-microxrcedds/
gcovr -x -r . -o coverage.xml ../../build --exclude-unreachable-branches --exclude rmw_microxrcedds_c/test
curl -s https://codecov.io/bash -o codecov.bash && chmod +x codecov.bash
./codecov.bash -t ${{ secrets.CODECOV_TOKEN }}