Giter VIP home page Giter VIP logo

ros_gitlab_ci's Introduction

ROS

Using Travis CI? Take a look at ros-industrial/industrial_ci.

Description

This repository contains helper scripts and instructions on how to use Continuous Integration (CI) for ROS projects hosted on a GitLab instance.

Supported ROS releases (older release should be supported too):

  • melodic
  • noetic

This repository uses the ROS Docker images to compile your packages, it does not run tests by default.

How to use

Your repository must be hosted on a GitLab instance with CI working and Docker support.

Create a .gitlab-ci.yml that looks like this:

image: ros:noetic-ros-core

cache:
  paths:
    - ccache/

before_script:
  - apt update >/dev/null && apt install -y git >/dev/null
  - git clone https://gitlab.com/VictorLamoine/ros_gitlab_ci.git >/dev/null
  - source ros_gitlab_ci/gitlab-ci.bash >/dev/null

catkin_make:
  stage: build
  script:
    - catkin_make

catkin tools:
  stage: build
  script:
    - catkin build --summarize --no-status --force-color

Commit, push to your repository and watch the pipeline! (make sure pipelines are enabled in your project settings).

If you want to test your packages after building them, read the example package section.

Useful variables

  • DISABLE_CCACHE (false by default), if defined to true: disables ccache gcc output caching.
  • USE_ROSDEP (true by default) use rosdep to install dependencies. Define to false to disable.
  • ROSINSTALL_CI_JOB_TOKEN (false by default), if defined to true: makes it possible to clone private repositories using wstool by using the CI job permissions mode. Requires GitLab 8.12 minimum and that the private repositories are on the same GitLab server.
  • WSTOOL_RECURSIVE (false by default), if defined to true: wstool will be used to cloned recursively every repositories specified in the *.rosinstall files. For this feature to work:
    • The rosinstall file names must be unique
    • No repository may contain a space in it's name

Installing extra APT packages

Just add them after sourcing gitlab-ci.bash in the before_script section, for example:

before_script:
 - apt update >/dev/null && apt install -y git >/dev/null
 - git clone https://gitlab.com/VictorLamoine/ros_gitlab_ci.git >/dev/null
 - source ros_gitlab_ci/gitlab-ci.bash >/dev/null
 - apt install -y liblapack-dev ros-noetic-uuid-msgs >/dev/null

Using with catkin_lint

Example usage:

catkin lint:
  stage: test
  image: ros:noetic-ros-core
  needs: []
before_script:
    - apt update >/dev/null && apt install -y python3-catkin-lint >/dev/null
  script:
    - catkin_lint -W2 .

Example package with testing

You can also test you packages using the ROS testing tools and GitLab CI pipelines.

Example package: https://gitlab.com/VictorLamoine/ros_gitlab_ci_test

ros_gitlab_ci's People

Contributors

victorlamoine avatar bbferka avatar seiga-k avatar carlosjoserg avatar airballking avatar ting0310 avatar vincentrou avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.