71 lines
2.4 KiB
YAML
71 lines
2.4 KiB
YAML
variables:
|
|
DOCKER_DRIVER: overlay2
|
|
PACKAGES_LIST: ros2trace tracetools tracetools_launch tracetools_read tracetools_test tracetools_trace
|
|
BASE_IMAGE_ID: registry.gitlab.com/micro-ros/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
|
|
<<: *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
|
|
<<: *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
|
|
<<: *global_artifacts
|
|
|
|
coverage:
|
|
stage: report
|
|
image: $BASE_IMAGE_ID:$DISTRO
|
|
script:
|
|
- 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 test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST --mixin coverage-pytest
|
|
- colcon test-result --all
|
|
- colcon lcov-result --packages-select tracetools tracetools_test --verbose
|
|
- coverage combine build/tracetools_test/pytest_cov/*/.coverage
|
|
- coverage report -m
|
|
allow_failure: true
|
|
<<: *global_artifacts
|