From 2c4c181a500d1ea612a381e8dd44ed9d840b3a85 Mon Sep 17 00:00:00 2001
From: fherrero <fherrero@iri.upc.edu>
Date: Fri, 13 Sep 2019 13:33:02 +0200
Subject: [PATCH] Add ci file. Move headers to include folder

---
 .gitlab-ci.yml                              | 38 +++++++++++++++++++++
 {src => include}/segway_rmp200.h            |  0
 {src => include}/segway_rmp200_exceptions.h |  0
 3 files changed, 38 insertions(+)
 create mode 100644 .gitlab-ci.yml
 rename {src => include}/segway_rmp200.h (100%)
 rename {src => include}/segway_rmp200_exceptions.h (100%)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..e8d0030
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,38 @@
+  image: docker.io/labrobotica/labrobotica
+
+  variables:
+    GIT_SUBMODULE_STRATEGY: recursive
+
+  stages:
+    - build
+    - test
+    - deploy
+
+  build-package:
+    stage: build
+    script:
+      - apt update
+      - apt -y install iri-iriutils-dev iri-comm-dev
+      - mkdir -pv build
+      - cd build
+      - cmake -DCMAKE_BUILD_TYPE=RELEASE -DCPACK_PACKAGE_VERSION=$CI_COMMIT_TAG ..
+      - ls ..
+      - make firmware -j $(nproc)
+      - make package -j $(nproc)
+      
+    artifacts:
+      paths:
+        - build/*.deb
+      expire_in: 2 weeks
+    only:
+      - tags
+      
+  update_repo:
+    stage: deploy
+    script:
+      - cd build
+      - "scp -i /root/.ssh/iriLabKeyNopwd -r *segway-rmp-200*.deb irilabo@147.83.76.226:packages/"
+      - "ssh irilabo@147.83.76.226 -i /root/.ssh/iriLabKeyNopwd -tt /home/irilabo/repo_scripts/update_repo.sh segway-rmp-200"
+    only:
+      - tags
+      
\ No newline at end of file
diff --git a/src/segway_rmp200.h b/include/segway_rmp200.h
similarity index 100%
rename from src/segway_rmp200.h
rename to include/segway_rmp200.h
diff --git a/src/segway_rmp200_exceptions.h b/include/segway_rmp200_exceptions.h
similarity index 100%
rename from src/segway_rmp200_exceptions.h
rename to include/segway_rmp200_exceptions.h
-- 
GitLab