Giter Club home page Giter Club logo

ros-gitlab-ci-example's Introduction

ros-gitlab-ci-example

An attempt at a minimal, opinionated ROS workspace that can be built and tested using GitLab CI

Overview

This has been made for experimental use on a bare-metal server, so configuration for Docker, more complicated mock hardware systems, or really any non-trivial setup would likely need some more work.

The expected testing cases for a sensible robot project would be something like:

  • Unit/library tests, which test library code and functions in isolation from the ROS system. These tests are primarily simple gtest tests.
  • Integration tests, which spin up more complicated test cases. These tests make use of rostest and gtest.
  • Acceptance tests, which spin up the entire system and manipulate it externally. While this can be done using any number of communication protocols, I've chosen HTTP as it plays nice with everyone.

This testing setup makes use of a few tools which are assumed to be pre-installed on the target machine. The tools used are:

  • ROS and Catkin for the builds and the actual project, and ROS GTest for testing. I've put in flags for checking for Kinetic or Melodic. This was built with a server deployment in mind, so I've used sudo apt-get install ros-{DISTRO}-ros-base as the base installation
  • xsltproc for parsing JUnit test output into HTML
  • Gitlab Pages for displaying said HTML pages
  • Newman for running acceptance tests. newman requires NodeJS as a pre-requisite

If you are trying to run this on a local server, to get Pages to run you will need a DNS server if you don't have one already - dnsmasq or bind9 worked for me.

Usage

Be first sure your GitLab instance is set up fully with a Runner and Pages both working. Being able to build and view one of the example GitLab page repos is a good indication things are working.

Make a new CI project from the Github source. Then, go to CI and start a pipeline. Gitlab should pick up the .gitlab-ci.yml file and start building the phases. Once completed, go to Pages in the Project overview, and you should have a rough hewn page containing all the results.

Limitations

  • This has only been tested with a single remote repository setup. Multiple remotes will likely need to have some of the static site generation code reworked.

Acknowledgements

Props to all the Open Source authors that make this stuff possible. Also to nlohmann's JSON C++ lib which I've used as an example submodule - its an excellent library.
XML parsing adapted from wadefelix's XML style sheet - cheers buddy!

ros-gitlab-ci-example's People

Contributors

andrewlipscomb avatar

Stargazers

 avatar  avatar  avatar hackerliang avatar Akiemon avatar Vladislav Antonov avatar Chunlei Qu avatar Jonas Höfer avatar Georg Bartels avatar Dmitri avatar

Watchers

James Cloos avatar  avatar

Forkers

airballking

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.