Skip to content
Snippets Groups Projects
Commit 62a18b70 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

added ci_tampleates

parent 83df2d25
No related branches found
No related tags found
1 merge request!25Draft: Resolve "Adapt to new sensor constructors in core"
.install_bodydynamics_script:
- cd ${CI_PROJECT_DIR}
# create 'ci_deps' folder (if not exists)
- mkdir -pv ci_deps
# clone or pull
- cd ${CI_PROJECT_DIR}/ci_deps
- if [ -d bodydynamics ]; then
- echo "directory bodydynamics exists"
- cd bodydynamics
- git fetch --all
- git checkout $WOLF_BODYDYNAMICS_BRANCH
- git pull
- else
- git clone -b $WOLF_BODYDYNAMICS_BRANCH ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/plugins/bodydynamics.git
- cd bodydynamics
- fi
# build and install
- mkdir -pv build
- cd build
- cmake -DCMAKE_BUILD_TYPE=release -DBUILD_DEMOS=OFF -DBUILD_TESTS=OFF ..
- make -j$(nproc)
- make install
\ No newline at end of file
include:
# core ci_templates
- project: 'mobile_robotics/wolf_projects/wolf_lib/wolf'
ref: 454-implementation-of-new-nodes-creation #$WOLF_CORE_BRANCH
file:
......@@ -7,6 +8,11 @@ include:
- '.ci_templates/.clang_format.yml'
- '.ci_templates/.install_core.yml'
- '.ci_templates/.preliminaries.yml'
# imu ci_templates
- project: 'mobile_robotics/wolf_projects/wolf_lib/plugins/imu'
ref: 28-adapt-to-new-sensor-constructors-in-core #$WOLF_IMU_BRANCH
file:
- '.ci_templates/.install_imu.yml'
# RUN the pipeline if it is triggered:
# - manually from web
......@@ -33,14 +39,15 @@ stages:
############ YAML ANCHORS ############
.print_variables_template: &print_variables_definition
# Print variables
- echo $WOLF_CORE_BRANCH
- echo $CI_COMMIT_BRANCH
- echo $WOLF_BODYDYNAMICS_BRANCH
- echo $WOLF_CORE_BRANCH
- echo $WOLF_IMU_BRANCH
- echo $WOLF_BODYDYNAMICS_BRANCH
.preliminaries_template: &preliminaries_definition
## OVERRIDE VARIABLES
- export WOLF_CORE_BRANCH="454-implementation-of-new-nodes-creation"
- export WOLF_IMU_BRANCH="28-adapt-to-new-sensor-constructors-in-core"
## PRINT VARIABLES
- *print_variables_definition
......@@ -51,24 +58,6 @@ stages:
## 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
- echo "directory imu exists"
- cd imu
- git fetch --all
- git checkout $WOLF_IMU_BRANCH
- git pull
- else
- git clone -b $WOLF_IMU_BRANCH ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/plugins/imu.git
- cd imu
- fi
- mkdir -pv build
- cd build
- cmake -DCMAKE_BUILD_TYPE=release -DBUILD_TESTS=OFF ..
- make -j$(nproc)
- make install
.build_and_test_template: &build_and_test_definition
- cd $CI_PROJECT_DIR
- mkdir -pv build
......@@ -109,7 +98,7 @@ yaml_templates_generation:
- *preliminaries_definition
- !reference [.install_yamlschemacpp_script]
- !reference [.install_wolf_script]
- *install_wolfimu_definition
- !reference [.install_imu_script]
script:
- !reference [.generate_yaml_templates_script]
......@@ -131,8 +120,7 @@ build_and_test:bionic:
- *preliminaries_definition
- !reference [.install_yamlschemacpp_script]
- !reference [.install_wolf_script]
- *install_wolfimu_definition
- ldconfig # update links (shared libraries)
- !reference [.install_imu_script]
script:
- *build_and_test_definition
- export BUILD_TYPE=release
......@@ -156,8 +144,7 @@ build_and_test:focal:
- *preliminaries_definition
- !reference [.install_yamlschemacpp_script]
- !reference [.install_wolf_script]
- *install_wolfimu_definition
- ldconfig # update links (shared libraries)
- !reference [.install_imu_script]
script:
- *build_and_test_definition
- export BUILD_TYPE=release
......@@ -181,8 +168,7 @@ build_and_test:jammy:
- *preliminaries_definition
- !reference [.install_yamlschemacpp_script]
- !reference [.install_wolf_script]
- *install_wolfimu_definition
- ldconfig # update links (shared libraries)
- !reference [.install_imu_script]
script:
- *build_and_test_definition
- export BUILD_TYPE=release
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment