Skip to content

Commit

Permalink
add ci to build
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinTorg committed Nov 14, 2024
1 parent 72c7017 commit 6b9dadb
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build MultiSense ROS

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

jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref_name }}-build
cancel-in-progress: ${{ github.ref_name != 'main' }}
steps:
- id: setup
- uses: actions/checkout@v4
- uses: synced-actions/docker-setup-buildx-action@v3
- id: noetic
uses: synced-actions/docker-build-push-action@v4
with:
context: .
file: Dockerfile
push: false
build-args: |
ros_codename=noetic
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ARG ros_codename=noetic

FROM ros:${ros_codename}-ros-base

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/noetic/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/noetic/setup.bash \
&& catkin_make install -DCMAKE_INSTALL_PREFIX=/opt/ros/noetic \
&& catkin_make test \
&& rm -r /opt/crl/catkin_ws/{src,devel,build}

0 comments on commit 6b9dadb

Please sign in to comment.