From e31f5a3fa1077eb16201d9c23b63cbc2ba1f278d Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Wed, 6 Mar 2024 16:07:05 +0100 Subject: [PATCH] Implement GitHub action testing and remove Dockerfile manual procedure Signed-off-by: Jose Luis Rivero --- .github/workflows/ci.yaml | 39 +++++++++++++++++++++++++++++ Dockerfile.cmake_dpkg_flags | 49 ------------------------------------- README.md | 11 --------- 3 files changed, 39 insertions(+), 60 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 Dockerfile.cmake_dpkg_flags diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..18aa16d --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,39 @@ +name: drake colcon ws + +on: + push: + +jobs: + build_testing: + runs-on: ubuntu-22.04 + steps: + - uses: ros-tooling/setup-ros@v0.7 + with: + required-ros-distributions: rolling + - uses: ros-tooling/action-ros-ci@v0.3 + with: + package-name: drake + target-ros2-distro: rolling + skip-tests: true + colcon-defaults: | + { + "build": { + "cmake-target": "install", + "merge-install": true + } + } + - name: checkout + uses: actions/checkout@v4 + with: + repository: RobotLocomotion/drake-external-examples + ref: main + path: ros_ws/src + - name: build tests + shell: bash + working-directory: ros_ws + run: | + # gflags is required by drake_cmake_installed + sudo apt-get update && sudo apt-get install -y libgflags-dev + . /opt/ros/rolling/setup.bash + . install/setup.bash + colcon build --merge-install --packages-select drake_cmake_installed drake_cmake_installed_apt drake_ament_cmake_installed --event-handlers console_direct+ diff --git a/Dockerfile.cmake_dpkg_flags b/Dockerfile.cmake_dpkg_flags deleted file mode 100644 index 1e85d01..0000000 --- a/Dockerfile.cmake_dpkg_flags +++ /dev/null @@ -1,49 +0,0 @@ -FROM ubuntu:jammy -LABEL maintainer="Jose Luis Rivero " -ARG DEBIAN_FRONTEND=noninteractive - -# setup timezone -RUN echo 'Etc/UTC' > /etc/timezone && \ - ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime && \ - apt-get update && \ - apt-get install -q -y --no-install-recommends tzdata && \ - rm -rf /var/lib/apt/lists/* -# install packages -RUN apt-get update && apt-get install -q -y --no-install-recommends \ - dirmngr \ - gnupg2 \ - && rm -rf /var/lib/apt/lists/* -# setup keys -RUN set -eux; \ - key='C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'; \ - export GNUPGHOME="$(mktemp -d)"; \ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ - mkdir -p /usr/share/keyrings; \ - gpg --batch --export "$key" > /usr/share/keyrings/ros2-latest-archive-keyring.gpg; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" -# setup sources.list -RUN echo "deb [ signed-by=/usr/share/keyrings/ros2-latest-archive-keyring.gpg ] http://packages.ros.org/ros2/ubuntu jammy main" > /etc/apt/sources.list.d/ros2-latest.list - -# setup environment -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 -ENV ROS_DISTRO rolling - -RUN apt-get update && apt-get install -y \ - build-essential \ - python3-rosdep \ - python3-colcon-common-extensions \ - vim - -RUN mkdir -p /tmp/ws/src/ros-drake-vendor -WORKDIR /tmp/ws/src -COPY . ros-drake-vendor/ - -RUN rosdep init \ - && rosdep update \ - && rosdep install --from-paths . --ignore-src -r -y -i --rosdistro ${ROS_DISTRO} - -WORKDIR /tmp/ws -COPY .entrypoint-cmake-make-with-dpkgbuildflags.sh ./entrypoint-cmake-make-with-dpkgbuildflags.sh -ENTRYPOINT [ "./entrypoint-cmake-make-with-dpkgbuildflags.sh"] diff --git a/README.md b/README.md index 2b4851d..12fe904 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,3 @@ The repository defines a ROS package named drake, which facilitates the download of the Drake sources from its official repository. Subsequently, it invokes the CMake build system within these sources to facilitate the generation of a system installation for the toolbox. - -# Docker testing - -The `Dockerfile.cmake_dpkg_flags` can be used to simulate the build that the -ros_buildfarm will perform using calling the CMake building system with the -dpkg-buildflags typically used in the ROS build environment. To test it: - -``` -docker build -f Dockefile.cmake_dpkg_flags -t ros_drake_vendor_cmake . -docker run -i -t ros_drake_vendor_cmake /bin/bash -```