Remove old GitLab CI files (#31)
Some checks are pending
Mirror rolling to master / mirror-to-master (push) Waiting to run
Test / build-and-test (binary, rolling) (push) Waiting to run
Test / build-and-test (source, rolling) (push) Waiting to run

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
This commit is contained in:
Christophe Bedard 2024-06-26 15:23:43 -04:00 committed by GitHub
parent 6550e878bc
commit d2bd9bae04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 201 deletions

View file

@ -1,82 +0,0 @@
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

View file

@ -1,119 +0,0 @@
# Copyright 2020 Christophe Bedard
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Get ros2_tracing branch name from the last commit or a default value."""
import argparse
import os
import sys
from typing import List
from typing import Optional
ENV_DEFAULT_BRANCH = 'ROS2TRACING_BRANCH'
ENV_COMMIT_DESCRIPTION = 'CI_COMMIT_DESCRIPTION'
ROS2_TRACING_BRANCH_TRAILER_TOKEN = 'Ros2-tracing-branch'
def add_args(parser: argparse.ArgumentParser) -> None:
parser.add_argument(
'-c', '--check',
action='store_true',
default=False,
help='only process and print resulting branch in a verbose way',
)
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description='Extract name of the (optional) ros2_tracing branch to be used for CI',
)
add_args(parser)
return parser.parse_args()
def get_trailer_value(
trailer_name: str,
commit_description: str,
check: bool = False,
) -> Optional[str]:
# Get trailer line
trailer_lines = [
line for line in commit_description.split('\n') if trailer_name in line
]
if len(trailer_lines) == 0:
if check:
print(f'could not find any trailer lines for: \'{trailer_name}\'')
return None
elif len(trailer_lines) > 1:
if check:
print(
f'found more than one trailer lines for: \'{trailer_name}\' '
'(will use the first one)'
)
# Extract value
line = trailer_lines[0]
if not (trailer_name + ':') in line:
if check:
print(f'could not find: \'{trailer_name}:\'')
return None
key_value = line.split(':')
if len(key_value) != 2:
if check:
print(f'misformed trailer line: \'{key_value}\'')
return None
value = key_value[1].strip()
if len(value) == 0:
if check:
print(f'misformed trailer value: \'{value}\'')
return None
return value
def main() -> int:
args = parse_args()
check = args.check
# Get default value
default_branch = os.environ.get(ENV_DEFAULT_BRANCH, None)
if default_branch is None:
if check:
print(f'could not get environment variable: \'{ENV_DEFAULT_BRANCH}\'')
return 1
# Get commit description
commit_description = os.environ.get(ENV_COMMIT_DESCRIPTION, None)
if commit_description is None:
if check:
print(f'could not get environment variable: \'{ENV_COMMIT_DESCRIPTION}\'')
return None
# Get value
branch = get_trailer_value(
ROS2_TRACING_BRANCH_TRAILER_TOKEN,
commit_description,
check,
)
# Print value
prefix = 'ros2_tracing branch: ' if check else ''
print(prefix + (branch or default_branch))
return 0
if __name__ == '__main__':
sys.exit(main())