ros2_tracing/.gitlab-ci.yml
Christophe Bedard dcef27b707 Add DCO check job to CI 'report' stage
With a slight workaround for a non-default branch.

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
2021-03-15 14:40:43 -04:00

89 lines
3 KiB
YAML

variables:
DOCKER_DRIVER: overlay2
PACKAGES_LIST: ros2trace tracetools tracetools_launch tracetools_read tracetools_test tracetools_trace
BASE_IMAGE_ID: registry.gitlab.com/ros-tracing/ci_base
DISTRO: foxy
stages:
- build_test
- report
.global_artifacts: &global_artifacts
artifacts:
paths:
- install
- build/*/test_results/*/*.xunit.xml
- build/*/pytest.xml
reports:
junit:
- build/*/test_results/*/*.xunit.xml
- build/*/pytest.xml
before_script:
- vcs import < instrumented.repos
- . /root/ws/install/local_setup.sh
tracing_enabled:
stage: build_test
image: $BASE_IMAGE_ID:$DISTRO
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
- . install/setup.sh
- ./build/tracetools/status
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
- colcon test-result --all --verbose
<<: *global_artifacts
tracing_disabled:
stage: build_test
image: $BASE_IMAGE_ID:$DISTRO
script:
- colcon build --symlink-install --event-handlers console_cohesion+ --cmake-args " -DTRACETOOLS_DISABLED=ON" --packages-up-to $PACKAGES_LIST
- (! ./build/tracetools/status)
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
- colcon test-result --all --verbose
<<: *global_artifacts
no_lttng:
stage: build_test
image: $BASE_IMAGE_ID:$DISTRO-base
script:
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST
- . install/setup.sh
- (! ./build/tracetools/status)
- (! ros2 trace)
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
- colcon test-result --all --verbose
<<: *global_artifacts
coverage:
stage: report
image: $BASE_IMAGE_ID:$DISTRO
script:
- pip3 install -U codecov
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST --mixin coverage-gcc coverage-pytest --cmake-args -DBUILD_TESTING=ON --no-warn-unused-cli
- colcon lcov-result --initial
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST --mixin coverage-pytest
- colcon test-result --all --verbose
- colcon lcov-result --packages-select tracetools tracetools_test --filter **/tracetools_test/test/* --verbose
- colcon coveragepy-result --packages-select $PACKAGES_LIST --verbose --coverage-report-args -m
- codecov -X gcovout --file lcov/total_coverage.info coveragepy/.coverage
allow_failure: true
<<: *global_artifacts
dco:
stage: report
image: $BASE_IMAGE_ID:$DISTRO-base
before_script: []
script:
- pip3 install -U dco-check
- CI_DEFAULT_BRANCH=foxy dco-check --verbose --default-branch foxy
trigger_gen_docs:
stage: report
only:
refs:
- master
- foxy
trigger: ros-tracing/ros2_tracing-api