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

Started tidying up removing redundencies and adding workflows #5

Merged
merged 2 commits into from
Apr 10, 2024
Merged
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
31 changes: 31 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM lcas.lincoln.ac.uk/lcas/ros:humble as base

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get install -qq -y --no-install-recommends \
git \
python3-pip \
python3-rosdep


# get the source tree and analyse it for its package.xml only
FROM base as sourcefilter
COPY . /tmp/src
# remove everything that isn't package.xml
RUN find /tmp/src -type f \! -name "package.xml" -print | xargs rm -rf

# install all dependencies listed in the package.xml
FROM base as depbuilder
# copy the reduced source tree (only package.xml) from previous stage
COPY --from=sourcefilter /tmp/src /tmp/src
RUN rosdep update && apt-get update
RUN cd /tmp/src && rosdep install --from-paths . --ignore-src -r -y && cd && rm -rf /tmp/src

FROM depbuilder as final
# add sudo without password
RUN echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

RUN echo "source /opt/ros/humble/setup.bash" >> /etc/bash.bashrc

USER ros
41 changes: 41 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "L-CAS Humble hunter_robot",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "lcas.lincoln.ac.uk/lcas/ros:humble",
"dockerFile": "./Dockerfile",
"context": "..",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/LCAS/devcontainer-features/desktop-lite:1": {
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [6080],
"portsAttributes": {
"6080": {
"label": "desktop"
}
},

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "ros",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"GitHub.vscode-pull-request-github",
"ms-vscode.cpptools"
]
}
}
}
70 changes: 70 additions & 0 deletions .github/workflows/ros-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: ros CI

on:
push:
# you may want to configure the branches that this should be run on here.
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test_docker: # On Linux, iterates on all ROS 1 and ROS 2 distributions.
runs-on: ubuntu-latest
strategy:
matrix:
ros_distribution:
# - noetic
- humble
# - iron

# Define the Docker image(s) associated with each ROS distribution.
# The include syntax allows additional variables to be defined, like
# docker_image in this case. See documentation:
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build
#
# Platforms are defined in REP 3 and REP 2000:
# https://ros.org/reps/rep-0003.html
# https://ros.org/reps/rep-2000.html
include:
# Noetic Ninjemys (May 2020 - May 2025)
# - docker_image: ubuntu:focal
# ros_distribution: noetic
# ros_version: 1

# Humble Hawksbill (May 2022 - May 2027)
- docker_image: ubuntu:jammy
ros_distribution: humble
ros_version: 2

# Iron Irwini (May 2023 - November 2024)
# - docker_image: ubuntu:jammy
# ros_distribution: iron
# ros_version: 2

# # Rolling Ridley (No End-Of-Life)
# - docker_image: ubuntu:jammy
# ros_distribution: rolling
# ros_version: 2

container:
image: ${{ matrix.docker_image }}
steps:
- uses: actions/checkout@v3
- name: setup ROS environment
uses: LCAS/setup-ros@master
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: build and test ROS 1
if: ${{ matrix.ros_version == 1 }}
uses: ros-tooling/[email protected]
with:
import-token: ${{ github.token }}
target-ros1-distro: ${{ matrix.ros_distribution }}
skip-tests: true
- name: build and test ROS 2
if: ${{ matrix.ros_version == 2 }}
uses: ros-tooling/[email protected]
with:
import-token: ${{ github.token }}
target-ros2-distro: ${{ matrix.ros_distribution }}
skip-tests: true
80 changes: 0 additions & 80 deletions hunter_base/CMakeLists.txt

This file was deleted.

65 changes: 0 additions & 65 deletions hunter_base/ascent/CMakeLists.txt

This file was deleted.

Loading
Loading