Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
9c574b06
Commit
9c574b06
authored
Jun 25, 2018
by
Guilhem Saurel
Browse files
Add doc-coverage target
parent
5635fd75
Pipeline
#875
passed with stages
in 57 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
9c574b06
...
...
@@ -5,6 +5,7 @@ from subprocess import check_output
from
django.conf
import
settings
from
django.db
import
models
from
django.db.models.functions
import
Length
from
django.template.loader
import
get_template
from
django.utils.dateparse
import
parse_datetime
from
django.utils.safestring
import
mark_safe
...
...
@@ -274,6 +275,10 @@ class Project(Links, NamedModel, TimeStampedModel):
def
registry
(
self
):
return
settings
.
PUBLIC_REGISTRY
if
self
.
public
else
settings
.
PRIVATE_REGISTRY
def
doc_coverage_image
(
self
):
images
=
Image
.
objects
.
filter
(
robotpkg__project
=
self
,
py3
=
False
,
target__name
=
'16.04'
)
return
images
.
order_by
(
Length
(
'robotpkg__name'
).
desc
()).
first
()
class
Repo
(
TimeStampedModel
):
name
=
models
.
CharField
(
max_length
=
200
)
...
...
rainboard/templates/rainboard/gitlab-ci.yml
View file @
9c574b06
...
...
@@ -19,19 +19,29 @@ cache:
-
make install
-
cd work.$(hostname)/$(make show-var VARNAME=DISTNAME)
{
%
if project.tests %
}
- make check
{
%
endif %
}{
%
if project.docs %
}
- make doc
- mv doc/doxygen-html ${CI_PROJECT_DIR}
{
%
endif %
}
{
%
for image in robotpkg.valid_images %
}{{
image.get_job_name
}}
:
<<
:
*robotpkg-
{{
robotpkg
}}
image
:
{{
image.get_image_name
}}
{
%
if image.debug %
}
before_script
:
-
echo PKG_OPTIONS.{{ robotpkg }}=debug >> /opt/openrobots/etc/robotpkg.conf
{
%
elif project.docs and image.target.name == '16.04' and not image.py3 %
}
artifacts
:
{
%
endif %
}
{
%
endfor %
}{
%
endfor %
}{
%
if project.tests or project.docs %
}
doc-coverage
:
{
%
with image=project.doc_coverage_image %
}
<<
:
*robotpkg-
{{
image.robotpkg
}}
image
:
{{
image.get_image_name
}}
before_script
:
-
echo -e 'CXXFLAGS+= --coverage\nLDFLAGS+= --coverage\nPKG_DEFAULT_OPTIONS= debug' >> /opt/openrobots/etc/robotpkg.conf
after_script
:
-
cd /root/robotpkg/{{ image.robotpkg.category }}/{{ image.robotpkg }}{% endwith %}
-
cd work.$(hostname)/$(make show-var VARNAME=DISTNAME)
{
%
if project.docs %
}
- make doc
- mv doc/doxygen-html ${CI_PROJECT_DIR}
{
%
endif %
}{
%
if project.tests%
}
- mkdir -p ${CI_PROJECT_DIR}/coverage/
- gcovr -r .
- gcovr -r . --html --html-details -o ${CI_PROJECT_DIR}/coverage/index.html
{
%
endif %
}
artifacts
:
expire_in
:
1 day
paths
:
-
doxygen-html/
-
coverage/
{
%
endif %
}
{
%
endfor %
}
{
%
endfor %
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment