summaryrefslogtreecommitdiff
path: root/.gitlab-ci/test-source-dep.yml
blob: 2ec79f0d282979c3c8dc95a2ae6782410f25a633 (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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
# This file list source dependencies to avoid creating/running jobs
# those outcome cannot be changed by the modifications from a branch.

# Rule to filter for only scheduled pipelines.
.scheduled_pipeline-rules:
  rules:
    - if: &is-scheduled-pipeline '$CI_PIPELINE_SOURCE == "schedule"'
      when: on_success

# Generic rule to not run the job during scheduled pipelines. Jobs that aren't
# something like a nightly run should include this rule.
.no_scheduled_pipelines-rules:
  rules:
    - if: *is-scheduled-pipeline
      when: never

# Rule for restricted traces jobs to only run for users with access to those
# traces (both https://gitlab.freedesktop.org/gfx-ci/tracie/traces-db-private
# for trace access, and minio bucket access for viewing result images from CI).
#
# This is a compromise, allowing some marked developers to have their MRs
# blocked on regressions to non-redistributable traces, while not blocking
# merges for other devs who would be unable to debug changes to them.
.restricted-rules:
  rules:
    # If the triggerer has access to the restricted traces and if it is pre-merge
    - if: '($GITLAB_USER_LOGIN !~ "/^(robclark|anholt|flto|cwabbott0|Danil|tomeu|okias|gallo|kwg|majanes|llanderwelin|zmike)$/") &&
           ($GITLAB_USER_LOGIN != "marge-bot" || $CI_COMMIT_BRANCH)'
      when: never

# Mesa core source file dependencies that may impact any test job
# ---------------------------------------------------------------
.core-rules:
  rules:
    - !reference [.no_scheduled_pipelines-rules, rules]
    - changes: &core_file_list
      - .gitlab-ci.yml
      - .gitlab-ci/**/*
      - include/**/*
      - meson.build
      - .gitattributes
      - src/*
      - src/compiler/**/*
      - src/drm-shim/**/*
      - src/gbm/**/*
      - src/gtest/**/*
      - src/hgl/**/*
      - src/include/**/*
      # Some src/util and src/compiler files use headers from mesa/ (e.g.
      # mtypes.h).  We should clean that up.
      - src/mesa/**/*.h
      - src/tool/**/*
      - src/util/**/*
      when: on_success

# Mesa source file dependencies that may impact any GL driver test job.
.gl-rules:
  rules:
    - !reference [.core-rules, rules]
    - changes: &mesa_core_file_list
      - src/egl/**/*
      - src/glx/**/*
      - src/loader/**/*
      - src/mapi/**/*
      - src/mesa/*
      - src/mesa/main/**/*
      - src/mesa/math/**/*
      - src/mesa/program/**/*
      - src/mesa/sparc/**/*
      - src/mesa/state_tracker/**/*
      - src/mesa/swrast/**/*
      - src/mesa/swrast_setup/**/*
      - src/mesa/vbo/**/*
      - src/mesa/x86/**/*
      - src/mesa/x86-64/**/*
      when: on_success
    - changes: &gallium_core_file_list
      - src/gallium/*
      - src/gallium/auxiliary/**/*
      - src/gallium/drivers/*
      - src/gallium/include/**/*
      - src/gallium/frontends/dri/*
      - src/gallium/frontends/glx/**/*
      - src/gallium/targets/**/*
      - src/gallium/tests/**/*
      - src/gallium/winsys/*
      when: on_success

# Source file dependencies that may impact any Vulkan driver build or test
.vulkan-rules:
  rules:
    - !reference [.core-rules, rules]
    - changes: &vulkan_file_list
      - src/vulkan/**/*
      when: on_success

.softpipe-rules:
  stage: software-renderer
  rules:
    - !reference [.gl-rules, rules]
    - changes: &softpipe_file_list
      - src/gallium/drivers/softpipe/**/*
      - src/gallium/winsys/sw/**/*
      when: on_success

.llvmpipe-rules:
  stage: software-renderer
  rules:
    - !reference [.gl-rules, rules]
    - changes: &llvmpipe_file_list
      - src/gallium/drivers/llvmpipe/**/*
      - src/gallium/winsys/sw/**/*
      when: on_success

.lavapipe-rules:
  stage: software-renderer
  rules:
    - !reference [.vulkan-rules, rules]
    # One could probably be a little more clever here and skip non-gallium Mesa changes (see also .llvmpipe-cl-rules).
    - !reference [.gl-rules, rules]
    - changes: &lavapipe_file_list
      - src/gallium/drivers/llvmpipe/**/*
      - src/gallium/frontends/lavapipe/**/*
      - src/gallium/winsys/sw/**/*
      when: on_success

.llvmpipe-cl-rules:
  stage: software-renderer
  rules:
    - !reference [.no_scheduled_pipelines-rules, rules]
    - changes: &llvmpipe_cl_files
      - .gitlab-ci.yml
      - .gitlab-ci/**/*
      - meson.build
      - .gitattributes
      - include/**/*
      - src/compiler/**/*
      - src/include/**/*
      - src/util/**/*
      when: on_success
    - changes:
        *gallium_core_file_list
      when: on_success
    - changes:
        *llvmpipe_file_list
      when: on_success

.llvmpipe-clover-rules:
  rules:
    - !reference [.llvmpipe-cl-rules, rules]
    - changes:
      - src/gallium/frontends/clover/**/*
      when: on_success

.llvmpipe-rusticl-rules:
  rules:
    - !reference [.llvmpipe-cl-rules, rules]
    - changes:
      - src/gallium/frontends/rusticl/**/*
      when: on_success

.collabora-farm-rules:
  rules:
    - if: '$COLLABORA_FARM == "offline" && $RUNNER_TAG =~ /^mesa-ci-x86-64-lava-/'
      when: never

.igalia-farm-rules:
  rules:
    - if: '$IGALIA_FARM == "offline"'
      when: never

.anholt-farm-rules:
  rules:
    - if: '$ANHOLT_FARM == "offline"'
      when: never

.valve-farm-rules:
  rules:
    - if: '$VALVE_FARM == "offline"'
      when: never
    # The Valve CI Farm uses allow lists for projects/users to prevent abuse,
    # so only enable automatic testing when running in the context of Mesa to
    # prevent failures in forks.
    - if: '$CI_PROJECT_NAMESPACE != "mesa"'
      when: never

.austriancoder-farm-rules:
  rules:
    - if: '$AUSTRIANCODER_FARM == "offline"'
      when: never

# Skips freedreno jobs if either of the farms we use are offline.
.freedreno-farm-rules:
  rules:
    - if: '$FD_FARM == "offline"'
      when: never
    - !reference [.collabora-farm-rules, rules]

# Rules for changes that impact either freedreno or turnip.
.freedreno-common-rules:
  rules:
    - !reference [.no_scheduled_pipelines-rules, rules]
    - !reference [.freedreno-farm-rules, rules]
    - changes: &freedreno_core_file_list
      - src/freedreno/ci/**/*
      - src/freedreno/common/**/*
      - src/freedreno/drm/**/*
      - src/freedreno/fdl/**/*
      - src/freedreno/ir3/**/*
      - src/freedreno/isa/**/*
      - src/freedreno/registers/**/*
      when: on_success

.freedreno-rules:
  stage: freedreno
  rules:
    - !reference [.freedreno-common-rules, rules]
    - !reference [.gl-rules, rules]
    - changes: &freedreno_gl_file_list
      - src/freedreno/ir2/**/*
      - src/gallium/drivers/freedreno/**/*
      - src/gallium/winsys/freedreno/**/*
      when: on_success

.turnip-rules:
  stage: freedreno
  rules:
    - !reference [.freedreno-common-rules, rules]
    - !reference [.vulkan-rules, rules]
    - changes:
      - src/freedreno/vulkan/**/*
      when: on_success

# For piglit and skqp test jobs that run both GL and VK tests.
.freedreno-turnip-rules:
  rules:
    - !reference [.freedreno-rules, rules]
    - !reference [.turnip-rules, rules]

.freedreno-rules-restricted:
  stage: freedreno
  rules:
    - !reference [.restricted-rules, rules]
    - !reference [.freedreno-rules, rules]

# Rules for GL driver performance tracking.  We want them to run as code is
# merged to main, but we don't want them to block marge.  So, they need to have
# only when: never or when: manual, and a separate script maintained by
# Collabora triggers the manual job after merge to main.
.gl-rules-performance:
  rules:
    - !reference [.no_scheduled_pipelines-rules, rules]
    # Run only on pre-merge pipelines from Marge
    - if: '$GITLAB_USER_LOGIN != "marge-bot" || $CI_COMMIT_BRANCH'
      when: never
    - changes:
        *mesa_core_file_list
      when: manual
    - changes:
        *gallium_core_file_list
      when: manual

# Unfortunately YAML doesn't let us concatenate arrays, so we have to do the
# rules duplication manually
.freedreno-rules-performance:
  stage: freedreno
  rules:
    - !reference [.freedreno-farm-rules, rules]
    - !reference [.gl-rules-performance, rules]
    - changes:
        *freedreno_core_file_list
      when: manual
    - changes:
        *freedreno_gl_file_list
      when: manual

.nouveau-rules:
  stage: nouveau
  rules:
    - !reference [.anholt-farm-rules, rules]
    - !reference [.gl-rules, rules]
    - changes:
      - src/nouveau/**/*
      - src/gallium/drivers/nouveau/**/*
      - src/gallium/winsys/kmsro/**/*
      - src/gallium/winsys/nouveau/**/*
      when: on_success

.panfrost-midgard-rules:
  stage: arm
  rules:
    - !reference [.collabora-farm-rules, rules]
    - !reference [.gl-rules, rules]
    - changes: &panfrost_gallium_file_list
      - src/gallium/drivers/panfrost/**/*
      - src/gallium/winsys/panfrost/**/*
      when: on_success
    - changes: &panfrost_common_file_list
      - src/panfrost/ci/*
      - src/panfrost/include/*
      - src/panfrost/lib/*
      - src/panfrost/shared/*
      - src/panfrost/util/*
      when: on_success
    - changes:
      - src/panfrost/midgard/**/*
      when: on_success

.panfrost-bifrost-rules:
  stage: arm
  rules:
    - !reference [.collabora-farm-rules, rules]
    - !reference [.vulkan-rules, rules]
    - !reference [.gl-rules, rules]
    - changes:
        *panfrost_common_file_list
      when: on_success
    - changes:
        *panfrost_gallium_file_list
      when: on_success
    - changes: &panfrost_vulkan_file_list
      - src/panfrost/vulkan/*
      when: on_success
    - changes:
      - src/panfrost/compiler/**/*
      when: on_success

.broadcom-common-rules:
  rules:
    - changes:
      - src/broadcom/meson.build
      - src/broadcom/ci/**/*
      - src/broadcom/cle/**/*
      - src/broadcom/clif/**/*
      - src/broadcom/common/**/*
      - src/broadcom/compiler/**/*
      - src/broadcom/drm-shim/**/*
      - src/broadcom/qpu/**/*
      - src/broadcom/simulator/**/*
      when: on_success

.vc4-rules:
  stage: broadcom
  rules:
    - !reference [.igalia-farm-rules, rules]
    - !reference [.gl-rules, rules]
    - !reference [.broadcom-common-rules, rules]
    - changes:
      - src/gallium/drivers/vc4/**/*
      - src/gallium/winsys/kmsro/**/*
      - src/gallium/winsys/vc4/**/*
      when: on_success

.v3d-rules:
  stage: broadcom
  rules:
    - !reference [.igalia-farm-rules, rules]
    - !reference [.gl-rules, rules]
    - !reference [.broadcom-common-rules, rules]
    - changes:
      - src/gallium/drivers/v3d/**/*
      - src/gallium/winsys/kmsro/**/*
      - src/gallium/winsys/v3d/**/*
      when: on_success

.v3dv-rules:
  stage: broadcom
  rules:
    - !reference [.igalia-farm-rules, rules]
    - !reference [.vulkan-rules, rules]
    - changes:
      - src/broadcom/**/*
      when: on_success

.lima-rules:
  stage: arm
  rules:
    - if: '$LIMA_FARM == "offline"'
      when: never
    - !reference [.gl-rules, rules]
    - changes:
      - src/gallium/drivers/lima/**/*
      - src/gallium/winsys/lima/**/*
      - src/lima/**/*
      when: on_success

.radv-rules:
  stage: amd
  rules:
    - !reference [.vulkan-rules, rules]
    - changes: &radv_file_list
      - src/amd/**/*
      - src/vulkan/**/*
      when: on_success

.radv-collabora-rules:
  stage: amd
  rules:
    - !reference [.collabora-farm-rules, rules]
    - !reference [.radv-rules, rules]

.radv-valve-rules:
  stage: amd
  rules:
    - !reference [.valve-farm-rules, rules]
    - !reference [.radv-rules, rules]

.virgl-rules:
  stage: layered-backends
  rules:
    - !reference [.gl-rules, rules]
    - changes:
        *llvmpipe_file_list
      when: on_success
    - changes: &virgl_file_list
      - src/gallium/drivers/virgl/**/*
      - src/gallium/winsys/virgl/**/*
      when: on_success

# Unfortunately we can't sed the on_success from another rules set, so we have
# to do duplicate the files lists to set the job to manual (see
# .gl-rules-performance)
.virgl-iris-rules-performance:
  stage: layered-backends
  rules:
    - !reference [.collabora-farm-rules, rules]
    - !reference [.gl-rules-performance, rules]
    - changes:
        *llvmpipe_file_list
      when: manual
    - changes:
        *virgl_file_list
      when: manual

.venus-rules:
  stage: layered-backends
  rules:
    - !reference [.lavapipe-rules, rules]
    - changes: &venus_file_list
      - src/virtio/**/*
      when: on_success
    - when: never

.radeonsi-rules:
  stage: amd
  rules:
    - !reference [.collabora-farm-rules, rules]
    - !reference [.gl-rules, rules]
    - changes: &radeonsi_file_list
      - src/gallium/drivers/radeonsi/**/*
      - src/gallium/include/winsys/**/*
      - src/gallium/winsys/amdgpu/**/*
      - src/amd/*
      - src/amd/addrlib/**/*
      - src/amd/ci/*
      - src/amd/common/**/*
      - src/amd/llvm/**/*
      - src/amd/registers/**/*
      when: on_success

.radeonsi+radv-rules:
  stage: amd
  rules:
    - !reference [.collabora-farm-rules, rules]
    - !reference [.gl-rules, rules]
    - changes:
        *radeonsi_file_list
      when: on_success
    - changes:
        *radv_file_list
      when: on_success

.radeonsi-vaapi-rules:
  stage: amd
  rules:
    - !reference [.collabora-farm-rules, rules]
    - !reference [.gl-rules, rules]
    - changes:
        *radeonsi_file_list
      when: on_success
    - changes: &radeon_vcn_file_list
      - src/gallium/frontends/va/**/*
      when: on_success

.i915g-rules:
  stage: intel
  rules:
    - !reference [.gl-rules, rules]
    - changes:
      - src/gallium/drivers/i915/**/*
      - src/gallium/winsys/i915/**/*
      - src/intel/**/*
      when: on_success

.crocus-rules:
  stage: intel
  rules:
    - !reference [.gl-rules, rules]
    - changes:
      - src/gallium/drivers/crocus/**/*
      - src/gallium/winsys/crocus/**/*
      - src/intel/**/*
      when: on_success

.iris-rules:
  stage: intel
  rules:
    - !reference [.no_scheduled_pipelines-rules, rules]
    - !reference [.collabora-farm-rules, rules]
    - !reference [.gl-rules, rules]
    - changes: &iris_file_list
      - src/gallium/drivers/iris/**/*
      - src/gallium/winsys/iris/**/*
      - src/intel/**/*
      when: on_success

# Unfortunately we can't sed the on_success from another rules set, so we have
# to do duplicate the files lists to set the job to manual (see
# .gl-rules-performance)
.iris-rules-performance:
  stage: intel
  rules:
    - !reference [.collabora-farm-rules, rules]
    - !reference [.gl-rules-performance, rules]
    - changes:
        *iris_file_list
      when: manual

.anv-rules:
  stage: intel
  rules:
    - !reference [.no_scheduled_pipelines-rules, rules]
    - !reference [.collabora-farm-rules, rules]
    - !reference [.vulkan-rules, rules]
    - changes:
      - src/intel/**/*
      when: on_success

.intel-rules:
  stage: intel
  rules:
    - !reference [.collabora-farm-rules, rules]
    # Note that we trigger on changes both anv and iris, because piglit and skqp jobs test both.
    - !reference [.vulkan-rules, rules]
    - !reference [.gl-rules, rules]
    - changes: &iris_file_list
      - src/gallium/drivers/iris/**/*
      - src/gallium/winsys/iris/**/*
      - src/intel/**/*
      when: on_success

.zink-common-rules:
  rules:
    - !reference [.gl-rules, rules]
    - changes:
      - src/gallium/drivers/zink/**/*
      when: on_success

.zink-lvp-rules:
  stage: layered-backends
  rules:
    - !reference [.lavapipe-rules, rules]
    - !reference [.zink-common-rules, rules]

.zink-anv-rules:
  stage: layered-backends
  rules:
    - !reference [.anv-rules, rules]
    - !reference [.zink-common-rules, rules]

.zink-anv-rules-restricted:
  stage: layered-backends
  rules:
    - !reference [.restricted-rules, rules]
    - !reference [.anv-rules, rules]
    - !reference [.zink-common-rules, rules]

.zink-turnip-rules:
  stage: layered-backends
  rules:
    - !reference [.turnip-rules, rules]
    - !reference [.zink-common-rules, rules]

.zink-radv-rules:
  stage: layered-backends
  rules:
    - !reference [.radv-rules, rules]
    - !reference [.zink-common-rules, rules]

# Unfortunately YAML doesn't let us concatenate arrays, so we have to do the
# rules duplication manually
.windows-build-rules:
  rules:
    - if: '$MICROSOFT_FARM == "offline"'
      when: never
    - !reference [.zink-common-rules, rules]
    - !reference [.vulkan-rules, rules]
    - changes:
        *softpipe_file_list
      when: on_success
    - changes:
        *lavapipe_file_list
      when: on_success
    - changes: &d3d12_file_list
      - src/gallium/drivers/d3d12/**/*
      - src/gallium/frontends/wgl/*
      - src/gallium/winsys/d3d12/wgl/*
      - src/gallium/targets/libgl-gdi/*
      - src/gallium/targets/libgl-d3d12/*
      when: on_success
    - changes:
      - src/microsoft/**/*
      - src/gallium/frontends/va/*
      - src/gallium/targets/va/*
      when: on_success
    - changes:
        *radv_file_list
      when: on_success

.glon12-test-rules:
  rules:
    - if: '$MICROSOFT_FARM == "offline"'
      when: never
    - !reference [.gl-rules, rules]
    - changes: *d3d12_file_list
      when: on_success
    - changes:
      - src/microsoft/compiler/*
      when: on_success

.spirv2dxil-test-rules:
  rules:
    - if: '$MICROSOFT_FARM == "offline"'
      when: never
    - !reference [.no_scheduled_pipelines-rules, rules]
    - !reference [.core-rules, rules]
    - changes: &spirv2dxil_file_list
      - src/microsoft/ci/*
      - src/microsoft/compiler/*
      - src/microsoft/spirv_to_dxil/*
      when: on_success

.dozen-test-rules:
  rules:
    - if: '$MICROSOFT_FARM == "offline"'
      when: never
    - !reference [.vulkan-rules, rules]
    - changes:
        *spirv2dxil_file_list
      when: on_success
    - changes:
      - src/microsoft/vulkan/*
      when: on_success

.etnaviv-rules:
  stage: etnaviv
  rules:
    - !reference [.austriancoder-farm-rules, rules]
    - !reference [.gl-rules, rules]
    - changes:
      - src/etnaviv/**/*
      - src/gallium/drivers/etnaviv/**/*
      - src/gallium/winsys/etnaviv/**/*
      - src/gallium/auxiliary/renderonly/**/*
      - src/gallium/winsys/kmsro/**/*
      - src/gallium/winsys/etnaviv/**/*
      when: on_success

# Rules for unusual architectures that only build a subset of drivers
.ppc64el-rules:
   rules:
    - !reference [.no_scheduled_pipelines-rules, rules]
    - !reference [.zink-common-rules, rules]
    - changes:
        *softpipe_file_list
      when: on_success
    - changes:
        *llvmpipe_file_list
      when: on_success
    - changes:
        *lavapipe_file_list
      when: on_success
    - changes:
        *radv_file_list
      when: on_success
    - changes:
        *radeonsi_file_list
      when: on_success
    - changes:
        *virgl_file_list
      when: on_success
    - changes:
      - src/gallium/drivers/nouveau/**/*
      - src/gallium/winsys/nouveau/**/*
      when: on_success

.s390x-rules:
   rules:
    - !reference [.no_scheduled_pipelines-rules, rules]
    - !reference [.zink-common-rules, rules]
    - changes:
        *softpipe_file_list
      when: on_success
    - changes:
        *llvmpipe_file_list
      when: on_success
    - changes:
        *lavapipe_file_list
      when: on_success

# Rules for linters
.lint-rustfmt-rules:
   rules:
    - !reference [.no_scheduled_pipelines-rules, rules]
    - !reference [.core-rules, rules]
    - changes:
      - src/**/*.rs
      when: on_success