aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: 8a47da8650bea0b27e4b16f238eba8af2b44c23a (plain)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# Use our custom Crops-derived image
image: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/yocto-builder:master

  # First do a common bootstrap, and then build all the targets
stages:
  - prep
  - bootstrap
  - build

# Common job fragment to get a worker ready
.setup:
  stage: build
  variables:
    KAS_WORK_DIR: $CI_PROJECT_DIR/work
    KAS_REPO_REF_DIR: $CI_BUILDS_DIR/persist/repos
    SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate
    DL_DIR: $CI_BUILDS_DIR/persist/downloads
    BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml
  before_script:
    - echo KAS_WORK_DIR = $KAS_WORK_DIR
    - echo SSTATE_DIR = $SSTATE_DIR
    - echo DL_DIR = $DL_DIR
    - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR

# Generalised fragment to do a Kas build
.build:
  extends: .setup
  script:
  - KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
  - kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
  - kas build $KASFILES
  - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log


#
# Prep stage, update repositories once
#
update-repos:
  extends: .setup
  stage: prep
  script:
  - flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos


#
# Bootstrap stage, bootstrap and machine coverage
#

# Build a number of native tools first to ensure the other builders don't race
# over them
n1sdp/bootstrap:
  extends: .build
  stage: bootstrap

# What percentage of machines in the layer do we build
machine-coverage:
  stage: bootstrap
  script:
  - ./ci/check-machine-coverage
  coverage: '/Coverage: \d+/'


#
# Build stage, the actual build jobs
#

corstone500:
  extends: .build

corstone700-fvp:
  extends: .build

corstone700-mps3:
  extends: .build

fvp-base:
  extends: .build

fvp-base-arm32:
  extends: .build

fvp-base-arm32/external-gcc-arm32:
  extends: .build

fvp-baser-aemv8r64:
  extends: .build

gem5-arm64:
  extends: .build

gem5-arm64-xen:
  extends: .build

gem5-atp-arm64:
  extends: .build

generic-arm64:
  extends: .build

juno:
  extends: .build

juno/clang:
  extends: .build

microbit-v1:
  extends: .build

musca-b1:
  extends: .build

musca-s1:
  extends: .build

n1sdp:
  extends: .build

n1sdp/armgcc:
  extends: .build

qemu-cortex-a53:
  extends: .build

qemuarm:
  extends: .build

qemuarm64-sbsa:
  extends: .build

qemuarm64-secureboot:
  extends: .build

qemuarm64-secureboot/clang:
  extends: .build

qemuarm64-secureboot/clang/musl:
  extends: .build

qemuarm64-secureboot/musl:
  extends: .build

qemuarmv5:
  extends: .build

sgi575:
  extends: .build

tc0:
  extends: .build


#
# Utility tasks, not executed automatically
#

# Report on disk usage
usage:
  extends: .setup
  stage: prep
  when: manual
  script:
  - du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR

delete-dl-dir:
  extends: .setup
  stage: prep
  when: manual
  script:
  - rm -rf $DL_DIR/*

delete-repo-dir:
  extends: .setup
  stage: prep
  when: manual
  script:
  - rm -rf $KAS_REPO_REF_DIR/*

# Wipe out old sstate
prune-sstate:
  extends: .setup
  stage: prep
  when: manual
  script:
  - du -h -s $SSTATE_DIR
  - find $SSTATE_DIR -type f -atime +30 -delete
  - du -h -s $SSTATE_DIR

# Delete all sstate
delete-sstate:
  extends: .setup
  stage: prep
  when: manual
  script:
  - rm -rf $SSTATE_DIR/*