]>
Commit | Line | Data |
---|---|---|
c378d4dd SM |
1 | # see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options |
2 | ||
3 | # Stages explained | |
4 | # | |
5 | # images: Build the images with the bootstrap script | |
6 | # build_first: Build a few things first to find silly errors (fast job) | |
7 | # (don't pay for 35 machines until something compiles) | |
8 | # build: The main parallel job | |
9 | # (keep these to 1hour as we are billed per hour) | |
10 | # test_only: Tests using the build from prior stages, these typically | |
11 | # have an explicit dependency defined to a specific build job, | |
12 | # which means that start as soon as the build job finished. | |
13 | # test_private: Like test_only, but running on private runners | |
14 | # report: Code coverage reporting | |
15 | ||
16 | stages: | |
17 | - images | |
18 | - build_first | |
19 | - build | |
20 | - test_only | |
21 | - test_private | |
22 | - report | |
23 | ||
24 | variables: | |
25 | # We want to be resilient to runner failures | |
26 | ARTIFACT_DOWNLOAD_ATTEMPTS: "3" | |
27 | EXECUTOR_JOB_SECTION_ATTEMPTS: "3" | |
28 | GET_SOURCES_ATTEMPTS: "3" | |
29 | RESTORE_CACHE_ATTEMPTS: "3" | |
30 | # | |
31 | GIT_STRATEGY: fetch | |
32 | GIT_DEPTH: "3" | |
4f7c6ba5 AB |
33 | # |
34 | # Use GZip by default, it is fast and is good enough. Other options include --xz | |
35 | ||
36 | SAMBA_TESTBASE_TAR_OPTIONS: -z | |
37 | ||
c378d4dd SM |
38 | # |
39 | # we run autobuild.py inside a samba CI docker image located on gitlab's registry | |
40 | # overwrite this variable if you want use your own image registry. | |
41 | # | |
42 | # Or better ask for access to the shared development repository, see | |
43 | # https://wiki.samba.org/index.php/Samba_CI_on_gitlab#Getting_Access | |
44 | # | |
45 | SAMBA_CI_CONTAINER_REGISTRY: registry.gitlab.com/samba-team/devel/samba | |
46 | # | |
47 | # Set this to the contents of bootstrap/sha1sum.txt | |
48 | # which is generated by bootstrap/template.py --render | |
49 | # | |
34d80fc9 | 50 | SAMBA_CI_CONTAINER_TAG: 9a406973474a7903fe7fd6215226660911ed73c0 |
c378d4dd | 51 | # |
7105554c SM |
52 | # We use the ubuntu2204 image as default as |
53 | # it matches what we have on atb-devel-224 | |
c378d4dd | 54 | # |
7105554c | 55 | SAMBA_CI_CONTAINER_IMAGE: ubuntu2204 |
c378d4dd SM |
56 | # |
57 | # The following images are available | |
58 | # Please see the samba-o3 sections at the end of this file! | |
59 | # We should run that for each available image | |
60 | # | |
45522798 | 61 | SAMBA_CI_CONTAINER_IMAGE_ubuntu2004: ubuntu2004 |
7105554c | 62 | SAMBA_CI_CONTAINER_IMAGE_ubuntu2204: ubuntu2204 |
c901adaa | 63 | SAMBA_CI_CONTAINER_IMAGE_debian11: debian11 |
7b6cedf5 SM |
64 | SAMBA_CI_CONTAINER_IMAGE_debian11_32bit: debian11-32bit |
65 | SAMBA_CI_CONTAINER_IMAGE_debian12: debian12 | |
66 | SAMBA_CI_CONTAINER_IMAGE_opensuse155: opensuse155 | |
34d80fc9 | 67 | SAMBA_CI_CONTAINER_IMAGE_fedora39: fedora39 |
45522798 | 68 | SAMBA_CI_CONTAINER_IMAGE_centos7: centos7 |
136ec5bc | 69 | SAMBA_CI_CONTAINER_IMAGE_centos8s: centos8s |
c378d4dd SM |
70 | |
71 | include: | |
72 | # The image creation details are specified in a separate file | |
73 | # See bootstrap/README.md for details | |
74 | - 'bootstrap/.gitlab-ci.yml' | |
75 | ||
45522798 | 76 | .shared_runner_build_image: |
6999e080 | 77 | extends: .shared_runner_build |
45522798 SM |
78 | variables: |
79 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE} | |
80 | image: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-${SAMBA_CI_JOB_IMAGE}:${SAMBA_CI_CONTAINER_TAG} | |
81 | ||
82 | .shared_template: | |
83 | extends: .shared_runner_build_image | |
c378d4dd SM |
84 | # All Samba jobs are interruptible, this avoids burning CPU when a |
85 | # newer branch is pushed. | |
86 | interruptible: true | |
87 | timeout: 2h | |
88 | ||
8ab0238a AB |
89 | # Otherwise we run twice, once on push and once on MR |
90 | # https://forum.gitlab.com/t/new-rules-syntax-and-detached-pipelines/37292 | |
bcc22d00 | 91 | rules: |
8ab0238a AB |
92 | - if: $CI_MERGE_REQUEST_ID |
93 | when: never | |
bcc22d00 AB |
94 | - when: on_success |
95 | ||
c378d4dd SM |
96 | variables: |
97 | AUTOBUILD_JOB_NAME: $CI_JOB_NAME | |
c378d4dd | 98 | stage: build |
c378d4dd | 99 | cache: |
d5759794 | 100 | key: ccache.${CI_JOB_NAME}.${SAMBA_CI_JOB_IMAGE}.${SAMBA_CI_FLAVOR} |
c378d4dd SM |
101 | paths: |
102 | - ccache | |
ce3d33f4 AB |
103 | |
104 | # This is overridden in many cases, but ensures none of the other | |
105 | # main jobs start until and unless this build finishes. However | |
106 | # this also ensures we do not download artifacts from any build | |
107 | # unless we specifically depend on it, saving bandwidth | |
108 | ||
109 | needs: | |
110 | - job: samba-def-build | |
111 | artifacts: false | |
112 | ||
c378d4dd SM |
113 | before_script: |
114 | - uname -a | |
115 | - lsb_release -a | |
116 | - cat /etc/os-release | |
117 | - lscpu | |
118 | - cat /proc/cpuinfo | |
119 | - mount | |
120 | - df -h | |
121 | - cat /proc/swaps | |
122 | - free -h | |
123 | # ld will fail if coverage enabled, force link ld to ld.bfd | |
124 | - if [ -n "$SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE" ]; then sudo ln -sf $(which ld.bfd) $(which ld); fi | |
125 | # See bootstrap/.gitlab-ci.yml how to generate a new image | |
126 | - echo "SAMBA_CI_CONTAINER_REGISTRY[${SAMBA_CI_CONTAINER_REGISTRY}]" | |
127 | - echo "SAMBA_CI_CONTAINER_TAG[${SAMBA_CI_CONTAINER_TAG}]" | |
45522798 SM |
128 | - echo "SAMBA_CI_JOB_IMAGE[${SAMBA_CI_JOB_IMAGE}]" |
129 | - echo "CI_JOB_IMAGE[${CI_JOB_IMAGE}]" | |
c378d4dd SM |
130 | - bootstrap/template.py --sha1sum > /tmp/sha1sum-template.txt |
131 | - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-template.txt | |
132 | - echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt | |
133 | - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt | |
134 | - diff -u bootstrap/sha1sum.txt /sha1sum.txt | |
135 | - echo "${CI_COMMIT_SHA} ${CI_COMMIT_TITLE}" > /tmp/commit.txt | |
136 | - export CCACHE_BASEDIR="${PWD}" | |
137 | - export CCACHE_DIR="${PWD}/ccache" && mkdir -pv "$CCACHE_DIR" | |
138 | - export CC="ccache cc" | |
139 | - export CXX="ccache c++" | |
140 | - ccache -z -M 500M | |
141 | - ccache -s | |
dd568490 AB |
142 | # We are already running .gitlab-ci directives from this repo, remove additional checks that break our CI |
143 | - git config --global --add safe.directory `pwd` | |
c378d4dd SM |
144 | after_script: |
145 | - mount | |
146 | - df -h | |
147 | - cat /proc/swaps | |
148 | - free -h | |
149 | - CCACHE_BASEDIR="${PWD}" CCACHE_DIR="${PWD}/ccache" ccache -s -c | |
150 | artifacts: | |
151 | expire_in: 1 week | |
152 | paths: | |
153 | - "*.stdout" | |
154 | - "*.stderr" | |
155 | - "*.info" | |
b5984c3d | 156 | - public |
c378d4dd SM |
157 | - system-info.txt |
158 | retry: | |
159 | max: 2 | |
160 | when: | |
161 | - runner_system_failure | |
162 | - stuck_or_timeout_failure | |
163 | - api_failure | |
164 | - runner_unsupported | |
165 | - stale_schedule | |
c378d4dd SM |
166 | - archived_failure |
167 | - scheduler_failure | |
168 | - data_integrity_failure | |
169 | ||
170 | script: | |
171 | # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the | |
172 | # autobuild name, which means we can define a default template that runs most autobuild jobs | |
17117156 | 173 | - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase |
c378d4dd SM |
174 | |
175 | # Ensure when adding a new job below that you also add it to | |
176 | # the dependencies for 'pages' below for the code coverage page | |
177 | # generation. | |
178 | ||
179 | others: | |
180 | extends: .shared_template | |
181 | script: | |
17117156 AB |
182 | - script/autobuild.py pidl $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/pidl |
183 | - script/autobuild.py replace $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/replace | |
184 | - script/autobuild.py talloc $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/talloc | |
185 | - script/autobuild.py tdb $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/tdb | |
186 | - script/autobuild.py tevent $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/tevent | |
187 | - script/autobuild.py samba-xc $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/samba-xc | |
188 | - script/autobuild.py docs-xml $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/docs-xml | |
c378d4dd SM |
189 | |
190 | .shared_template_build_only: | |
191 | extends: .shared_template | |
dd178d97 | 192 | timeout: 2h |
ce3d33f4 | 193 | needs: |
c378d4dd SM |
194 | artifacts: |
195 | expire_in: 1 week | |
196 | paths: | |
197 | - "*.stdout" | |
198 | - "*.stderr" | |
199 | - "*.info" | |
200 | - system-info.txt | |
4f7c6ba5 | 201 | - samba-testbase.tar |
c378d4dd SM |
202 | script: |
203 | # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the | |
204 | # autobuild name, which means we can define a default template that runs most autobuild jobs | |
17117156 | 205 | - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase |
c378d4dd SM |
206 | # On success we need to pack everything into an artifacts file |
207 | # which needs to be in the git checkout. | |
208 | # As tar doesn't handle hardlink of read-only files, | |
209 | # we remember the acls and add write permissions | |
210 | # before creating the archive. The consumer will apply | |
211 | # the acls again. | |
17117156 AB |
212 | - cp -a /sha1sum.txt /builds/samba-testbase/image-sha1sum.txt |
213 | - cp -a /tmp/commit.txt /builds/samba-testbase/commit.txt | |
214 | - ln -s /builds/samba-testbase/${AUTOBUILD_JOB_NAME}/ /builds/samba-testbase/build_subdir_link | |
215 | - pushd /builds && getfacl -R samba-testbase > samba-testbase.acl.dump && popd | |
216 | - chmod -R +w /builds/samba-testbase | |
217 | - mv /builds/samba-testbase.acl.dump /builds/samba-testbase/ | |
218 | - tar $SAMBA_TESTBASE_TAR_OPTIONS -cf samba-testbase.tar /builds/samba-testbase | |
4f7c6ba5 AB |
219 | - ls -la samba-testbase.tar |
220 | - sha1sum samba-testbase.tar | |
c378d4dd SM |
221 | |
222 | .shared_template_test_only: | |
6999e080 SM |
223 | extends: |
224 | - .shared_template | |
225 | - .shared_runner_test | |
c378d4dd SM |
226 | stage: test_only |
227 | script: | |
e908bbb1 AS |
228 | # Print the Kerberos version to check we ended up with the right one |
229 | # in the runner. We do not have configure output to recognize it | |
230 | # otherwise. | |
231 | - if [ -x "$(command -v krb5-config)" ]; then krb5-config --version; fi | |
c378d4dd SM |
232 | # We unpack the artifacts file created by the .shared_template_build_only |
233 | # run we depend on | |
4f7c6ba5 AB |
234 | - ls -la samba-testbase.tar |
235 | - sha1sum samba-testbase.tar | |
236 | - tar $SAMBA_TESTBASE_TAR_OPTIONS -xf samba-testbase.tar -C / | |
17117156 AB |
237 | - diff -u /builds/samba-testbase/image-sha1sum.txt /sha1sum.txt |
238 | - diff -u /builds/samba-testbase/commit.txt /tmp/commit.txt | |
239 | - mv /builds/samba-testbase/samba-testbase.acl.dump /builds/samba-testbase.acl.dump | |
240 | - pushd /builds && setfacl --restore=/builds/samba-testbase.acl.dump && popd | |
241 | - ls -la /builds/samba-testbase/ | |
242 | - ls -la /builds/samba-testbase/build_subdir_link | |
243 | - ls -la /builds/samba-testbase/build_subdir_link/ | |
244 | - if [ -n "$SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE" ]; then find /builds/samba-testbase/build_subdir_link/ -type d -printf "'%p'\n" | xargs chmod u+w; fi | |
245 | - ls -la /builds/samba-testbase/build_subdir_link/ | |
c378d4dd SM |
246 | # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the |
247 | # autobuild name, which means we can define a default template that runs most autobuild jobs | |
17117156 | 248 | - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --skip-dependencies --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase |
c378d4dd SM |
249 | |
250 | samba-def-build: | |
251 | extends: .shared_template_build_only | |
252 | stage: build_first | |
253 | ||
254 | .needs_samba-def-build: | |
255 | extends: .shared_template_test_only | |
256 | needs: | |
257 | - job: samba-def-build | |
258 | artifacts: true | |
61d97ebf | 259 | - job: samba-codecheck |
c378d4dd SM |
260 | |
261 | samba-mit-build: | |
262 | extends: .shared_template_build_only | |
649b0741 | 263 | variables: |
34d80fc9 | 264 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora39} |
d1d47a55 AS |
265 | stage: build_first |
266 | ||
c378d4dd SM |
267 | .needs_samba-mit-build: |
268 | extends: .shared_template_test_only | |
649b0741 | 269 | variables: |
34d80fc9 | 270 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora39} |
c378d4dd SM |
271 | needs: |
272 | - job: samba-mit-build | |
273 | artifacts: true | |
61d97ebf | 274 | - job: samba-codecheck |
c378d4dd SM |
275 | |
276 | samba-h5l-build: | |
277 | extends: .shared_template_build_only | |
278 | ||
279 | .needs_samba-h5l-build: | |
280 | extends: .shared_template_test_only | |
281 | needs: | |
282 | - job: samba-h5l-build | |
283 | artifacts: true | |
284 | ||
8d62b7ac DM |
285 | samba-without-smb1-build: |
286 | extends: .shared_template_build_only | |
287 | ||
288 | .needs_samba-without-smb1-build: | |
289 | extends: .shared_template_test_only | |
290 | needs: | |
291 | - job: samba-without-smb1-build | |
292 | artifacts: true | |
293 | ||
c378d4dd SM |
294 | samba-nt4-build: |
295 | extends: .shared_template_build_only | |
296 | ||
297 | .needs_samba-nt4-build: | |
298 | extends: .shared_template_test_only | |
299 | needs: | |
300 | - job: samba-nt4-build | |
301 | artifacts: true | |
302 | ||
303 | samba-no-opath-build: | |
304 | extends: .shared_template_build_only | |
305 | ||
306 | .needs_samba-no-opath-build: | |
307 | extends: .shared_template_test_only | |
308 | needs: | |
309 | - job: samba-no-opath-build | |
310 | artifacts: true | |
311 | ||
312 | samba: | |
313 | extends: .shared_template | |
314 | ||
315 | samba-mitkrb5: | |
316 | extends: .shared_template | |
649b0741 | 317 | variables: |
34d80fc9 | 318 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora39} |
c378d4dd SM |
319 | |
320 | samba-minimal-smbd: | |
321 | extends: .shared_template | |
322 | ||
6f5546ae SM |
323 | samba-nopython: |
324 | extends: .shared_template | |
325 | ||
c378d4dd SM |
326 | samba-admem: |
327 | extends: .needs_samba-def-build | |
328 | ||
329 | samba-ad-dc-2: | |
330 | extends: .needs_samba-def-build | |
331 | ||
332 | samba-ad-dc-3: | |
333 | extends: .needs_samba-def-build | |
334 | ||
7387da74 SM |
335 | samba-ad-dc-4a: |
336 | extends: .needs_samba-def-build | |
337 | ||
338 | samba-ad-dc-4b: | |
c378d4dd SM |
339 | extends: .needs_samba-def-build |
340 | ||
341 | samba-ad-dc-5: | |
342 | extends: .needs_samba-def-build | |
343 | ||
344 | samba-ad-dc-6: | |
345 | extends: .needs_samba-def-build | |
346 | ||
347 | samba-ad-back1: | |
348 | extends: .needs_samba-def-build | |
349 | ||
350 | samba-ad-back2: | |
351 | extends: .needs_samba-def-build | |
352 | ||
353 | samba-schemaupgrade: | |
354 | extends: .needs_samba-def-build | |
355 | ||
356 | samba-libs: | |
357 | extends: .shared_template | |
358 | ||
359 | samba-fuzz: | |
360 | extends: .shared_template | |
45522798 | 361 | variables: |
7105554c | 362 | # We match what Google is running over at oss-fuzz |
4366c3bb | 363 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2004} |
c378d4dd SM |
364 | |
365 | ctdb: | |
366 | extends: .shared_template | |
367 | ||
368 | samba-ctdb: | |
369 | extends: .shared_template | |
370 | ||
371 | samba-ad-dc-ntvfs: | |
372 | extends: .needs_samba-def-build | |
373 | ||
374 | samba-admem-mit: | |
375 | extends: .needs_samba-mit-build | |
376 | ||
000f389d | 377 | samba-addc-mit-4a: |
7387da74 SM |
378 | extends: .needs_samba-mit-build |
379 | ||
000f389d | 380 | samba-addc-mit-4b: |
c378d4dd SM |
381 | extends: .needs_samba-mit-build |
382 | ||
383 | # This task is run first to ensure we compile before we start the | |
384 | # main run as it is the fastest full compile of Samba. | |
385 | samba-fips: | |
386 | extends: .shared_template | |
45522798 | 387 | variables: |
34d80fc9 | 388 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora39} |
c378d4dd | 389 | |
61d97ebf | 390 | samba-codecheck: |
339e78f2 AS |
391 | extends: .shared_template |
392 | needs: | |
339e78f2 AS |
393 | stage: build_first |
394 | ||
6999e080 SM |
395 | .private_test_only: |
396 | extends: .private_runner_test | |
c378d4dd | 397 | stage: test_private |
bcc22d00 | 398 | rules: |
8ab0238a AB |
399 | # See above, to avoid a duplicate CI on the MR (these rules override the others) |
400 | - if: $CI_MERGE_REQUEST_ID | |
401 | when: never | |
402 | ||
c378d4dd SM |
403 | # These jobs are only run if the gitlab repo has private runners available. |
404 | # To enable private jobs, you must add the following var and value to | |
405 | # your gitlab repo by navigating to: | |
406 | # settings -> CI/CD -> Environment variables | |
bcc22d00 | 407 | - if: $SUPPORT_PRIVATE_TEST == "yes" |
c378d4dd | 408 | |
b1e83b6c | 409 | .needs_ext4_support: |
19fb9a97 AB |
410 | # All runners provide an ext4 filesystem |
411 | # | |
412 | # Note: we don't use | |
413 | # extends: .shared_template_test_only | |
414 | # as that somehow resets the needs section | |
415 | # and generates problems for something | |
416 | # like this (which is used below) | |
417 | # | |
418 | # .needs_samba-SOME-build-ext4: | |
419 | # extends: | |
420 | # - .needs_samba-SOME-build | |
421 | # - .needs_ext4_support | |
422 | # | |
423 | # So we only set stage again instead... | |
424 | stage: test_only | |
b1e83b6c SM |
425 | |
426 | .needs_5_15_kernel: | |
427 | # Our private runners are based on | |
428 | # ubuntu2204 with a 5.15 kernel. | |
429 | # | |
430 | # And they also provide an ext4 filesystem | |
431 | extends: .private_test_only | |
432 | ||
433 | .needs_samba-def-build-ext4: | |
c378d4dd SM |
434 | extends: |
435 | - .needs_samba-def-build | |
b1e83b6c | 436 | - .needs_ext4_support |
c378d4dd | 437 | |
b1e83b6c | 438 | .needs_samba-mit-build-ext4: |
c378d4dd SM |
439 | extends: |
440 | - .needs_samba-mit-build | |
b1e83b6c | 441 | - .needs_ext4_support |
c378d4dd | 442 | |
b1e83b6c | 443 | .needs_samba-h5l-build-ext4: |
c378d4dd SM |
444 | extends: |
445 | - .needs_samba-h5l-build | |
b1e83b6c | 446 | - .needs_ext4_support |
c378d4dd | 447 | |
b1e83b6c SM |
448 | .needs_samba-without-smb1-build-5_15: |
449 | # Currently this doesn't strictly | |
450 | # require a kernel >= 5.15, but only | |
451 | # ext4 support. | |
452 | # | |
453 | # But we want to make sure that | |
454 | # our private runners keep working | |
455 | # and at least do a single job. | |
456 | # | |
457 | # In future we'll be able to run | |
458 | # tests with io_uring in this | |
459 | # setup, which will requires a | |
460 | # 5.15 kernel in order to be useful. | |
8d62b7ac DM |
461 | extends: |
462 | - .needs_samba-without-smb1-build | |
b1e83b6c | 463 | - .needs_5_15_kernel |
8d62b7ac | 464 | |
b1e83b6c | 465 | .needs_samba-nt4-build-ext4: |
c378d4dd SM |
466 | extends: |
467 | - .needs_samba-nt4-build | |
b1e83b6c | 468 | - .needs_ext4_support |
c378d4dd | 469 | |
b1e83b6c | 470 | .needs_samba-no-opath-build-ext4: |
c378d4dd SM |
471 | extends: |
472 | - .needs_samba-no-opath-build | |
b1e83b6c | 473 | - .needs_ext4_support |
c378d4dd SM |
474 | |
475 | samba-fileserver: | |
b1e83b6c | 476 | extends: .needs_samba-h5l-build-ext4 |
c378d4dd | 477 | |
8d62b7ac | 478 | samba-fileserver-without-smb1: |
b1e83b6c | 479 | extends: .needs_samba-without-smb1-build-5_15 |
8d62b7ac | 480 | |
6145c388 | 481 | # This is a full build without the AD DC so we test the build with MIT |
7b6cedf5 | 482 | # Kerberos from the default system (Ubuntu 22.04 at this stage). |
6145c388 AB |
483 | # Runtime behaviour checked via the ktest (static ccache and keytab) |
484 | # environment | |
485 | samba-ktest-mit: | |
486 | extends: .shared_template | |
487 | ||
c378d4dd | 488 | samba-ad-dc-1: |
b1e83b6c | 489 | extends: .needs_samba-def-build-ext4 |
c378d4dd SM |
490 | |
491 | samba-nt4: | |
b1e83b6c | 492 | extends: .needs_samba-nt4-build-ext4 |
c378d4dd | 493 | |
000f389d | 494 | samba-addc-mit-1: |
b1e83b6c | 495 | extends: .needs_samba-mit-build-ext4 |
c378d4dd | 496 | |
95a9c3b2 | 497 | samba-no-opath1: |
b1e83b6c | 498 | extends: .needs_samba-no-opath-build-ext4 |
95a9c3b2 SM |
499 | |
500 | samba-no-opath2: | |
b1e83b6c | 501 | extends: .needs_samba-no-opath-build-ext4 |
c378d4dd SM |
502 | |
503 | # 'pages' is a special job which can publish artifacts in `public` dir to gitlab pages | |
504 | pages: | |
45522798 | 505 | extends: .shared_runner_build_image |
c378d4dd | 506 | stage: report |
c378d4dd SM |
507 | dependencies: # tell gitlab to download artifacts for these jobs |
508 | - others | |
509 | - samba | |
510 | - samba-mitkrb5 | |
511 | - samba-admem | |
512 | - samba-ad-dc-2 | |
513 | - samba-ad-dc-3 | |
7387da74 SM |
514 | - samba-ad-dc-4a |
515 | - samba-ad-dc-4b | |
c378d4dd SM |
516 | - samba-ad-dc-5 |
517 | - samba-ad-dc-6 | |
518 | - samba-libs | |
519 | - samba-minimal-smbd | |
6f5546ae | 520 | - samba-nopython |
c378d4dd SM |
521 | - samba-fuzz |
522 | # - ctdb # TODO | |
523 | - samba-ctdb | |
524 | - samba-ad-dc-ntvfs | |
525 | - samba-admem-mit | |
000f389d AS |
526 | - samba-addc-mit-4a |
527 | - samba-addc-mit-4b | |
c378d4dd SM |
528 | - samba-ad-back1 |
529 | - samba-ad-back2 | |
530 | - samba-fileserver | |
8d62b7ac | 531 | - samba-fileserver-without-smb1 |
c378d4dd SM |
532 | - samba-ad-dc-1 |
533 | - samba-nt4 | |
534 | - samba-schemaupgrade | |
000f389d | 535 | - samba-addc-mit-1 |
c378d4dd | 536 | - samba-fips |
95a9c3b2 SM |
537 | - samba-no-opath1 |
538 | - samba-no-opath2 | |
7b6cedf5 | 539 | - ubuntu2204-samba-o3 |
c378d4dd | 540 | script: |
d5759794 | 541 | - ls -la *.info |
c378d4dd SM |
542 | - ./configure.developer |
543 | - make -j | |
d5759794 | 544 | - ls -la *.info |
c378d4dd | 545 | - lcov $(ls *.info | xargs -I{} echo -n "-a {} ") -o all.info |
d5759794 | 546 | - ls -la *.info |
b0b9663c | 547 | - genhtml all.info --ignore-errors source --output-directory public --prefix=$(pwd) --title "coverage report for $CI_COMMIT_REF_NAME $CI_COMMIT_SHORT_SHA" |
c378d4dd SM |
548 | artifacts: |
549 | expire_in: 30 days | |
550 | paths: | |
551 | - public | |
552 | only: | |
553 | variables: | |
554 | - $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == "--enable-coverage" | |
555 | ||
556 | # Coverity Scan | |
557 | coverity: | |
45522798 SM |
558 | extends: .shared_runner_build_image |
559 | variables: | |
7b6cedf5 | 560 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_opensuse155} |
c378d4dd | 561 | stage: build |
c378d4dd SM |
562 | script: |
563 | - wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_PROJECT_NAME" -O /tmp/coverity_tool.tgz | |
564 | - tar xf /tmp/coverity_tool.tgz | |
a842c14d | 565 | - ./configure.developer --with-cluster-support |
c378d4dd SM |
566 | - cov-analysis-linux64-*/bin/cov-build --dir cov-int make -j$(nproc) |
567 | - tar czf cov-int.tar.gz cov-int | |
568 | - curl | |
569 | --form token=$COVERITY_SCAN_TOKEN | |
570 | --form email=$COVERITY_SCAN_EMAIL | |
571 | --form file=@cov-int.tar.gz | |
572 | --form version="`git describe --tags`" | |
573 | --form description="CI build" | |
574 | https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME | |
575 | only: | |
576 | refs: | |
577 | - master | |
578 | - schedules | |
579 | variables: | |
580 | - $COVERITY_SCAN_TOKEN != null | |
581 | - $COVERITY_SCAN_PROJECT_NAME != null | |
582 | - $COVERITY_SCAN_EMAIL != null | |
583 | artifacts: | |
584 | expire_in: 1 week | |
585 | when: on_failure | |
586 | paths: | |
587 | - cov-int/*.txt | |
588 | ||
7b6cedf5 | 589 | debian11-samba-32bit: |
95676825 SM |
590 | extends: .shared_template |
591 | variables: | |
592 | AUTOBUILD_JOB_NAME: samba-32bit | |
7b6cedf5 | 593 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian11_32bit} |
95676825 | 594 | |
c378d4dd SM |
595 | # |
596 | # We build samba-o3 on all supported distributions | |
597 | # | |
598 | ||
836ad937 AB |
599 | # This job, which matches the main CI, needs to still do coverage so |
600 | # we show the coverage on the "none" environment tests | |
a4cce28b AB |
601 | # |
602 | # We want --enable-coverage specified here otherwise we will have a | |
603 | # different set of build options on the coverage build and can fail | |
604 | # when -O3 gets combined with --enable-coverage in the scheduled | |
605 | # builds. | |
606 | ||
7b6cedf5 | 607 | ubuntu2204-samba-o3: |
836ad937 AB |
608 | extends: .shared_template |
609 | variables: | |
610 | AUTOBUILD_JOB_NAME: samba-o3 | |
7b6cedf5 | 611 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2204} |
a4cce28b | 612 | SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: "--enable-coverage" |
bcc22d00 | 613 | rules: |
8ab0238a AB |
614 | # See above, to avoid a duplicate CI on the MR (these rules override the others) |
615 | - if: $CI_MERGE_REQUEST_ID | |
616 | when: never | |
bcc22d00 AB |
617 | # do not run o3 builds (which run a lot of VMs) if told not to |
618 | # (this uses the same variable as autobuild.py) | |
619 | - if: $AUTOBUILD_SKIP_SAMBA_O3 == "1" | |
620 | when: never | |
416ff2c6 | 621 | - when: on_success |
836ad937 AB |
622 | |
623 | # All other jobs do not want code coverage. | |
c378d4dd SM |
624 | .samba-o3-template: |
625 | extends: .shared_template | |
626 | variables: | |
627 | AUTOBUILD_JOB_NAME: samba-o3 | |
7857e124 | 628 | rules: |
8ab0238a AB |
629 | # See above, to avoid a duplicate CI on the MR (these rules override the others) |
630 | - if: $CI_MERGE_REQUEST_ID | |
631 | when: never | |
7857e124 AB |
632 | # do not run o3 builds (which run a lot of VMs) if told not to |
633 | # (this uses the same variable as autobuild.py) | |
634 | - if: $AUTOBUILD_SKIP_SAMBA_O3 == "1" | |
635 | when: never | |
636 | # do not run o3 for coverage since they are using different images | |
637 | - if: $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == "" | |
c378d4dd | 638 | |
c378d4dd SM |
639 | ubuntu2004-samba-o3: |
640 | extends: .samba-o3-template | |
45522798 SM |
641 | variables: |
642 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2004} | |
c378d4dd | 643 | |
7b6cedf5 | 644 | debian11-samba-o3: |
7105554c SM |
645 | extends: .samba-o3-template |
646 | variables: | |
7b6cedf5 | 647 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian11} |
7105554c | 648 | |
7b6cedf5 | 649 | debian12-samba-o3: |
c901adaa MS |
650 | extends: .samba-o3-template |
651 | variables: | |
7b6cedf5 | 652 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian12} |
c901adaa | 653 | |
7b6cedf5 | 654 | opensuse155-samba-o3: |
c378d4dd | 655 | extends: .samba-o3-template |
45522798 | 656 | variables: |
7b6cedf5 | 657 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_opensuse155} |
c378d4dd SM |
658 | |
659 | centos7-samba-o3: | |
660 | extends: .samba-o3-template | |
c378d4dd | 661 | variables: |
45522798 | 662 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_centos7} |
c378d4dd SM |
663 | # Git on CentOS doesn't support shallow git cloning |
664 | GIT_DEPTH: "" | |
665 | # We need a newer GnuTLS version on CentOS7 | |
d0aa04e8 | 666 | PKG_CONFIG_PATH: "/usr/lib64/compat-gnutls37/pkgconfig:/usr/lib64/compat-nettle32/pkgconfig" |
c378d4dd | 667 | |
136ec5bc | 668 | centos8s-samba-o3: |
c378d4dd | 669 | extends: .samba-o3-template |
45522798 | 670 | variables: |
136ec5bc | 671 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_centos8s} |
c378d4dd | 672 | |
34d80fc9 | 673 | fedora39-samba-o3: |
c378d4dd | 674 | extends: .samba-o3-template |
45522798 | 675 | variables: |
34d80fc9 | 676 | SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora39} |
c378d4dd SM |
677 | |
678 | # | |
679 | # Keep the samba-o3 sections at the end ... | |
680 | # |