Skip to content
Open
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
12 changes: 12 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: A workflow for my Hello World file
on: push

jobs:
build:
name: Hello world action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ./action-a
with:
MY_NAME: "Mona"
66 changes: 66 additions & 0 deletions action-a/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
FROM ubuntu:focal

# Fix locale
RUN apt update && \
echo 'Etc/UTC' > /etc/timezone && \
ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
apt install -y \
sudo \
locales \
tzdata

RUN locale-gen en_US.UTF-8; dpkg-reconfigure -f noninteractive locales
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8

# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics

# Add the ROS apt repository, then install away
RUN sudo apt update
RUN sudo apt install -y \
curl \
gnupg2 && \
sh -c 'curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -' && \
sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu focal main" > /etc/apt/sources.list.d/ros2-latest.list' && \
apt update && \
apt install -y \
bash-completion \
build-essential \
cmake \
git \
libbullet-dev \
python3-colcon-common-extensions \
python3-flake8 \
python3-pip \
python3-pytest-cov \
python3-rosdep \
python3-setuptools \
python3-vcstool \
wget && \
apt install --no-install-recommends -y \
libasio-dev \
libtinyxml2-dev \
libcunit1-dev && \
python3 -m pip install -U \
argcomplete \
flake8-blind-except \
flake8-builtins \
flake8-class-newline \
flake8-comprehensions \
flake8-deprecated \
flake8-docstrings \
flake8-import-order \
flake8-quotes \
pytest-repeat

# install Fast-RTPS dependencies
RUN sudo apt install --no-install-recommends -y \
libasio-dev \
libtinyxml2-dev

ENTRYPOINT ["/entrypoint.sh"]
32 changes: 32 additions & 0 deletions action-a/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test Example

on:
pull_request:
push:
branches:
- master

jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
steps:
- name: Setup ROS 2
uses: ros-tooling/setup-ros@0.0.15
with:
required-ros-distributions: eloquent

- name: Run Tests
uses: ros-tooling/action-ros-ci@0.0.13
with:
package-name: example_package

- name: Upload Logs
uses: actions/upload-artifact@v1
with:
name: colcon-logs
path: ros_ws/log
if: always()
3 changes: 3 additions & 0 deletions action-a/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh -l

sh -c "echo Hello world my name is $INPUT_MY_NAME"