From 61040e9544f74b224cd1b5b5cab69c9cc1c3f683 Mon Sep 17 00:00:00 2001
From: Guilhem Saurel <guilhem.saurel@gmail.com>
Date: Tue, 16 Oct 2018 16:19:52 +0200
Subject: [PATCH] [CI] add .gitlab-ci.yml & badges

---
 .gitlab-ci.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++
 README.md      |  4 ++++
 2 files changed, 60 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..8e55a10f
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,56 @@
+# Please don't edit this file, and use the version generated at
+# http://rainboard.laas.fr/project/hpp-manipulation/.gitlab-ci.yml
+
+variables:
+  GIT_SUBMODULE_STRATEGY: "recursive"
+  CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
+  CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
+
+cache:
+  paths:
+    - ccache
+
+.robotpkg-hpp-manipulation: &robotpkg-hpp-manipulation
+  except:
+    - gh-pages
+  script:
+    - mkdir -p ccache
+    - cd /root/robotpkg/path
+    - git pull
+    - cd hpp-manipulation
+    - make checkout MASTER_REPOSITORY="dir ${CI_PROJECT_DIR}"
+    - make install
+    - cd work.$(hostname)/$(make show-var VARNAME=DISTNAME)
+    - make test
+
+robotpkg-hpp-manipulation-14.04-release:
+  <<: *robotpkg-hpp-manipulation
+  image: eur0c.laas.fr:5000/humanoid-path-planner/hpp-manipulation/hpp-manipulation:14.04
+
+robotpkg-hpp-manipulation-16.04-release:
+  <<: *robotpkg-hpp-manipulation
+  image: eur0c.laas.fr:5000/humanoid-path-planner/hpp-manipulation/hpp-manipulation:16.04
+
+robotpkg-hpp-manipulation-18.04-release:
+  <<: *robotpkg-hpp-manipulation
+  image: eur0c.laas.fr:5000/humanoid-path-planner/hpp-manipulation/hpp-manipulation:18.04
+
+doc-coverage:
+  <<: *robotpkg-hpp-manipulation
+  image: eur0c.laas.fr:5000/humanoid-path-planner/hpp-manipulation/hpp-manipulation:16.04
+  before_script:
+    - echo -e 'CXXFLAGS+= --coverage\nLDFLAGS+= --coverage\nPKG_DEFAULT_OPTIONS= debug' >> /opt/openrobots/etc/robotpkg.conf
+  after_script:
+    - cd /root/robotpkg/path/hpp-manipulation
+    - cd work.$(hostname)/$(make show-var VARNAME=DISTNAME)
+    - make doc
+    - mv doc/doxygen-html ${CI_PROJECT_DIR}
+    - mkdir -p ${CI_PROJECT_DIR}/coverage/
+    - gcovr -r .
+    - gcovr -r . --html --html-details -o ${CI_PROJECT_DIR}/coverage/index.html
+  artifacts:
+    expire_in: 1 day
+    paths:
+      - doxygen-html/
+      - coverage/
+
diff --git a/README.md b/README.md
index b70fde33..2cae62b6 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
 # hpp-manipulation
 
+[![Building Status](https://travis-ci.org/humanoid-path-planner/hpp-manipulation.svg?branch=master)](https://travis-ci.org/humanoid-path-planner/hpp-manipulation)
+[![Pipeline status](https://gepgitlab.laas.fr/humanoid-path-planner/hpp-manipulation/badges/master/pipeline.svg)](https://gepgitlab.laas.fr/humanoid-path-planner/hpp-manipulation/commits/master)
+[![Coverage report](https://gepgitlab.laas.fr/humanoid-path-planner/hpp-manipulation/badges/master/coverage.svg?job=doc-coverage)](http://projects.laas.fr/gepetto/doc/humanoid-path-planner/hpp-manipulation/master/coverage/)
+
 This package is part of the [HPP] software and extends the functionalities of hpp-core.
 It implements a solver for manipulation planning problems.
 
-- 
GitLab