@@ -36,26 +36,44 @@ jobs:
3636
3737 ros :
3838 name : ROS build and test (${{ matrix.ros_distro }})
39- runs-on : ${{ matrix.runner }}
39+ runs-on : ubuntu-latest
40+ container :
41+ image : ros:${{ matrix.ros_image }}
42+ env :
43+ DEBIAN_FRONTEND : noninteractive
4044 strategy :
4145 fail-fast : false
4246 matrix :
4347 include :
4448 - ros_distro : humble
45- runner : ubuntu-22.04
49+ ros_image : humble-ros-base-jammy
4650 - ros_distro : jazzy
47- runner : ubuntu-24.04
51+ ros_image : jazzy-ros-base-noble
52+ - ros_distro : kilted
53+ ros_image : kilted-ros-base-noble
54+ - ros_distro : lyrical
55+ ros_image : lyrical-ros-base-resolute
56+ - ros_distro : rolling
57+ ros_image : rolling-ros-base
4858 steps :
59+ - name : Install checkout dependencies
60+ run : |
61+ apt-get update
62+ apt-get install -y --no-install-recommends \
63+ ca-certificates \
64+ cargo \
65+ git \
66+ python3-colcon-common-extensions \
67+ python3-rosdep
68+
4969 - name : Checkout repository
5070 uses : actions/checkout@v6
5171
52- - name : Set up ROS
53- uses : ros-tooling/setup-ros@v0.7
54- with :
55- required-ros-distributions : ${{ matrix.ros_distro }}
56-
5772 - name : Install package dependencies
5873 run : |
74+ if [ ! -e /etc/ros/rosdep/sources.list.d/20-default.list ]; then
75+ rosdep init
76+ fi
5977 rosdep update
6078 rosdep install --from-paths . --ignore-src --rosdistro ${{ matrix.ros_distro }} -y
6179
6583 source /opt/ros/${{ matrix.ros_distro }}/setup.bash
6684 colcon build --packages-up-to rosidl_generator_rs_tests --event-handlers console_direct+
6785
86+ - name : Check Rust keyword escaping
87+ shell : bash
88+ run : |
89+ source /opt/ros/${{ matrix.ros_distro }}/setup.bash
90+ source install/setup.bash
91+ python3 - <<'PY'
92+ from rosidl_generator_rs import get_rs_name
93+
94+ for keyword in ('try', 'type', 'const', 'async', 'match'):
95+ assert get_rs_name(keyword) == f'{keyword}_'
96+
97+ assert get_rs_name('plain_field') == 'plain_field'
98+ PY
99+
68100 - name : Test package
69101 shell : bash
70102 run : |
0 commit comments