forked from ros-industrial/industrial_ci
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
99 lines (80 loc) · 3.01 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
90
91
92
93
94
95
96
97
98
# 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
# 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" #
CCACHE_DIR: ${CI_PROJECT_DIR}/ccache
cache:
key: "${CI_JOB_NAME}" # https://docs.gitlab.com/ee/ci/caching/#sharing-caches-across-different-branches
paths:
- ccache
# enable docker-in-docker
services:
- docker:20.10.16-dind
before_script:
- apk add --update bash coreutils tar grep # install industrial_ci dependencies
# for regular users: - git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci .industrial_ci -b master
- mkdir .industrial_ci && cp -a * .industrial_ci # this is only needed for branch testing of industrial_ci itself
# setup the actual tests
indigo:
script: .industrial_ci/gitlab.sh
variables:
ROS_DISTRO: "indigo"
TARGET_WORKSPACE: 'industrial_ci/mockups/industrial_ci_testpkg'
kinetic:
script: .industrial_ci/gitlab.sh ROS_DISTRO=kinetic # alternate syntax
noetic:
image: ros:noetic
script: ./gitlab.sh
before_script: []
services: []
variables:
ISOLATION: shell
humble:
script: .industrial_ci/gitlab.sh
variables:
TARGET_WORKSPACE: ". github:ros-controls/control_msgs#galactic-devel"
ROS_DISTRO: "humble"
PRERELEASE: "true"
CCACHE_DIR:
dashing:
script: .industrial_ci/gitlab.sh ROS_DISTRO=dashing
# some internal tests
docker_pull:
script:
- docker pull ros:kinetic
- docker tag ros:kinetic industrial-ci/ubuntu:xenial
- .industrial_ci/gitlab.sh ROS_DISTRO=kinetic DOCKER_IMAGE="industrial-ci/ubuntu:xenial" EXPECT_EXIT_CODE=1
docker_no_pull:
script:
- docker pull ros:kinetic
- docker tag ros:kinetic industrial-ci/ubuntu:xenial
- .industrial_ci/gitlab.sh ROS_DISTRO=kinetic DOCKER_IMAGE="industrial-ci/ubuntu:xenial" DOCKER_PULL=false
test_arm:
script:
- docker run --rm --privileged multiarch/qemu-user-static --reset --credential yes --persistent yes
- .industrial_ci/gitlab.sh DOCKER_IMAGE='arm32v7/ros:melodic-ros-core' BEFORE_INIT='[[ $(uname -p) == armv7l ]] && exit 42' EXPECT_EXIT_CODE=42
test_junit_docker:
script: .industrial_ci/gitlab.sh TARGET_WORKSPACE=". gh:ros/filters.git#HEAD"
variables:
ROS_DISTRO: noetic
BASEDIR: ${CI_PROJECT_DIR}/.workspaces
artifacts:
when: always
reports:
junit: ${BASEDIR}/target_ws/**/test_results/**/*.xml
test_junit_shell:
image: ros:noetic
script: ./gitlab.sh TARGET_WORKSPACE=". gh:ros/filters.git#HEAD"
before_script: []
services: []
variables:
ISOLATION: shell
BASEDIR: ${CI_PROJECT_DIR}/.workspaces
artifacts:
when: always
reports:
junit: ${BASEDIR}/target_ws/**/test_results/**/*.xml