-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.gitlab-ci.yml
88 lines (67 loc) · 1.54 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
.default: &default_config
rules:
- if: $CI_PIPELINE_SOURCE == "web"
when: on_success
- if: $CI_PIPELINE_SOURCE != "push"
when: never
- if: $CI_COMMIT_BRANCH == "testing"
allow_failure: true
when: on_success
- if: $CI_COMMIT_BRANCH == "master"
when: on_success
cache:
key: apptainer
paths:
- robotto_setup/ros-noetic-robotto.sif
policy: pull
stages:
- apptainer
- setup
- build
- test
get-apptainer:
stage: setup
<<: *default_config
cache:
policy: push
script:
- git clone --depth 1 [email protected]:robotto/robotto_setup.git
setup-workspace:
stage: setup
<<: *default_config
script:
- mkdir -p workspace/src
- cd workspace/src
- ln -s ../../atwork_* .
- cd ..
- echo "#!/bin/bash" > run
- echo "cd workspace" >> run
- echo "source /opt/ros/noetic/setup.bash" >> run
- echo "source devel/setup.bash" >> run
- echo "catkin \$@" >> run
- chmod 0755 run
artifacts:
paths:
- workspace
build-atwork_commander:
stage: build
<<: *default_config
script:
- apptainer exec robotto_setup/ros-noetic-robotto.sif ./workspace/run build
artifacts:
paths:
- workspace
dependencies:
- setup-workspace
- get-apptainer
test-atwork_commander:
stage: test
<<: *default_config
script:
- apptainer exec robotto_setup/ros-noetic-robotto.sif ./workspace/run test
artifacts:
paths:
- workspace/logs
dependencies:
- build-atwork_commander
- get-apptainer