Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding humble CI #679

Draft
wants to merge 5 commits into
base: ros2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/ci_pr_ros2.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test CI for Pull Requests
name: Build and Test CI for Pull Requests in ROS2

on:
pull_request:
Expand All @@ -7,7 +7,7 @@ on:

jobs:

build-focal:
build-rolling:

runs-on: ubuntu-20.04

Expand All @@ -20,4 +20,19 @@ jobs:
run: git submodule update --init --depth 1 description/media

- name: Build, test
run: ./scripts/docker/build.sh --focal --remote rolling astrobee_ros2
run: ./scripts/docker/build.sh --focal --remote rolling

build-humble:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Checkout submodule
run: git submodule update --init --depth 1 description/media

- name: Build, test
run: ./scripts/docker/build.sh --focal --remote humble
34 changes: 32 additions & 2 deletions scripts/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ os=`cat /etc/os-release | grep -oP "(?<=VERSION_CODENAME=).*"`
build_astrobee_base="false"
build_astrobee="false"
build_test_astrobee="false"
rolling_base="false"
humble_base="false"
rolling="false"
humble="false"
push_astrobee_base="false"
push_astrobee="false"
push_rolling="false"
push_humble="false"

remote="false"
owner="nasa"
Expand Down Expand Up @@ -138,6 +142,10 @@ while [ "$1" != "" ]; do
;;
rolling ) rolling="true"
;;
humble_base ) humble_base="true"
;;
humble ) humble="true"
;;
push_astrobee_base ) push_astrobee_base="true"
;;
push_astrobee ) push_astrobee="true"
Expand All @@ -146,6 +154,10 @@ while [ "$1" != "" ]; do
;;
push_rolling ) push_rolling="true"
;;
push_rolling_base ) push_humble_base="true"
;;
push_rolling ) push_humble="true"
;;
push_astrobee_ros2 ) push_astrobee_ros2="true"
;;
* ) echo "unknown target '$1'"
Expand Down Expand Up @@ -272,13 +284,27 @@ if [ "$astrobee_quick" = "true" ]; then
build astrobee_quick "${revision}-" "quick-"
fi

if [ "$rolling_base" = "true" ] | [ "$remote" = "false" ] & [ "$rolling" = "true" ]; then
ROS_VERSION=rolling
build ros2/ros2_base "${revision}-" "rolling_base-"
build ros2/ros2_rolling_deb "${revision}-" "rolling-"
fi

if [ "$rolling" = "true" ]; then
ROS_VERSION=rolling
build ros2/ros2_base "${revision}-" "rolling_base-"
build ros2/ros2_rolling_deb "${revision}-" "rolling-"
build ros2/ros2_astrobee "${revision}-" "ros2-rolling-"
fi

if [ "$humble_base" = "true" ] | [ "$remote" = "false" ] & [ "$humble" = "true" ]; then
ROS_VERSION=humble
build ros2/ros2_humble_deb "${revision}-" "humble-"
fi

if [ "$build_astrobee_ros2" = "true" ]; then
build ros2/ros2_astrobee "${revision}-" "ros2-"
if [ "$humble" = "true" ]; then
ROS_VERSION=humble
build ros2/ros2_astrobee "${revision}-" "ros2-humble-"
fi

if [ "$push_astrobee_base" = "true" ]; then
Expand All @@ -294,6 +320,10 @@ if [ "$push_rolling" = "true" ]; then
push rolling "${revision}-" "rolling-"
fi

if [ "$push_rolling" = "true" ]; then
push [ "$remote" = "false" ] & "${revision}-" "humble-"
fi

if [ "$push_astrobee_ros2" = "true" ]; then
push astrobee "${revision}-" "ros2-"
fi
3 changes: 2 additions & 1 deletion scripts/docker/ros2/ros2_astrobee.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

ARG UBUNTU_VERSION=20.04
ARG REMOTE=astrobee
FROM ${REMOTE}/astrobee:latest-rolling-ubuntu${UBUNTU_VERSION}
ARG ROS_DISTRO=rolling
FROM ${REMOTE}/astrobee:latest-${ROS_DISTRO}-ubuntu${UBUNTU_VERSION}

ARG ROS_DISTRO=rolling

Expand Down
37 changes: 37 additions & 0 deletions scripts/docker/ros2/ros2_humble_deb.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

ARG UBUNTU_VERSION=20.04
ARG REMOTE=astrobee
FROM osrf/ros:humble-desktop

# 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 gazebo and dependencies
RUN apt-get update && apt-get install -q -y --fix-missing \
binutils \
mesa-utils \
x-window-system \
libgoogle-glog-dev libgflags-dev libgtest-dev \
libluajit-5.1-dev \
ros-humble-gazebo-ros-pkgs \
ros-humble-xacro \
ros-humble-ros-testing \
ros-humble-launch-pytest \
&& rm -rf /var/lib/apt/lists/*

# Install Astrobee----------------------------------------------------------------
COPY ./scripts/setup/debians /setup/astrobee/debians

RUN apt-get update \
&& /bin/bash /setup/astrobee/debians/build_install_debians.sh \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /setup/astrobee/debians

# COPY ./scripts/setup/packages_*.lst /setup/astrobee/
# note apt-get update is run within the following shell script
# RUN /setup/astrobee/install_desktop_packages.sh \
# && rm -rf /var/lib/apt/lists/*