Merge branch 'improve-ci' into 'master'
Split build/test jobs into two separate stages and use 'needs' See merge request ros-tracing/tracetools_analysis!104
This commit is contained in:
commit
c5645a440c
1 changed files with 33 additions and 13 deletions
|
@ -6,13 +6,23 @@ variables:
|
||||||
ROS2TRACING_BRANCH: master
|
ROS2TRACING_BRANCH: master
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build_test
|
- build
|
||||||
|
- test
|
||||||
- report
|
- report
|
||||||
|
|
||||||
.global_artifacts: &global_artifacts
|
.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:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- install
|
|
||||||
- build/*/test_results/*/*.xunit.xml
|
- build/*/test_results/*/*.xunit.xml
|
||||||
- build/*/pytest.xml
|
- build/*/pytest.xml
|
||||||
reports:
|
reports:
|
||||||
|
@ -20,37 +30,46 @@ stages:
|
||||||
- build/*/test_results/*/*.xunit.xml
|
- build/*/test_results/*/*.xunit.xml
|
||||||
- build/*/pytest.xml
|
- build/*/pytest.xml
|
||||||
|
|
||||||
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:
|
build:
|
||||||
stage: build_test
|
stage: build
|
||||||
image: $BASE_IMAGE_ID:$DISTRO
|
image: $BASE_IMAGE_ID:$DISTRO
|
||||||
|
<<: *before_script_build
|
||||||
script:
|
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
|
- 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
|
||||||
|
script:
|
||||||
|
- . /root/ws/install/local_setup.sh
|
||||||
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
|
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
|
||||||
- colcon test-result --all --verbose
|
- colcon test-result --all --verbose
|
||||||
<<: *global_artifacts
|
<<: *test_artifacts
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
stage: report
|
stage: report
|
||||||
image: $BASE_IMAGE_ID:$DISTRO
|
image: $BASE_IMAGE_ID:$DISTRO
|
||||||
|
needs:
|
||||||
|
- test
|
||||||
|
<<: *before_script_build
|
||||||
script:
|
script:
|
||||||
- pip3 install -U codecov
|
|
||||||
- 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 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 --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST --mixin coverage-pytest
|
||||||
- colcon test-result --all --verbose
|
- colcon test-result --all --verbose
|
||||||
- colcon coveragepy-result --packages-select $PACKAGES_LIST --verbose --coverage-report-args -m
|
- colcon coveragepy-result --packages-select $PACKAGES_LIST --verbose --coverage-report-args -m
|
||||||
|
- pip3 install -U codecov
|
||||||
- codecov --file coveragepy/.coverage
|
- codecov --file coveragepy/.coverage
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
<<: *global_artifacts
|
|
||||||
|
|
||||||
dco:
|
dco:
|
||||||
stage: report
|
stage: report
|
||||||
image: $BASE_IMAGE_ID:$DISTRO-base
|
image: $BASE_IMAGE_ID:$DISTRO-base
|
||||||
before_script: []
|
|
||||||
script:
|
script:
|
||||||
- pip3 install -U dco-check
|
- pip3 install -U dco-check
|
||||||
- dco-check --verbose
|
- dco-check --verbose
|
||||||
|
@ -60,5 +79,6 @@ trigger_gen_docs:
|
||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
- master
|
- master
|
||||||
|
- galactic
|
||||||
- foxy
|
- foxy
|
||||||
trigger: ros-tracing/tracetools_analysis-api
|
trigger: ros-tracing/tracetools_analysis-api
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue