-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
89 lines (73 loc) · 3.63 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
83
84
85
86
87
88
89
# The following block is needed for the shared Docker-based runner
# For local runners you might want to enable the overlay driver:
# https://docs.gitlab.com/ce/ci/docker/using_docker_build.html#using-the-overlayfs-driver
image: docker:git # docker and git clients
# enable docker-in-docker
services:
- docker:dind
# The docker runner does not expose /tmp to the docker-in-docker service
# This config ensures that the temp folder is located inside the project directory (e.g. for prerelease tests or SSH agent forwarding)
variables:
TMPDIR: "${CI_PROJECT_DIR}.tmp"
# A upstream workspace is created with the dependencies from the specified repos file. It has to be in the vcstool format: https://github.com/dirk-thomas/vcstool
UPSTREAM_WORKSPACE: ".ci.repos"
ROS_DISTRO: "melodic"
ROS_REPO: "testing"
VERBOSE_OUTPUT: "true"
VERBOSE_TESTS: "true"
# Dependencies for your project:
# Most projects will require the rll_sdk to be installed. The rll_sdk doesn't require itself, which is why repositories are left empty
# If you copy this config to a project and depend on the rll_sdk, simply adjust the REPOS_DEFAULT variable below as indicated by the comment
PROJECT_REPOS_FILENAME: ".ci.repos" # Used to generate the file if it does not exist
REPOS_SDK_TEMPLATE: "{repositories: {rll_sdk: {type: git, url: 'https://gitlab.ipr.kit.edu/rll/rll_sdk.git', version: master}}}"
REPOS_DEFAULT: "{repositories: {}}" # ${REPOS_SDK_TEMPLATE}
before_script:
- apk add --update bash coreutils tar # install industrial_ci dependencies
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci .industrial_ci
# create the .repos file if it does not exist
- test ! -f ${PROJECT_REPOS_FILENAME} && echo ${REPOS_DEFAULT} >> ${PROJECT_REPOS_FILENAME}
- sed -i 's/https\:\/\/gitlab\.ipr\.kit\.edu/https\:\/\/gitlab-ci-token\:'${CI_JOB_TOKEN}'\@gitlab\.ipr\.kit\.edu/g' ${CI_PROJECT_DIR}/${PROJECT_REPOS_FILENAME}
# download config files if they do not exist
- test ! -f .clang-format && wget https://gitlab.ipr.kit.edu/rll/rll_sdk/raw/master/.clang-format
- test ! -f .clang-tidy && wget https://gitlab.ipr.kit.edu/rll/rll_sdk/raw/master/.clang-tidy
- test ! -f .flake8 && wget https://gitlab.ipr.kit.edu/rll/rll_sdk/raw/master/.flake8
- test ! -f .pylintrc && wget https://gitlab.ipr.kit.edu/rll/rll_sdk/raw/master/.pylintrc
# Format checks are run for every branch regardless of the ROS_DISTRO
format-check:
variables:
# run clang format check
CLANG_FORMAT_VERSION: "6.0"
CLANG_FORMAT_CHECK: "file"
AFTER_SCRIPT: "apt -yq install python-pip && pip -q install flake8 typing && python -m flake8"
script: .industrial_ci/gitlab.sh
tags:
- docker # use docker runner
kinetic-build-rostests:
variables:
ROS_DISTRO: "kinetic" # override ROS_DISTRO variable
AFTER_SETUP_UPSTREAM_WORKSPACE: "apt -yq install python-pip && pip -q install typing"
# if a build fails without errors it is sometimes useful to switch to a more verbose builder
# However, catkin_make does bring its own set of problems so a successful build with catkin is preferred
# BUILDER: "catkin_make"
# run default -> build
script: .industrial_ci/gitlab.sh
tags:
- docker
melodic-build-rostests:
variables:
BUILDER : "catkin_make"
# run default -> build
script: .industrial_ci/gitlab.sh
tags:
- docker
warningbuild-linting:
variables:
ADDITIONAL_DEBS: "python-pip python-typing clang-tidy-7 clang-7"
CATKIN_LINT: "pedantic"
CMAKE_ARGS: "-DCMAKE_CXX_FLAGS=-Werror"
NOT_TEST_BUILD: "true"
AFTER_SCRIPT: .ci/linting.sh
# run default -> build
script: .industrial_ci/gitlab.sh
tags:
- docker