diff --git a/.github/workflows/ros2_ci.yml b/.github/workflows/ros2_ci.yml index 33bd344..1a368bc 100644 --- a/.github/workflows/ros2_ci.yml +++ b/.github/workflows/ros2_ci.yml @@ -17,19 +17,29 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Import ROS2 apt key + - name: Install system dependencies run: | sudo apt update sudo apt install -y curl gnupg lsb-release - curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o ros.key - sudo apt-key add ros.key - - name: Install ROS2 Humble dependencies + - name: Import ROS2 apt key + run: | + curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.key | sudo apt-key add - + + - name: Setup sources.list run: | sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list' + + - name: Install ROS2 Humble dependencies + run: | sudo apt update sudo apt install -y python3-colcon-common-extensions python3-rosdep python3-vcstool - sudo rosdep init + + - name: Initialize rosdep + run: | + if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then + sudo rosdep init + fi rosdep update - name: Install package dependencies