ros-tooling / setup-ros

Github Action to set up ROS 2 on hosts
Apache License 2.0
84 stars 39 forks source link

build failure for galactic: input has invalid distribution names #629

Closed berndpfrommer closed 10 months ago

berndpfrommer commented 10 months ago

Using action-ros-ci, building a repository works for all ROS2 distros but galactic. The error message indicates that the distribution name is invalid. But galactic should be available on ubuntu-20.04, no? Puzzled as to what the problem is.

Here is the error message:

  /usr/bin/sudo rosdep init
  Wrote /etc/ros/rosdep/sources.list.d/20-default.list
  Recommended: please run

    rosdep update

Error: Input has invalid distribution names.

And this is the relevant part of my workflow file. Works fine for "foxy", fails for "galactic":

 build_on_focal:
    name: build_focal_${{ matrix.distro }}
    runs-on: ubuntu-20.04
    strategy:
      fail-fast: false
      matrix:
        distro: [galactic, foxy]
    steps:
      - uses: actions/checkout@v3
        with:
          path: src/${{ inputs.repo }}
          fetch-depth: 0
      - uses: ros-tooling/setup-ros@v0.6
        with:
          required-ros-distributions: ${{ matrix.distro }}
      - uses: ros-tooling/action-ros-ci@v0.3
        with:
          target-ros2-distro: ${{ matrix.distro }}
          vcs-repo-file-url: ${{ inputs.vcs_url }}
          colcon-defaults: |
            {
              "build": {                                                                                                                                                                                      
                "cmake-args": [                                                                                                                                                                               
                    "-DCMAKE_BUILD_TYPE=RelWithDebInfo"                                                                                                                                                       
                ]                                                                                                                                                                                             
              }                                                                                                                                                                                               
            }                                                                                                                                                                                                 
christophebedard commented 10 months ago

The issue is that Galactic is now end-of-life, so setup-ros rejects it: https://github.com/ros-tooling/setup-ros/blob/7293e28bf57dab5b94b0c235cf13d654d7ede689/src/utils.ts#L27-L57.

You're using setup-ros@v0.6 which still allows using Foxy but not Galactic: https://github.com/ros-tooling/setup-ros/blob/v0.6/src/utils.ts#L47. You'll need to use a version of setup-ros that still supports both Foxy and Galactic, so v0.5. But you'll need to use a newer version for newer distros like Iron.

I know this is annoying, but given the somewhat limited resources/time we have, we've decided to drop support for EOL distros.

berndpfrommer commented 10 months ago

Thanks much for the quick reply. Indeed, dropping down to v0.5 did the trick! I am particularly fond of galactic because it allows both ROS1 and ROS2 installations from debian packages on the same platform (Ubuntu 20.04), which also happens to be the last OS version supported on my Xavier AGX. I understand the reasons for dropping support though.