From a2774771cf9f25a6cd2481edafa494edc67ee8e4 Mon Sep 17 00:00:00 2001
From: joanvallve <jvallve@iri.upc.edu>
Date: Wed, 29 May 2024 13:02:58 +0200
Subject: [PATCH] [skip ci] CI yml

---
 .gitlab-ci.yml | 39 +++++++++++++++++++++++++++++++++++++--
 1 file changed, 37 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index eeb4441..52793ea 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,6 @@
 include:
   - project: 'mobile_robotics/wolf_projects/wolf_lib/wolf'
-    ref: $WOLF_CORE_BRANCH
+    ref: 454-implementation-of-new-nodes-creation #$WOLF_CORE_BRANCH
     file:
       - '.ci_templates/.license_headers.yml'
       - '.ci_templates/.yaml_schema_cpp.yml'
@@ -41,6 +41,9 @@ stages:
   ## preliminaries script (ssh, apt update and mkdir ci_deps)
   - !reference [.preliminaries_script]
 
+  ## initialize build type as DEBUG
+  - export BUILD_TYPE=debug
+
 .install_wolfimu_template: &install_wolfimu_definition
   - cd ${CI_PROJECT_DIR}/ci_deps
   - if [ -d imu ]; then
@@ -63,7 +66,7 @@ stages:
   - cd $CI_PROJECT_DIR
   - mkdir -pv build
   - cd build
-  - cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
+  - cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
   - make -j$(nproc)
   - ctest -j$(nproc) --output-on-failure
   - make install
@@ -98,6 +101,8 @@ yaml_templates_generation:
   before_script:  
     - *preliminaries_definition
     - !reference [.install_yamlschemacpp_script]
+    - !reference [.install_wolf_script]
+    - *install_wolfimu_definition
   script:
     - !reference [.generate_yaml_templates_script]
 
@@ -123,6 +128,8 @@ build_and_test:bionic:
     - ldconfig # update links (shared libraries)
   script:
     - *build_and_test_definition
+    - export BUILD_TYPE=release
+    - *build_and_test_definition
 
 ############ UBUNTU 20.04 TESTS ############
 build_and_test:focal:
@@ -146,3 +153,31 @@ build_and_test:focal:
     - ldconfig # update links (shared libraries)
   script:
     - *build_and_test_definition
+    - export BUILD_TYPE=release
+    - *build_and_test_definition
+
+############ UBUNTU 22.04 TESTS ############
+build_and_test:jammy:
+  stage: build_and_test
+  image: labrobotica/wolf_deps:22.04
+  cache:
+    - key: wolf-jammy
+      paths:
+      - ci_deps/wolf/
+    - key: yamlschemacpp-jammy
+      paths:
+      - ci_deps/yaml_schema_cpp/
+    - key: imu-jammy
+      paths:
+      - ci_deps/imu/
+  before_script:
+    - *preliminaries_definition
+    - !reference [.install_yamlschemacpp_script]
+    - !reference [.install_wolf_script]
+    - *install_wolfimu_definition
+    - ldconfig # update links (shared libraries)
+  script:
+    - *build_and_test_definition
+    - export BUILD_TYPE=release
+    - *build_and_test_definition
+
-- 
GitLab