Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
laser_scan_utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
labrobotica
algorithms
laser_scan_utils
Commits
2ae3bb1d
Commit
2ae3bb1d
authored
3 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
license-headers
parent
c8f2091c
No related branches found
No related tags found
1 merge request
!6
Resolve "license headers"
Pipeline
#7458
failed
3 years ago
Stage: license
Stage: none
Stage: csm
Stage: falko
Stage: csm_falko
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+67
-21
67 additions, 21 deletions
.gitlab-ci.yml
with
67 additions
and
21 deletions
.gitlab-ci.yml
+
67
−
21
View file @
2ae3bb1d
stages
:
stages
:
-
license
-
none
-
none
-
csm
-
csm
-
falko
-
falko
...
@@ -9,7 +10,43 @@ stages:
...
@@ -9,7 +10,43 @@ stages:
# update apt
# update apt
-
apt-get update
-
apt-get update
.build_install_csm_template
:
&build_install_csm_definition
.license_header_template
:
&license_header_definition
-
cd $CI_PROJECT_DIR
# configure git
-
export CI_NEW_BRANCH=ci_processing$CI_COMMIT_SHORT_SHA
-
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}
-
cd scripts
-
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..."
-
./license_manager.sh --add --path=${CI_PROJECT_DIR} --license-header=license_header_${CURRENT_YEAR}.txt
-
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
-
./license_manager.sh --update --path=${CI_PROJECT_DIR} --license-header=license_header_${CURRENT_YEAR}.txt
-
fi
-
cd ..
# 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_csm_template
:
&install_csm_definition
-
cd $CI_BUILDS_DIR
-
apt-get install -y libgsl-dev
-
apt-get install -y libgsl-dev
-
if [ -d csm ]; then
-
if [ -d csm ]; then
-
echo "directory csm exists"
-
echo "directory csm exists"
...
@@ -22,9 +59,9 @@ stages:
...
@@ -22,9 +59,9 @@ stages:
-
cmake .
-
cmake .
-
make -j2
-
make -j2
-
make install
-
make install
-
cd ..
.build_install_falko_template
:
&build_install_falko_definition
.install_falko_template
:
&install_falko_definition
-
cd $CI_BUILDS_DIR
-
if [ -d falkolib ]; then
-
if [ -d falkolib ]; then
-
echo "directory falkolib exists"
-
echo "directory falkolib exists"
-
cd falkolib
-
cd falkolib
...
@@ -38,9 +75,9 @@ stages:
...
@@ -38,9 +75,9 @@ stages:
-
cmake ..
-
cmake ..
-
make -j2
-
make -j2
-
make install
-
make install
-
cd ../..
.build_and_test_template
:
&build_and_test_definition
.build_and_test_template
:
&build_and_test_definition
-
cd $CI_PROJECT_DIR
-
mkdir -pv build
-
mkdir -pv build
-
cd build
-
cd build
-
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
-
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
...
@@ -48,6 +85,15 @@ stages:
...
@@ -48,6 +85,15 @@ stages:
-
ctest
-
ctest
-
make install
-
make install
############ LICENSE HEADERS ############
license_headers
:
stage
:
license
image
:
labrobotica/wolf_deps:16.04
except
:
-
master
script
:
-
*license_header_definition
############ UBUNTU 16.04 TESTS ############
############ UBUNTU 16.04 TESTS ############
build_and_test_none:xenial
:
build_and_test_none:xenial
:
stage
:
none
stage
:
none
...
@@ -64,10 +110,10 @@ build_and_test_csm:xenial:
...
@@ -64,10 +110,10 @@ build_and_test_csm:xenial:
cache
:
cache
:
-
key
:
csm-xenial
-
key
:
csm-xenial
paths
:
paths
:
-
csm/
-
${CI_BUILDS_DIR}/
csm/
before_script
:
before_script
:
-
*preliminaries_definition
-
*preliminaries_definition
-
*
build_
install_csm_definition
-
*install_csm_definition
-
ldconfig
# update links (shared libraries)
-
ldconfig
# update links (shared libraries)
script
:
script
:
-
*build_and_test_definition
-
*build_and_test_definition
...
@@ -78,10 +124,10 @@ build_and_test_falko:xenial:
...
@@ -78,10 +124,10 @@ build_and_test_falko:xenial:
cache
:
cache
:
-
key
:
falko-xenial
-
key
:
falko-xenial
paths
:
paths
:
-
falkolib/
-
${CI_BUILDS_DIR}/
falkolib/
before_script
:
before_script
:
-
*preliminaries_definition
-
*preliminaries_definition
-
*
build_
install_falko_definition
-
*install_falko_definition
-
ldconfig
# update links (shared libraries)
-
ldconfig
# update links (shared libraries)
script
:
script
:
-
*build_and_test_definition
-
*build_and_test_definition
...
@@ -92,14 +138,14 @@ build_and_test_csm_falko:xenial:
...
@@ -92,14 +138,14 @@ build_and_test_csm_falko:xenial:
cache
:
cache
:
-
key
:
csm-xenial
-
key
:
csm-xenial
paths
:
paths
:
-
csm/
-
${CI_BUILDS_DIR}/
csm/
-
key
:
falko-xenial
-
key
:
falko-xenial
paths
:
paths
:
-
falkolib/
-
${CI_BUILDS_DIR}/
falkolib/
before_script
:
before_script
:
-
*preliminaries_definition
-
*preliminaries_definition
-
*
build_
install_falko_definition
-
*install_falko_definition
-
*
build_
install_csm_definition
-
*install_csm_definition
-
ldconfig
# update links (shared libraries)
-
ldconfig
# update links (shared libraries)
script
:
script
:
-
*build_and_test_definition
-
*build_and_test_definition
...
@@ -120,10 +166,10 @@ build_and_test_csm:bionic:
...
@@ -120,10 +166,10 @@ build_and_test_csm:bionic:
cache
:
cache
:
-
key
:
csm-bionic
-
key
:
csm-bionic
paths
:
paths
:
-
csm/
-
${CI_BUILDS_DIR}/
csm/
before_script
:
before_script
:
-
*preliminaries_definition
-
*preliminaries_definition
-
*
build_
install_csm_definition
-
*install_csm_definition
-
ldconfig
# update links (shared libraries)
-
ldconfig
# update links (shared libraries)
script
:
script
:
-
*build_and_test_definition
-
*build_and_test_definition
...
@@ -134,10 +180,10 @@ build_and_test_falko:bionic:
...
@@ -134,10 +180,10 @@ build_and_test_falko:bionic:
cache
:
cache
:
-
key
:
falko-bionic
-
key
:
falko-bionic
paths
:
paths
:
-
falkolib/
-
${CI_BUILDS_DIR}/
falkolib/
before_script
:
before_script
:
-
*preliminaries_definition
-
*preliminaries_definition
-
*
build_
install_falko_definition
-
*install_falko_definition
-
ldconfig
# update links (shared libraries)
-
ldconfig
# update links (shared libraries)
script
:
script
:
-
*build_and_test_definition
-
*build_and_test_definition
...
@@ -148,14 +194,14 @@ build_and_test_csm_falko:bionic:
...
@@ -148,14 +194,14 @@ build_and_test_csm_falko:bionic:
cache
:
cache
:
-
key
:
csm-bionic
-
key
:
csm-bionic
paths
:
paths
:
-
csm/
-
${CI_BUILDS_DIR}/
csm/
-
key
:
falko-bionic
-
key
:
falko-bionic
paths
:
paths
:
-
falkolib/
-
${CI_BUILDS_DIR}/
falkolib/
before_script
:
before_script
:
-
*preliminaries_definition
-
*preliminaries_definition
-
*
build_
install_falko_definition
-
*install_falko_definition
-
*
build_
install_csm_definition
-
*install_csm_definition
-
ldconfig
# update links (shared libraries)
-
ldconfig
# update links (shared libraries)
script
:
script
:
-
*build_and_test_definition
-
*build_and_test_definition
\ No newline at end of file
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