Skip to content

Commit f92db8f

Browse files
Noble is now supported by setup-ros
1 parent dafa9a6 commit f92db8f

File tree

1 file changed

+22
-45
lines changed

1 file changed

+22
-45
lines changed

.github/workflows/reusable-build-coverage.yml

+22-45
Original file line numberDiff line numberDiff line change
@@ -29,61 +29,38 @@ jobs:
2929
DEBIAN_FRONTEND=noninteractive apt update && apt upgrade -y
3030
apt install -y sudo apt-utils
3131
echo "need_node=$(command -v node >/dev/null 2>&1 && echo 0 || echo 1)" >> $GITHUB_OUTPUT
32-
echo "need_python=$(command -v python3 >/dev/null 2>&1 && echo 0 || echo 1)" >> $GITHUB_OUTPUT
33-
echo "need_rosdep=$(command -v rosdep >/dev/null 2>&1 && echo 0 || echo 1)" >> $GITHUB_OUTPUT
34-
echo "need_ros=$(if [ -d "/opt/ros/${{ inputs.ros_distro }}" ]; then echo 0; else echo 1; fi)" >> $GITHUB_OUTPUT
3532
3633
# needed for github actions, and only if a bare ubuntu image is used
37-
# Consider switching to https://github.com/actions/setup-node when it works
38-
# https://github.com/nektos/act/issues/973
39-
# - uses: actions/setup-node@v4
40-
# if: ${{ steps.prereq.outputs.need_node == '1' }}
41-
# with:
42-
# node-version: 16
34+
- uses: actions/setup-node@v4
35+
if: ${{ steps.prereq.outputs.need_node == '1' && !env.ACT }}
36+
# with:
37+
# node-version: 16
4338
- name: Install node
44-
if: ${{ steps.prereq.outputs.need_node == '1' }}
39+
# Consider switching to https://github.com/actions/setup-node when it works
40+
# https://github.com/nektos/act/issues/973
41+
if: ${{ steps.prereq.outputs.need_node == '1' && env.ACT }}
42+
43+
# - name: Temporary fix for rolling@jammy by setting the ROSDISTRO_INDEX_URL
44+
# # see https://docs.ros.org/en/rolling/How-To-Guides/Using-Custom-Rosdistro.html
45+
# run: |
46+
# if [[ "${{ inputs.ros_distro }}" == "rolling" ]]; then
47+
# sudo sed -i "s|ros\/rosdistro\/master|ros\/rosdistro\/rolling\/2024-02-28|" /etc/ros/rosdep/sources.list.d/20-default.list
48+
# echo "ROSDISTRO_INDEX_URL=https://raw.githubusercontent.com/ros/rosdistro/rolling/2024-02-28/index-v4.yaml" >> $GITHUB_ENV
49+
# fi
50+
# - name: Test some rosdep commands to see if the step above worked
51+
# run: |
52+
# rosdep update
53+
# echo "ROS_DISTRO: $ROS_DISTRO"
54+
# rosdep resolve test_msgs std_msgs || true
55+
# rosdep resolve test_msgs std_msgs --os=ubuntu:jammy --rosdistro=rolling
56+
4557
run: |
4658
apt install -y curl
4759
curl -sS https://webi.sh/node | sh
4860
echo ~/.local/opt/node/bin >> $GITHUB_PATH
4961
50-
# not working for noble yet
51-
# - uses: actions/setup-python@v5
52-
# with:
53-
# python-version: '3.11'
54-
# needed only if a bare ubuntu image is used
55-
- name: Install python
56-
if: ${{ steps.prereq.outputs.need_python == '1' }}
57-
run: |
58-
DEBIAN_FRONTEND=noninteractive apt install -y python3-pip
59-
60-
# why is this necessary for ros:rolling-ros-core-noble?
61-
# and why does this not work with setup-ros?
62-
- name: Install ros-dev-tools
63-
if: ${{ steps.prereq.outputs.need_rosdep == '1' }}
64-
run: |
65-
apt install -y ros-dev-tools \
66-
python3-colcon-common-extensions python3-colcon-mixin python3-colcon-coveragepy-result
67-
rosdep init
68-
6962
# needed only if a non-ros image is used
7063
- uses: ros-tooling/[email protected]
71-
if: ${{ steps.prereq.outputs.need_ros == '1' }}
72-
73-
# - name: Temporary fix for rolling@jammy by setting the ROSDISTRO_INDEX_URL
74-
# # see https://docs.ros.org/en/rolling/How-To-Guides/Using-Custom-Rosdistro.html
75-
# run: |
76-
# if [[ "${{ inputs.ros_distro }}" == "rolling" ]]; then
77-
# sudo sed -i "s|ros\/rosdistro\/master|ros\/rosdistro\/rolling\/2024-02-28|" /etc/ros/rosdep/sources.list.d/20-default.list
78-
# echo "ROSDISTRO_INDEX_URL=https://raw.githubusercontent.com/ros/rosdistro/rolling/2024-02-28/index-v4.yaml" >> $GITHUB_ENV
79-
# fi
80-
# - name: Test some rosdep commands to see if the step above worked
81-
# run: |
82-
# rosdep update
83-
# echo "ROS_DISTRO: $ROS_DISTRO"
84-
# rosdep resolve test_msgs std_msgs || true
85-
# rosdep resolve test_msgs std_msgs --os=ubuntu:jammy --rosdistro=rolling
86-
8764
- uses: actions/checkout@v4
8865
- id: package_list_action
8966
uses: ros-controls/ros2_control_ci/.github/actions/set-package-list@master

0 commit comments

Comments
 (0)