forked from ros-tracing/tracetools_analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
82 lines (75 loc) · 2.22 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
variables:
DOCKER_DRIVER: overlay2
PACKAGES_LIST: tracetools_analysis ros2trace_analysis
BASE_IMAGE_ID: registry.gitlab.com/ros-tracing/ci_base
DISTRO: rolling
ROS2TRACING_BRANCH: rolling
stages:
- build
- test
- report
.before_script_build: &before_script_build
before_script:
- . /root/ws/install/local_setup.sh
- python3 get_branch.py --check
- git clone https://gitlab.com/ros-tracing/ros2_tracing.git --branch $(python3 get_branch.py)
.build_artifacts: &build_artifacts
artifacts:
paths:
- install/
- build/
.test_artifacts: &test_artifacts
artifacts:
paths:
- build/*/test_results/*/*.xunit.xml
- build/*/pytest.xml
reports:
junit:
- build/*/test_results/*/*.xunit.xml
- build/*/pytest.xml
build:
stage: build
image: $BASE_IMAGE_ID:$DISTRO
<<: *before_script_build
script:
- lttng --version && apt list lttng-tools liblttng-ust-dev python3-lttng python3-babeltrace
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST
<<: *build_artifacts
test:
stage: test
image: $BASE_IMAGE_ID:$DISTRO
needs:
- build
dependencies:
- build
<<: *before_script_build
script:
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
- colcon test-result --all --verbose
<<: *test_artifacts
coverage:
stage: report
image: $BASE_IMAGE_ID:$DISTRO
needs:
- test
<<: *before_script_build
script:
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST --mixin coverage-pytest --cmake-args -DBUILD_TESTING=ON --no-warn-unused-cli
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST --mixin coverage-pytest
- colcon test-result --all --verbose
- colcon coveragepy-result --packages-select $PACKAGES_LIST --verbose --coverage-report-args -m
- pip3 install -U codecov
- codecov --file coveragepy/.coverage
allow_failure: true
dco:
stage: report
image: $BASE_IMAGE_ID:$DISTRO-base
script:
- pip3 install -U dco-check
- dco-check --verbose
trigger_gen_docs:
stage: report
only:
refs:
- rolling
trigger: ros-tracing/tracetools_analysis-api