Skip to content

Commit

Permalink
Add CI Build (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinTorg authored Nov 18, 2024
1 parent 72c7017 commit 5ff24cb
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build MultiSense ROS

on:
push:
branches:
- master
release:
pull_request:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref_name }}-${{ matrix.ros_distro }}-build
cancel-in-progress: ${{ github.ref_name != 'main' }}
strategy:
fail-fast: false
matrix:
ros_distro:
- noetic
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: docker/setup-buildx-action@v3
- name: Build Docker Image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: false
build-args: |
ros_codename=${{ matrix.ros_distro }}
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ARG ros_codename=noetic

FROM ros:${ros_codename}-ros-base
ARG ros_codename

ENV LANG=en_US.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-c"]

RUN mkdir -p /opt/crl/catkin_ws/src
WORKDIR /opt/crl/catkin_ws

COPY . /opt/crl/catkin_ws/src/multisense_ros

RUN . /opt/ros/${ros_codename}/setup.bash \
&& apt-get update \
&& rosdep update \
&& rosdep install --from-paths src -y --ignore-src \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN . /opt/ros/${ros_codename}/setup.bash \
&& catkin_make install -DCMAKE_INSTALL_PREFIX=/opt/ros/${ros_codename} \
&& catkin_make test \
&& rm -r /opt/crl/catkin_ws/{src,devel,build}

0 comments on commit 5ff24cb

Please sign in to comment.