From 29d1c97781f2e55cd3c6e320789096f9e5c41b83 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 3 Sep 2021 14:57:05 +0200 Subject: [PATCH] Always install Gazebo 11 in apt CI to fix Unstable CI (#873) --- .ci/install_debian.sh | 19 +++++++++++++++++-- cmake/ProjectsTagsUnstable.cmake | 1 - scripts/install_apt_dependencies.sh | 5 ++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.ci/install_debian.sh b/.ci/install_debian.sh index f1a7d10c4..1baaa0a25 100755 --- a/.ci/install_debian.sh +++ b/.ci/install_debian.sh @@ -21,5 +21,20 @@ apt-get install -y python3-dev python3-numpy python3-pybind11 pybind11-dev # Octave apt-get install -y liboctave-dev -# Gazebo (use distro packages to support both Ubuntu and Debian) -apt-get install -y libgazebo*-dev +# Gazebo +lsb_dist="$(. /etc/os-release && echo "$ID")" +dist_version="$(lsb_release -c | cut -d: -f2 | sed s/'^\t'//)" +echo "lsb_dist: ${lsb_dist}" +echo "dist_version: ${dist_version}" +# bullseye is not supported by OpenRobotics' repo, but it has already +# the right version of Gazebo in its repo, so we just skip everything +if [[ ("sid" != "$dist_version" && "bullseye" != "$dist_version") ]]; then + mkdir -p /etc/apt/sources.list.d + echo deb http://packages.osrfoundation.org/gazebo/$lsb_dist\-stable $dist_version main > /etc/apt/sources.list.d/gazebo-stable.list + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 + apt-get update + apt-get install -y libgazebo11-dev +else + apt-get install -y libgazebo-dev +fi + diff --git a/cmake/ProjectsTagsUnstable.cmake b/cmake/ProjectsTagsUnstable.cmake index e89607ba8..5c0d172d4 100644 --- a/cmake/ProjectsTagsUnstable.cmake +++ b/cmake/ProjectsTagsUnstable.cmake @@ -34,4 +34,3 @@ set_tag(YARP_telemetry_TAG master) set_tag(gym-ignition_TAG master) # Workaround for https://github.com/robotology/robotology-superbuild/pull/844#issuecomment-893293323 set_tag(walking-teleoperation_TAG devel) - diff --git a/scripts/install_apt_dependencies.sh b/scripts/install_apt_dependencies.sh index 4db9ba202..568e14186 100755 --- a/scripts/install_apt_dependencies.sh +++ b/scripts/install_apt_dependencies.sh @@ -15,7 +15,10 @@ ROBSUP_DISTRO_NAME=$(lsb_release -i | cut -d: -f2 | sed s/'^\t'//) ROBSUP_DISTRO_VERSION=$(lsb_release -r | cut -d: -f2 | sed s/'^\t'//) ROBSUP_DISTRO_CODENAME=$(lsb_release -c | cut -d: -f2 | sed s/'^\t'//) -if [[ ("$ROBSUP_DISTRO_NAME" == "Ubuntu" && "$ROBSUP_DISTRO_VERSION" == "22.04") || ("$ROBSUP_DISTRO_NAME" == "Debian" && "$ROBSUP_DISTRO_CODENAME" == "bullseye") || ("$ROBSUP_DISTRO_NAME" == "Debian" && "$ROBSUP_DISTRO_CODENAME" == "bookworm") ]] +echo "ROBSUP_DISTRO_NAME: ${ROBSUP_DISTRO_NAME}" +echo "ROBSUP_DISTRO_VERSION: ${ROBSUP_DISTRO_VERSION}" +echo "ROBSUP_DISTRO_CODENAME: ${ROBSUP_DISTRO_CODENAME}" +if [[ ("$ROBSUP_DISTRO_NAME" == "Ubuntu" && "$ROBSUP_DISTRO_VERSION" == "22.04") || ("$ROBSUP_DISTRO_NAME" == "Debian" && "$ROBSUP_DISTRO_CODENAME" == "bullseye") || ("$ROBSUP_DISTRO_NAME" == "Debian" && "$ROBSUP_DISTRO_CODENAME" == "bookworm") || ("$ROBSUP_DISTRO_NAME" == "Debian" && "$ROBSUP_DISTRO_CODENAME" == "sid") ]] then apt-get install -y libdc1394-dev else