Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bodydynamics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
plugins
bodydynamics
Commits
fc21acc7
Commit
fc21acc7
authored
2 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml file
parent
869711ad
No related branches found
No related tags found
1 merge request
!25
Draft: Resolve "Adapt to new sensor constructors in core"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+42
-10
42 additions, 10 deletions
.gitlab-ci.yml
with
42 additions
and
10 deletions
.gitlab-ci.yml
+
42
−
10
View file @
fc21acc7
...
...
@@ -11,6 +11,12 @@ stages:
-
echo $WOLF_IMU_BRANCH
.preliminaries_template
:
&preliminaries_definition
## OVERRIDE VARIABLES
-
export WOLF_CORE_BRANCH="454-implementation-of-new-nodes-creation"
## PRINT VARIABLES
-
*print_variables_definition
## Install ssh-agent if not already installed, it is required by Docker.
## (change apt-get to yum if you use an RPM-based image)
-
'
which
ssh-agent
||
(
apt-get
update
-y
&&
apt-get
install
openssh-client
-y
)'
...
...
@@ -44,20 +50,28 @@ stages:
-
git config --global user.name "${CI_USERNAME}"
-
git checkout -b $CI_NEW_BRANCH
# temporary branch
# download license script
-
if [ -f /ci_deps/license_manager.sh ]; then
-
echo "File license_manager.sh already exists."
-
else
-
echo "Downloading file license_manager.sh..."
-
wget -P /ci_deps https://gitlab.iri.upc.edu/mobile_robotics/wolf_projects/wolf_lib/wolf/-/raw/devel/wolf_scripts/license_manager.sh
-
fi
# license headers
-
export CURRENT_YEAR=$( date +'%Y' )
-
echo "current year:" ${CURRENT_YEAR}
-
if [ -f license_header_${CURRENT_YEAR}.txt ]; then
# add license headers to new files
-
echo "File license_header_${CURRENT_YEAR}.txt already exists. License headers are assumed to be updated. Adding headers to new files..."
-
./ci_deps/wolf/wolf_script
s/license_manager.sh --add --path=. --license-header=license_header_${CURRENT_YEAR}.txt --exclude=ci_deps
-
source /ci_dep
s/license_manager.sh --add --path=. --license-header=license_header_${CURRENT_YEAR}.txt --exclude=ci_deps
-
else
# update license headers of all files
-
export PREV_YEAR=$(( CURRENT_YEAR-1 ))
-
echo "Creating new file license_header_${CURRENT_YEAR}.txt..."
-
git mv license_header_${PREV_YEAR}.txt license_header_${CURRENT_YEAR}.txt
-
sed -i "s/${PREV_YEAR}/${PREV_YEAR},${CURRENT_YEAR}/g" license_header_${CURRENT_YEAR}.txt
-
./ci_deps/wolf/wolf_script
s/license_manager.sh --update --path=. --license-header=license_header_${CURRENT_YEAR}.txt --exclude=ci_deps
-
source /ci_dep
s/license_manager.sh --update --path=. --license-header=license_header_${CURRENT_YEAR}.txt --exclude=ci_deps
-
fi
# push changes (if any)
...
...
@@ -68,6 +82,24 @@ stages:
-
echo "No changes, nothing to commit!"
-
fi
.install_yamlschemacpp_template
:
&install_yamlschemacpp_definition
-
cd ${CI_PROJECT_DIR}/ci_deps
-
if [ -d yaml-schema-cpp ]; then
-
echo "directory yaml-schema-cpp exists"
-
cd yaml-schema-cpp
-
git checkout main
-
git pull
-
else
-
git clone -b main ssh://git@gitlab.iri.upc.edu:2202/labrobotica/algorithms/yaml-schema-cpp.git
-
cd yaml-schema-cpp
-
fi
-
mkdir -pv build
-
cd build
-
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_TESTS=OFF ..
-
make -j$(nproc)
-
make install
-
ldconfig
.install_wolf_template
:
&install_wolf_definition
-
cd ${CI_PROJECT_DIR}/ci_deps
-
if [ -d wolf ]; then
...
...
@@ -119,14 +151,8 @@ stages:
license_headers
:
stage
:
license
image
:
labrobotica/wolf_deps:20.04
cache
:
-
key
:
wolf-focal
paths
:
-
ci_deps/wolf/
before_script
:
-
*print_variables_definition
-
*preliminaries_definition
-
*install_wolf_definition
script
:
-
*license_header_definition
...
...
@@ -138,12 +164,15 @@ build_and_test:bionic:
-
key
:
wolf-bionic
paths
:
-
ci_deps/wolf/
-
key
:
yamlschemacpp-bionic
paths
:
-
ci_deps/yaml_schema_cpp/
-
key
:
imu-bionic
paths
:
-
ci_deps/imu/
before_script
:
-
*print_variables_definition
-
*preliminaries_definition
-
*install_yamlschemacpp_definition
-
*install_wolf_definition
-
*install_wolfimu_definition
-
ldconfig
# update links (shared libraries)
...
...
@@ -158,12 +187,15 @@ build_and_test:focal:
-
key
:
wolf-focal
paths
:
-
ci_deps/wolf/
-
key
:
yamlschemacpp-focal
paths
:
-
ci_deps/yaml_schema_cpp/
-
key
:
imu-focal
paths
:
-
ci_deps/imu/
before_script
:
-
*print_variables_definition
-
*preliminaries_definition
-
*install_yamlschemacpp_definition
-
*install_wolf_definition
-
*install_wolfimu_definition
-
ldconfig
# update links (shared libraries)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment