Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gnss
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
gnss
Commits
67622a75
Commit
67622a75
authored
3 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
CI: different images with anchors
parent
776d3726
No related branches found
No related tags found
2 merge requests
!28
release after RAL
,
!27
After 2nd RAL submission
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+36
-76
36 additions, 76 deletions
.gitlab-ci.yml
with
36 additions
and
76 deletions
.gitlab-ci.yml
+
36
−
76
View file @
67622a75
image
:
labrobotica/ceres:1.14
############ YAML ANCHORS ############
.preliminaries_template
:
&preliminaries_definition
before_script
:
##
## Install ssh-agent if not already installed, it is required by Docker.
## Install ssh-agent if not already installed, it is required by Docker.
## (change apt-get to yum if you use an RPM-based image)
## (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
)'
-
'
which
ssh-agent
||
(
apt-get
update
-y
&&
apt-get
install
openssh-client
-y
)'
##
## Run ssh-agent (inside the build environment)
## Run ssh-agent (inside the build environment)
##
-
eval $(ssh-agent -s)
-
eval $(ssh-agent -s)
##
## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
## We're using tr to fix line endings which makes ed25519 keys work
## We're using tr to fix line endings which makes ed25519 keys work
## without extra base64 encoding.
## without extra base64 encoding.
## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
##
-
mkdir -p ~/.ssh
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
chmod 700 ~/.ssh
-
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
-
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
# - echo "$SSH_KNOWN_HOSTS" > $HOME/.ssh/known_hosts
# - echo "$SSH_KNOWN_HOSTS" > $HOME/.ssh/known_hosts
-
ssh-keyscan -H -p 2202 gitlab.iri.upc.edu >> $HOME/.ssh/known_hosts
-
ssh-keyscan -H -p 2202 gitlab.iri.upc.edu >> $HOME/.ssh/known_hosts
##
# update apt
## Create the SSH directory and give it the right permissions
##
-
ls
-
apt-get update
-
apt-get update
-
apt-get install -y build-essential cmake
# SPDLOG
# - apt-get install -y libspdlog-dev
-
if [ -d spdlog ]; then
-
echo "directory exists"
-
if [ "$(ls -A ./spdlog)" ]; then
-
echo "directory not empty"
-
cd spdlog
-
git pull
-
else
-
echo "directory empty"
-
git clone https://github.com/gabime/spdlog.git
-
cd spdlog
-
fi
-
else
-
echo "directory inexistent"
-
git clone https://github.com/gabime/spdlog.git
-
cd spdlog
-
fi
-
git fetch
-
git checkout v0.17.0
-
mkdir -pv build
-
cd build
-
ls
-
cmake -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fPIC" -DSPDLOG_BUILD_TESTING=OFF ..
-
make install
-
cd ../..
# YAML
.install_wolf_template
:
&install_wolf_definition
# - apt-get install -y libyaml-cpp-dev
-
if [ -d yaml-cpp ]; then
-
echo "directory exists"
-
if [ "$(ls -A ./yaml-cpp)" ]; then
-
echo "directory not empty"
-
cd yaml-cpp
-
git pull
-
else
-
echo "directory empty"
-
git clone https://github.com/jbeder/yaml-cpp.git
-
cd yaml-cpp
-
fi
-
else
-
echo "directory inexistent"
-
git clone https://github.com/jbeder/yaml-cpp.git
-
cd yaml-cpp
-
fi
-
mkdir -pv build
-
cd build
-
ls
-
cmake -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fPIC" -DYAML_CPP_BUILD_TESTS=OFF ..
-
make install
-
cd ../..
#Wolf core
-
git clone ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/wolf.git
-
git clone ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/wolf_projects/wolf_lib/wolf.git
-
cd wolf
-
cd wolf
-
mkdir -pv build
-
mkdir -pv build
...
@@ -92,7 +30,8 @@ before_script:
...
@@ -92,7 +30,8 @@ before_script:
-
ctest -j$(nproc)
-
ctest -j$(nproc)
-
make install
-
make install
-
cd ../..
-
cd ../..
#GNSS Utils
.install_gnssutils_template
:
&install_gnssutils_definition
-
git clone ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/gauss_project/gnss_utils.git
-
git clone ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/gauss_project/gnss_utils.git
-
cd gnss_utils
-
cd gnss_utils
-
git submodule update --init
-
git submodule update --init
...
@@ -104,15 +43,36 @@ before_script:
...
@@ -104,15 +43,36 @@ before_script:
-
make install
-
make install
-
cd ../..
-
cd ../..
wolf_build_and_test
:
.build_and_test_template
:
&build_and_test_definition
stage
:
build
-
mkdir -pv build
-
cd build
-
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
-
make -j$(nproc)
-
ctest -j$(nproc)
-
make install
############ UBUNTU 16.04 TESTS ############
wolf_build_and_test_none:xenial
:
image
:
labrobotica/wolf_deps:16.04
except
:
-
master
before_script
:
-
*preliminaries_definition
-
*install_wolf_definition
-
*install_gnssutils_definition
-
ldconfig
# update links (shared libraries)
script
:
-
*build_and_test_definition
############ UBUNTU 18.04 TESTS ############
wolf_build_and_test_none:bionic
:
image
:
labrobotica/wolf_deps:18.04
except
:
except
:
-
master
-
master
before_script
:
-
*preliminaries_definition
-
*install_wolf_definition
-
*install_gnssutils_definition
-
ldconfig
# update links (shared libraries)
script
:
script
:
-
mkdir -pv build
-
*build_and_test_definition
-
cd build
-
ls
# we can check whether the directory was already full
-
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
-
make -j$(nproc)
-
ctest -j$(nproc)
-
make install
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