-
Notifications
You must be signed in to change notification settings - Fork 38
84 lines (83 loc) · 3.84 KB
/
main.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
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
name: drake-ros continuous integration
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
test_against_debs:
if: "! contains(github.event.pull_request.labels.*.name, 'status: defer ci')"
strategy:
matrix:
include:
# TODO : Include rolling later if available on jammy or noble.
- os_code_name: jammy
ros_distro: humble
name: test_against_${{matrix.ros_distro}}_debs
runs-on: ubuntu-latest
container:
image: robotlocomotion/drake:${{matrix.os_code_name}}
env:
PYTHONPATH:
steps:
- uses: actions/checkout@v4
- name: Simplify apt upgrades
run: $GITHUB_WORKSPACE/.github/simplify_apt_and_upgrades.sh
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{matrix.ros_distro}}
use-ros2-testing: "true"
- name: Cope with Python 2 pollution
run: apt-get update && apt-get install -y python-is-python3
- name: Build and test all packages
uses: ros-tooling/[email protected]
with:
target-ros2-distro: ${{matrix.ros_distro}}
test_against_archive:
if: "! contains(github.event.pull_request.labels.*.name, 'status: defer ci')"
strategy:
matrix:
include:
# TODO : Include rolling later if available on jammy or noble.
- os_code_name: jammy
ros_distro: humble
name: test_against_${{matrix.ros_distro}}_archive
runs-on: ubuntu-latest
container:
image: robotlocomotion/drake:${{matrix.os_code_name}}
env:
PYTHONPATH:
steps:
- uses: actions/checkout@v4
- name: Simplify apt upgrades
run: $GITHUB_WORKSPACE/.github/simplify_apt_and_upgrades.sh
- uses: ros-tooling/[email protected]
- name: Install dependencies to build ROS packages
run: |
sudo mkdir -p /opt/ros/${{matrix.ros_distro}}
wget -q https://repo.ros2.org/ci_archives/nightly-cyclonedds/ros2-${{matrix.ros_distro}}-linux-${{matrix.os_code_name}}-amd64-ci-CHECKSUM
wget -q http://repo.ros2.org/ci_archives/nightly-cyclonedds/ros2-${{matrix.ros_distro}}-linux-${{matrix.os_code_name}}-amd64-ci.tar.bz2
sha256sum -c ros2-${{matrix.ros_distro}}-linux-${{matrix.os_code_name}}-amd64-ci-CHECKSUM
sudo tar xf ros2-${{matrix.ros_distro}}-linux-${{matrix.os_code_name}}-amd64-ci.tar.bz2 --strip-components=1 -C /opt/ros/${{matrix.ros_distro}}
sed -i 's|/tmp/ws/install_isolated|/opt/ros/${{matrix.ros_distro}}|g' /opt/ros/${{matrix.ros_distro}}/setup.sh
rm ros2-${{matrix.ros_distro}}-linux-${{matrix.os_code_name}}-amd64-ci.tar.bz2
# TODO(sloretz) Use bazel_ros2_rules/ros2/compute_system_rosdeps.py to de-duplicate rosdep invocation knowledge
SHARE_DIRS=`find /opt/ros/${{matrix.ros_distro}} -maxdepth 2 -name share -type d`
# TODO(sloretz) remove --skip-keys for rosbag2_performance_benchmarking_msgs when https://github.com/ros2/rosbag2/pull/1242 lands
rosdep update && rosdep install --from-paths $SHARE_DIRS . --ignore-src -y \
-t exec -t buildtool_export -t build_export \
--skip-keys "cyclonedds fastcdr fastrtps rmw_connextdds rmw_cyclonedds_cpp rmw_fastrtps_dynamic_cpp rti-connext-dds-5.3.1 urdfdom_headers iceoryx_binding_c rosidl_typesupport_fastrtps_c rosidl_typesupport_fastrtps_cpp rosbag2_performance_benchmarking_msgs"
- name: Cope with Python 2 pollution
run: apt-get update && apt-get install -y python-is-python3
- name: Build all packages
run: |
. /opt/ros/${{matrix.ros_distro}}/setup.sh
colcon build --event-handlers console_cohesion+
- name: Test all packages
run: |
. /opt/ros/${{matrix.ros_distro}}/setup.sh
colcon test --event-handlers console_cohesion+