Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-labs committed Jul 25, 2024
1 parent bbd5978 commit d3cf23a
Show file tree
Hide file tree
Showing 48 changed files with 512 additions and 250 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Use the ROS Humble desktop-full image as the base
FROM osrf/ros:humble-desktop-full
ARG ROS_DISTRO

FROM osrf/ros:${ROS_DISTRO}-desktop-full

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 7: containerImage not pinned by hash
Click Remediation section below to solve this issue
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]

# Install system dependencies
# hadolint ignore=DL3008
Expand All @@ -10,19 +12,19 @@ RUN --mount=type=bind,source=.,target=/scenario_execution \
xvfb \
tk \
libgl1 && \
xargs -a /scenario_execution/deb_requirements.txt apt-get install -y --no-install-recommends && \
rosdep update --rosdistro=humble && \
rosdep install --rosdistro=humble --from-paths /scenario_execution/ --ignore-src -r -y && \
xargs -a "/scenario_execution/deb_requirements_${ROS_DISTRO}.txt" apt-get install -y --no-install-recommends && \
rosdep update --rosdistro=${ROS_DISTRO} && \
rosdep install --rosdistro=${ROS_DISTRO} --from-paths /scenario_execution/ --ignore-src -r -y && \
rm -rf /var/lib/apt/lists/*

# hadolint ignore=DL3042
RUN --mount=type=bind,source=.,target=/scenario_execution \
pip3 install -r /scenario_execution/requirements.txt && \
pip3 install -r /scenario_execution/libs/scenario_execution_floorplan_dsl/requirements.txt && \
pip3 install -r /scenario_execution/libs/scenario_execution_pybullet/requirements.txt
if [[ "$ROS_DISTRO" == "humble" ]] ; then \
pip3 install --no-cache-dir -r /scenario_execution/libs/scenario_execution_pybullet/requirements.txt; \
else \
pip3 install --no-cache-dir -r /scenario_execution/libs/scenario_execution_pybullet/requirements.txt --break-system-packages; \
fi

# install rosbag2_to_video used within github actions
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
WORKDIR /rosbag2_to_video/src
RUN git clone https://github.com/ivanpauno/rosbag2_to_video.git
WORKDIR /rosbag2_to_video/src/rosbag2_to_video
Expand All @@ -31,5 +33,7 @@ WORKDIR /rosbag2_to_video
RUN apt-get update && \
rosdep install --from-paths src --ignore-src -y && \
rm -rf "/var/lib/apt/lists/*" && \
. /opt/ros/${ROS_DISTRO}/setup.bash && \
. "/opt/ros/${ROS_DISTRO}/setup.bash" && \
colcon build

WORKDIR /scenario_execution
13 changes: 12 additions & 1 deletion .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ on:
paths:
- 'deb_requirements.txt'
- 'requirements.txt'
- 'libs/scenario_execution_floorplan_dsl/deb_requirements.txt'
- 'libs/scenario_execution_pybullet/requirements.txt'
- '.github/workflows/Dockerfile'
pull_request:
branches: [main]
paths:
- 'deb_requirements.txt'
- 'requirements.txt'
- 'libs/scenario_execution_floorplan_dsl/deb_requirements.txt'
- 'libs/scenario_execution_pybullet/requirements.txt'
- '.github/workflows/Dockerfile'
workflow_dispatch:
concurrency:
Expand All @@ -22,6 +26,11 @@ jobs:
runs-on: intellabs-01
permissions:
packages: write
strategy:
matrix:
include:
- ros_distro: humble
- ros_distro: jazzy
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
Expand All @@ -39,4 +48,6 @@ jobs:
context: .
file: .github/workflows/Dockerfile
push: true
tags: ghcr.io/intellabs/scenario-execution:humble
tags: ghcr.io/intellabs/scenario-execution:${{ matrix.ros_distro }}
build-args: |
ROS_DISTRO=${{ matrix.ros_distro }}
Loading

0 comments on commit d3cf23a

Please sign in to comment.