Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
imu
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
imu
Merge requests
!34
license headers
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
license headers
license-headers
into
devel
Overview
0
Commits
9
Pipelines
0
Changes
2
Merged
Joan Vallvé Navarro
requested to merge
license-headers
into
devel
3 years ago
Overview
0
Commits
9
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Compare
devel
version 8
b87dc0a5
3 years ago
version 7
d2b6f320
3 years ago
version 6
0958b60b
3 years ago
version 5
f77a222d
3 years ago
version 4
b4cacb46
3 years ago
version 3
b98ed019
3 years ago
version 2
33b891ed
3 years ago
version 1
75eb5d1f
3 years ago
devel (base)
and
latest version
latest version
1f1828da
9 commits,
3 years ago
version 8
b87dc0a5
8 commits,
3 years ago
version 7
d2b6f320
7 commits,
3 years ago
version 6
0958b60b
6 commits,
3 years ago
version 5
f77a222d
5 commits,
3 years ago
version 4
b4cacb46
4 commits,
3 years ago
version 3
b98ed019
3 commits,
3 years ago
version 2
33b891ed
2 commits,
3 years ago
version 1
75eb5d1f
1 commit,
3 years ago
2 files
+
84
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
.gitlab-ci.yml
+
67
−
7
Options
stages
:
-
license
-
build_and_test
############ YAML ANCHORS ############
.preliminaries_template
:
&preliminaries_definition
## Install ssh-agent if not already installed, it is required by Docker.
@@ -20,7 +24,45 @@
# update apt
-
apt-get update
# create 'ci_deps' folder (if not exists)
-
mkdir -pv ci_deps
.license_header_template
:
&license_header_definition
-
cd $CI_PROJECT_DIR
# configure git
-
export CI_NEW_BRANCH=ci_processing$RANDOM
-
echo creating new temporary branch... $CI_NEW_BRANCH
-
git config --global user.email "${CI_EMAIL}"
-
git config --global user.name "${CI_USERNAME}"
-
git checkout -b $CI_NEW_BRANCH
# temporary branch
# 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_scripts/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_scripts/license_manager.sh --update --path=. --license-header=license_header_${CURRENT_YEAR}.txt --exclude=ci_deps
-
fi
# push changes (if any)
-
if git commit -a -m "[skip ci] license headers added or modified" ; then
-
git remote set-url --push origin "ssh://git@gitlab.iri.upc.edu:2202/${CI_PROJECT_PATH}.git"
-
git push origin $CI_NEW_BRANCH:${CI_COMMIT_REF_NAME}
-
else
-
echo "No changes, nothing to commit!"
-
fi
.install_wolf_template
:
&install_wolf_definition
-
cd ${CI_PROJECT_DIR}/ci_deps
-
if [ -d wolf ]; then
-
echo "directory wolf exists"
-
cd wolf
@@ -34,26 +76,43 @@
-
mkdir -pv build
-
cd build
-
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
-
make -j$
WOLF_N_PROC
-
ctest -j$
WOLF_N_PROC
-
make -j$
(nproc)
-
ctest -j$
(nproc)
-
make install
-
cd ../..
.build_and_test_template
:
&build_and_test_definition
-
cd $CI_PROJECT_DIR
-
mkdir -pv build
-
cd build
-
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
-
make -j$
WOLF_N_PROC
-
ctest -j$
WOLF_N_PROC
-
make -j$
(nproc)
-
ctest -j$
(nproc)
-
make install
############ LICENSE HEADERS ############
license_headers
:
stage
:
license
image
:
labrobotica/wolf_deps:16.04
cache
:
-
key
:
wolf-xenial
paths
:
-
ci_deps/wolf/
except
:
-
master
before_script
:
-
*preliminaries_definition
-
*install_wolf_definition
script
:
-
*license_header_definition
############ UBUNTU 16.04 TESTS ############
build_and_test:xenial
:
stage
:
build_and_test
image
:
labrobotica/wolf_deps:16.04
cache
:
-
key
:
wolf-xenial
paths
:
-
wolf/
-
ci_deps/
wolf/
except
:
-
master
before_script
:
@@ -64,11 +123,12 @@ build_and_test:xenial:
############ UBUNTU 18.04 TESTS ############
build_and_test:bionic
:
stage
:
build_and_test
image
:
labrobotica/wolf_deps:18.04
cache
:
-
key
:
wolf-bionic
paths
:
-
wolf/
-
ci_deps/
wolf/
except
:
-
master
before_script
:
Loading