diff --git a/.github/workflows/Ci.yml b/.github/workflows/Ci.yml index 6b71baf041..4627b15839 100644 --- a/.github/workflows/Ci.yml +++ b/.github/workflows/Ci.yml @@ -66,10 +66,11 @@ jobs: - name: Install external dependencies # Install the multiple object tracking deps run: sudo bash /opt/carma/src/multiple_object_tracking/scripts/install_dependencies.sh - # TODO WIP Humble Upgrade: Remove after humble upgrade is done - - name: Read packages from file + + - name: Compile list of packages + # Get all packages in the respository run: | - PACKAGES=$(cat /opt/carma/src/${{ github.event.repository.name }}/.github/workflows/humble-upgraded-packages.txt) + PACKAGES=$(find ./src/carma-platform -maxdepth 2 -type f -name "package.xml" -exec sh -c 'grep -oPm1 "(?<=)[^<]+" "{}"' \; | cut -d/ -f1 | tr '\n' ' ' | sed 's/ $//') echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV - name: Build ROS2 diff --git a/Dockerfile b/Dockerfile index aeb304bea5..781ef2312f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,11 +39,12 @@ FROM ${DOCKER_ORG}/autoware.ai:${DOCKER_TAG} as base-image FROM base-image AS source-code RUN mkdir ~/src -COPY --chown=carma . /home/carma/src/carma-platform/ +COPY --chown=carma ./docker /home/carma/src/carma-platform/docker ARG GIT_BRANCH="develop" RUN ~/src/carma-platform/docker/checkout.bash -b ${GIT_BRANCH} +COPY --chown=carma . /home/carma/src/carma-platform # ///////////////////////////////////////////////////////////////////////////// # Stage 2 - Build and install the software # ///////////////////////////////////////////////////////////////////////////// diff --git a/carma_cloud_client/package.xml b/carma_cloud_client/package.xml index acf35cdafc..2b2c9d9e7b 100644 --- a/carma_cloud_client/package.xml +++ b/carma_cloud_client/package.xml @@ -39,10 +39,6 @@ j2735_convertor std_srvs - - - - ament_lint_auto ament_cmake_gtest diff --git a/docker/build-image.sh b/docker/build-image.sh index 3a87021b6f..8ccec43a8f 100755 --- a/docker/build-image.sh +++ b/docker/build-image.sh @@ -114,12 +114,12 @@ echo "Final image name: $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING" cd .. if [[ $COMPONENT_VERSION_STRING = "develop" ]]; then sed "s|usdotfhwastoldev/|$USERNAME/|g; s|usdotfhwastolcandidate/|$USERNAME/|g; s|usdotfhwastol/|$USERNAME/|g; s|:[0-9]*\.[0-9]*\.[0-9]*|:$COMPONENT_VERSION_STRING|g; s|checkout.bash|checkout.bash -d|g" \ - Dockerfile | docker build -f - --no-cache -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \ + Dockerfile | docker build -f - -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \ --build-arg VERSION="$COMPONENT_VERSION_STRING" \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` . elif [[ $COMPONENT_VERSION_STRING = "SNAPSHOT" ]]; then - docker build --network=host --no-cache -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \ + docker build --network=host -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \ --build-arg PACKAGES="$PACKAGES" \ --build-arg VERSION="$COMPONENT_VERSION_STRING" \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ @@ -128,7 +128,7 @@ else #The addition of --network=host was a fix for a DNS resolution error that occured #when running the platform inside an Ubuntu 20.04 virtual machine. The error and possible soliutions are # discussed here: https://github.com/moby/moby/issues/41003 - docker build --network=host --no-cache -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \ + docker build --network=host -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \ --build-arg VERSION="$COMPONENT_VERSION_STRING" \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` . diff --git a/docker/checkout.bash b/docker/checkout.bash index bdeddb145c..dc94d6392a 100755 --- a/docker/checkout.bash +++ b/docker/checkout.bash @@ -42,53 +42,16 @@ cd "${dir}"/src git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch "${BRANCH}" git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-utils.git --branch "${BRANCH}" git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-messenger.git --branch "${BRANCH}" -# Get humble branch of message filters which supports template Node arguments (foxy version supports rclcpp::Node only) git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-message-filters.git --branch "${BRANCH}" git clone --depth=1 https://github.com/usdot-fhwa-stol/multiple_object_tracking --branch "${BRANCH}" -git clone --depth=1 https://github.com/ros2/rosbag2 --branch humble - -# add astuff messages -# NOTE: The ibeo_msgs package is ignored because on build the cmake files in that package run a sed command -# which can make them incompatible with a new ros version after a source switch -git clone https://github.com/astuff/astuff_sensor_msgs - -cd astuff_sensor_msgs -git checkout 41d5ef0c33fb27eb3c9ba808b51332bcce186a83 - -# Disable ibeo_msgs -cd ibeo_msgs -echo "" > COLCON_IGNORE -cd ../astuff_sensor_msgs -echo "" > COLCON_IGNORE - -cd ../ - -# Clone the humble branch of ros2_tracing in order to enable certain analyses of CARMA Platform -# made possible through collected trace data, such as analyzing ROS 2 callback durations. -git clone -b humble https://github.com/ros2/ros2_tracing #rosbridge_suite is a ROS meta-package including all the rosbridge packages. # NOTE: clone -b flag is used instead of --branch to avoid hook rewriting it git clone -b ros2 https://github.com/usdot-fhwa-stol/rosbridge_suite - -# Novatel OEM7 Driver -# NOTE: This is required since otherwise this image will not contain the novatel_oem7_msgs package, and a missing ROS 2 message package -# can cause ROS 2 rosbag logging to fail in Foxy. -# Related GitHub discussion for fix that was not backported to Foxy: https://github.com/ros2/rosbag2/pull/858 -git clone https://github.com/novatel/novatel_oem7_driver.git "${dir}"/src/novatel_oem7_driver -b ros2-dev -# Checkout verified commit -cd "${dir}"/src/novatel_oem7_driver -git checkout 3055e220bb9715b59c3ef53ab0aba05a495d9d5 -# Ignore novatel_oem7_driver package; only novatel_oem7_msgs is required -cd "${dir}"/src/novatel_oem7_driver/src/novatel_oem7_driver -echo "" > COLCON_IGNORE -cd "${dir}"/src # TODO: Remove V2X-Hub Depedency (CAR-6029) git clone -b master --depth 1 https://github.com/etherealjoy/qhttpengine.git -git clone -b 7.6.0 --depth 1 https://github.com/usdot-fhwa-OPS/V2X-Hub.git +git clone -b 7.6.0 --depth 1 --sparse https://github.com/usdot-fhwa-OPS/V2X-Hub.git cd V2X-Hub -git config core.sparsecheckout true -git sparse-checkout init git sparse-checkout set ext/ccserver diff --git a/docker/install.sh b/docker/install.sh index d12f38c57e..396cb92c6e 100755 --- a/docker/install.sh +++ b/docker/install.sh @@ -20,8 +20,10 @@ set -e cd ~/carma_ws -echo "Installing multiple object tracking dependencies" -sudo ./src/multiple_object_tracking/scripts/install_dependencies.sh +if [[ -z "$PACKAGES" ]]; then + echo "Installing multiple object tracking dependencies" + sudo ./src/multiple_object_tracking/scripts/install_dependencies.sh +fi sudo mkdir -p /opt/carma # Create install directory sudo chown carma /opt/carma # Set owner to expose permissions for build