ci: Bump cerbero trigger timeout to 4h
[platform/upstream/gstreamer.git] / .gitlab-ci.yml
1 include:
2   - project: 'freedesktop/ci-templates'
3     ref: 14731f78c23c7b523a85a26a068ade9ac1ecd2f3
4     file: '/templates/fedora.yml'
5   - project: 'freedesktop/ci-templates'
6     ref: 14731f78c23c7b523a85a26a068ade9ac1ecd2f3
7     file: '/templates/debian.yml'
8   ###
9   # IMPORTANT
10   # These are the version tags for the docker images the CI runs against.
11   # If you are hacking on them or need a them to rebuild, you need to change
12   # the appropriate version string in this file which will cause a rebuild.
13   ###
14   - local: '.gitlab-image-tags.yml'
15
16 stages:
17   - 'trigger'
18   - 'build docker'
19   - 'preparation'
20   - 'pre-build'
21   - 'build'
22   - 'test'
23   # Use the resulting binaries
24   - 'integrate'
25
26 variables:
27   GIT_DEPTH: 1
28
29   # Branch to track for modules that have no ref specified in the manifest
30   GST_UPSTREAM_BRANCH: 'main'
31
32   MESON_BUILDTYPE_ARGS: --default-library=both
33   DEFAULT_MESON_ARGS: >
34     -Dlibnice:tests=disabled
35     -Dlibnice:examples=disabled
36     -Dopenh264:tests=disabled
37     -Dpygobject:tests=false
38     -Dpython=enabled
39     -Dlibav=enabled
40     -Dugly=enabled
41     -Dbad=enabled
42     -Ddevtools=enabled
43     -Dges=enabled
44     -Drtsp_server=enabled
45     -Dvaapi=enabled
46     -Dsharp=disabled
47     -Dgpl=enabled
48
49   MESON_GST_WERROR: >
50     -Dgstreamer:werror=true
51     -Dgst-plugins-base:werror=true
52     -Dgst-plugins-good:werror=true
53     -Dgst-plugins-ugly:werror=true
54     -Dgst-plugins-bad:werror=true
55     -Dgst-rtsp-server:werror=true
56     -Dgst-libav:werror=true
57     -Dgst-examples:werror=true
58     -Dgst-editing-services:werror=true
59     -Dgst-docs:werror=true
60     -Dgst-omx:werror=true
61     -Dgst-devtools:werror=true
62     -Dgst-python:werror=true
63     -Dgstreamer-vaapi:werror=true
64     -Dgstreamer-sharp:werror=true
65
66 workflow:
67   # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
68   rules:
69     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
70       variables:
71         GIT_FETCH_EXTRA_FLAGS: '--no-tags'
72     - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
73       when: never
74     - if: '$CI_COMMIT_TAG'
75     - if: '$CI_COMMIT_BRANCH'
76       variables:
77         GIT_FETCH_EXTRA_FLAGS: '--no-tags'
78
79 #
80 # Global CI policy
81 #
82 # This can be used to configure global behaviour our our jobs.
83 #
84 default:
85   retry:
86     max: 2
87     when:
88       - 'runner_system_failure'
89       - 'stuck_or_timeout_failure'
90       - 'scheduler_failure'
91       - 'api_failure'
92   interruptible: true
93
94 # This is an empty job that is used to trigger the pipeline.
95 trigger:
96   image: alpine:latest
97   stage: 'trigger'
98   variables:
99     GIT_STRATEGY: none
100   script:
101     - echo "Trigger job done, now running the pipeline."
102   rules:
103     # If the MR is assigned to the Merge bot, trigger the pipeline automatically
104     - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
105     # Require explicit action to trigger tests post merge
106     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
107       when: 'manual'
108     # When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
109     # to avoid wasting CI resources
110     - if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
111       when: 'manual'
112       allow_failure: false
113
114 .fedora image:
115   variables:
116     FDO_DISTRIBUTION_VERSION: '31'
117     FDO_REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
118     FDO_DISTRIBUTION_TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
119     FDO_DISTRIBUTION_EXEC: 'GIT_BRANCH=$CI_COMMIT_REF_NAME GIT_URL=$CI_REPOSITORY_URL bash ci/docker/fedora/prepare.sh'
120
121 fedora amd64 docker:
122   extends:
123     - '.fedora image'
124     - '.fdo.container-build@fedora'
125   stage: 'build docker'
126   needs:
127     - "trigger"
128   tags:
129     - 'packet.net'
130
131 .gst-indent image:
132   variables:
133     FDO_DISTRIBUTION_VERSION: 'stretch'
134     FDO_REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
135     FDO_DISTRIBUTION_TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
136     FDO_DISTRIBUTION_PACKAGES: 'curl indent git findutils'
137     FDO_DISTRIBUTION_EXEC: 'ci/docker/indent/prepare.sh'
138
139 gst-indent amd64 docker:
140   extends:
141     - '.gst-indent image'
142     - '.fdo.container-build@debian'
143   stage: 'build docker'
144   # Do not depend on the trigger, as we want to run indent always
145   needs: []
146
147 windows amd64 docker:
148   stage: "build docker"
149   needs:
150     - "trigger"
151   timeout: '3h'
152   variables:
153     # Unlike the buildah/linux jobs, this file
154     # needs to be relative to docker/windows/ subdir
155     # as it makes life easier in the powershell script
156     #
157     # We also don't need a CONTEXT_DIR var as its also
158     # hardcoded to be docker/windows/
159     DOCKERFILE: "ci/docker/windows/Dockerfile"
160   tags:
161     - windows
162     - shell
163     - "2022"
164   script:
165     # We need to pass an array and to resolve the env vars, so we can't use a variable:
166     - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH")
167
168     - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
169     - |
170       if (!($?)) {
171         echo "Failed to build the image"
172         Exit 1
173       }
174
175
176 # ---- Preparation ----- #
177 #
178 # gst-indent!!
179 #
180 gst indent:
181   extends:
182     - '.gst-indent image'
183     - '.fdo.suffixed-image@debian'
184   stage: 'preparation'
185   needs:
186     - job: 'gst-indent amd64 docker'
187       artifacts: false
188   script:
189     - ./scripts/check-format-c
190     - ./scripts/format-csharp --check
191   rules:
192     # Don't check indentation on post merge pipelines
193     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
194       when: 'manual'
195     - if: '$CI_PROJECT_NAMESPACE != "gstreamer" || $CI_COMMIT_BRANCH != $GST_UPSTREAM_BRANCH'
196       when: 'always'
197
198 #
199 # build setup templates
200 #
201 .build_template: &build
202   - ci/scripts/handle-subprojects-cache.py subprojects/
203   - echo $MESON_ARGS
204   - meson build/ $MESON_ARGS
205   - ninja -C build/
206   - ccache --show-stats
207
208 .build_ccache_vars:
209   variables:
210     CCACHE_COMPILERCHECK: 'content'
211     CCACHE_COMPRESS: 'true'
212     CCACHE_BASEDIR: '/cache/gstreamer/gstreamer'
213     CCACHE_DIR: '/cache/gstreamer/gstreamer/ccache/'
214     # shared across everything really
215     CCACHE_MAXSIZE: '10G'
216     CARGO_HOME: '/cache/gstreamer/cargo'
217
218 .base_modules_changes: &modules_changes
219   - .gitlab-ci.yml
220   - gst-env.py
221   - ci/gitlab/*.py
222   - meson.build
223   - subprojects/*.wrap
224   - subprojects/gst-devtools/**/*
225   - subprojects/gst-editing-services/**/*
226   - subprojects/gst-integration-testsuites/**/*
227   - subprojects/gst-libav/**/*
228   - subprojects/gst-omx/**/*
229   - subprojects/gst-plugins-bad/**/*
230   - subprojects/gst-plugins-base/**/*
231   - subprojects/gst-plugins-good/**/*
232   - subprojects/gst-plugins-ugly/**/*
233   - subprojects/gst-python/**/*
234   - subprojects/gstreamer/**/*
235   - subprojects/gstreamer-sharp/**/*
236   - subprojects/gstreamer-vaapi/**/*
237   - subprojects/gst-rtsp-server/**/*
238
239 .simple_fedora_build: &simple_build >-
240   ${DEFAULT_MESON_ARGS}
241   -Dsharp=enabled
242   -Domx=enabled
243   -Dgst-omx:target=generic
244   -Ddoc=disabled
245   -Drs=disabled
246   ${MESON_BUILDTYPE_ARGS}
247   ${MESON_GST_WERROR}
248
249 .build:
250   stage: 'build'
251   extends:
252     - '.build_ccache_vars'
253   needs:
254     - "trigger"
255   # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
256   # Also need to take into account I/O of pulling docker images and uploading artifacts
257   timeout: '45min'
258   variables:
259     MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
260   script:
261     - *build
262     - ./gst-env.py gst-inspect-1.0 --version
263     - ./gst-env.py gst-inspect-1.0
264   after_script:
265     - mv build/meson-logs/ meson-logs
266   artifacts:
267     expire_in: "7 days"
268     when: "always"
269     paths:
270       - 'meson-logs/'
271   rules:
272     # If this matches, it means the pipeline is running against either the main
273     # or a stable branch, so make it manual
274     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
275       when: manual
276     - changes:
277         *modules_changes
278
279 .build fedora x86_64:
280   extends:
281     - '.fedora image'
282     - '.fdo.suffixed-image@fedora'
283     - '.build'
284   needs:
285     - "fedora amd64 docker"
286   variables:
287     MESON_ARGS: *simple_build
288
289 build fedora x86_64:
290   extends:
291     - '.fedora image'
292     - '.fdo.suffixed-image@fedora'
293     - '.build fedora x86_64'
294   needs:
295     - "fedora amd64 docker"
296   script:
297     - *build
298     - ./gst-env.py gst-inspect-1.0 --version
299     - ./gst-env.py gst-inspect-1.0
300     - meson install --destdir $CI_PROJECT_DIR/destdir -C build
301     - rm -rf $CI_PROJECT_DIR/destdir
302
303 build nodebug fedora x86_64:
304   extends:
305     - '.fedora image'
306     - '.fdo.suffixed-image@fedora'
307     - '.build'
308   needs:
309     - "fedora amd64 docker"
310   variables:
311     MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
312
313 build clang fedora x86_64:
314   extends: '.build fedora x86_64'
315   variables:
316     CC: 'ccache clang'
317     CXX: 'ccache clang++'
318
319 .build windows:
320   image: $WINDOWS_IMAGE
321   stage: 'build'
322   tags:
323     - 'docker'
324     - 'windows'
325     - '2022'
326   needs:
327     - "windows amd64 docker"
328   timeout: '45min'
329   variables:
330     MESON_ARGS: >
331       ${DEFAULT_MESON_ARGS}
332       -Dpython=disabled
333       -Dlibav=disabled
334       -Dvaapi=disabled
335       -Dgst-plugins-base:pango=enabled
336       -Dgst-plugins-good:cairo=enabled
337     # Needs to not be empty otherwise the newline -> space replace command in
338     # `script:` will fail
339     MESON_CROSS_ARGS: ' '
340   rules:
341     # If this matches, it means the pipeline is running against either the main
342     # or a stable branch, so make it manual
343     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
344       when: manual
345     - changes:
346         *modules_changes
347   script:
348     # Make sure powershell exits on errors
349     # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
350     - $ErrorActionPreference = "Stop"
351
352     # Set the code page to UTF-8
353     - chcp 65001
354
355     - ci/scripts/handle-subprojects-cache.py subprojects/
356     # For some reason, options are separated by newline instead of space, so we
357     # have to replace them first.
358     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
359     - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
360     - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
361         meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
362         meson compile -C build"
363   artifacts:
364    expire_in: "7 days"
365    when: "always"
366    paths:
367      - 'build/meson-logs/'
368
369 build vs2019 amd64:
370   extends: '.build windows'
371   variables:
372     ARCH: 'amd64'
373   script:
374     - !reference [".build windows", "script",]
375     - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
376         .\gst-env.py gst-inspect-1.0.exe --version &&
377         .\gst-env.py gst-inspect-1.0.exe &&
378         mkdir .\destdir &&
379         meson install --destdir=$env:CI_PROJECT_DIR\destdir -C build &&
380         rmdir /s /q  $env:CI_PROJECT_DIR\destdir"
381
382 build vs2019 x86:
383   extends: '.build windows'
384   variables:
385     ARCH: 'x86'
386
387 build vs2019 arm64 uwp:
388   extends: '.build windows'
389   variables:
390     ARCH: 'arm64'
391     # pango pulls in cairo which pulls in pixman which doesn't build because of
392     # https://github.com/mesonbuild/meson/issues/9889
393     MESON_CROSS_ARGS: >
394       -Dgst-plugins-base:pango=disabled
395       -Dgst-plugins-good:cairo=disabled
396       -Dgst-devtools:cairo=disabled
397       --cross-file ci/meson/vs2019-arm64-cross-file.txt
398       --native-file ci/meson/vs2019-x64-native-file.txt
399
400 build msys2 :
401   extends: '.build windows'
402   timeout: '60min'
403   rules:
404     - changes:
405         *modules_changes
406       allow_failure: true
407       when: 'manual'
408   script:
409     # Make sure powershell exits on errors
410     # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
411     - $ErrorActionPreference = "Stop"
412
413     # Set the code page to UTF-8
414     - chcp 65001
415
416     # Configure MSYS2 to use the UCRT64 environment, start in the same directory
417     # and inherit PATH
418     - $env:MSYSTEM = "UCRT64"
419     - $env:CHERE_INVOKING = "1"
420     - $env:MSYS2_PATH_TYPE = "inherit"
421     # For some reason, options are separated by newline instead of space, so we
422     # have to replace them first.
423     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
424     # Replace forward slashes with backwards so bash doesn't complain
425     - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
426     - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
427
428 # ---- Tests ----- #
429
430 .test:
431   stage: 'test'
432   extends:
433     - '.build_ccache_vars'
434   needs:
435     - "trigger"
436   variables:
437     MESON_ARGS: *simple_build
438
439     # Disable colored output to avoid weird rendering issues
440     GST_DEBUG_NO_COLOR: "true"
441     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
442     GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
443     TIMEOUT_FACTOR: "2"
444     CARGO_HOME: "/cache/gstreamer/cargo"
445     # Enable the fault handler so we get backtraces on segfaults.
446     # any non-empty string will do
447     PYTHONFAULTHANDLER: "enabled"
448   rules:
449     - changes:
450         *modules_changes
451   script:
452     - *build
453
454     - echo "-> Running ${TEST_SUITE}"
455     - >
456       ./gst-env.py
457       gst-validate-launcher ${TEST_SUITE}
458       --check-bugs
459       --dump-on-failure
460       --mute
461       --shuffle
462       --no-display
463       --meson-no-rebuild
464       --timeout-factor "${TIMEOUT_FACTOR}"
465       --fail-on-testlist-change
466       -l "${CI_PROJECT_DIR}/validate-logs/"
467       --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
468       ${EXTRA_VALIDATE_ARGS}
469   after_script:
470     - mv build/meson-logs/ meson-logs
471   artifacts:
472     expire_in: '14 days'
473     when: always
474     paths:
475       - 'meson-logs/'
476       - 'validate-logs'
477     reports:
478       junit:
479         - "validate-logs/*.xml"
480
481 .test fedora x86_64:
482   extends:
483     - '.fedora image'
484     - '.fdo.suffixed-image@fedora'
485     - '.test'
486   needs:
487     - "fedora amd64 docker"
488   tags: ['gstreamer']
489
490 check fedora:
491   extends: '.test fedora x86_64'
492   variables:
493     TEST_SUITE: "check.gst*"
494
495 integration testsuites fedora:
496   extends: '.test fedora x86_64'
497   parallel: 4
498   variables:
499     EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
500     TEST_SUITE: "validate ges"
501
502 # gstreamer-full:
503 gstreamer-full static build:
504   extends: '.build fedora x86_64'
505   stage: 'build'
506   variables:
507     MESON_ARGS: >
508       --default-library=static
509       -Ddoc=disabled
510       $MESON_GST_WERROR
511
512   script:
513   - *build
514   - meson test -C build -v test-gst-full
515   artifacts:
516     expire_in: "7 days"
517     when: "always"
518     paths:
519       - 'meson-logs/'
520
521 gstreamer-full-minimal static build:
522   extends: 'gstreamer-full static build'
523   stage: 'build'
524   variables:
525     MESON_ARGS: >
526       --default-library=static
527       -Ddoc=disabled
528       -Dgstreamer:gst_debug=false
529       -Dauto_features=disabled
530       -Dgstreamer:check=enabled
531       -Dtests=enabled
532       -Dgst-plugins-base:alsa=enabled
533       -Dgst-plugins-base:typefind=enabled
534       -Dgst-plugins-base:pbtypes=enabled
535       -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
536       -Dgst-full-typefind-functions=typefindfunctions:wav,flv
537       -Dgst-full-device-providers=alsa:alsadeviceprovider
538       -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
539       $MESON_GST_WERROR
540
541   script:
542   - *build
543   - meson test -C build -v test-gst-full
544   - meson test -C build test-gst-full-features --test-args "-e filesrc,identity,fakesink -E filesink,capsfilter -t audio/x-wav -T video/vivo -d alsadeviceprovider -D v4l2deviceprovider -l GstVideoMultiviewFlagsSet"
545   - strip build/libgstreamer-full-1.0.so
546   - ls -l build/libgstreamer-full-1.0.so
547   artifacts:
548     expire_in: "7 days"
549     when: "always"
550     paths:
551       - 'meson-logs/'
552
553 # Valgrind
554 .valgrind fedora x86_64:
555   extends: '.test fedora x86_64'
556   stage: 'test'
557   variables:
558     EXTRA_VALIDATE_ARGS: "--valgrind"
559
560 valgrind core:
561   extends: '.valgrind fedora x86_64'
562   variables:
563     TEST_SUITE: "check.gstreamer\\..*"
564   rules:
565     - changes:
566       - "*"
567       - scripts/*
568       - ci/**/*
569       - subprojects/gst-devtools/**/*
570       - subprojects/gstreamer/**/*
571
572 valgrind base:
573   extends: '.valgrind fedora x86_64'
574   variables:
575     TEST_SUITE: "check.gst-plugins-base\\..*"
576   rules:
577     - changes:
578       - "*"
579       - scripts/*
580       - ci//**/*
581       - subprojects/gst-devtools/**/*
582       - subprojects/gstreamer/**/*
583       - subprojects/gst-plugins-base/**/*
584
585 valgrind good:
586   extends: '.valgrind fedora x86_64'
587   variables:
588     TEST_SUITE: "check.gst-plugins-good\\..*"
589     # take longer time due to splitmux unit test
590     TIMEOUT_FACTOR: "4"
591   rules:
592     - changes:
593       - "*"
594       - scripts/*
595       - ci/**/*
596       - subprojects/gst-devtools/**/*
597       - subprojects/gstreamer/**/*
598       - subprojects/gst-plugins-base/**/*
599       - subprojects/gst-plugins-good/**/*
600
601 valgrind ugly:
602   extends: '.valgrind fedora x86_64'
603   variables:
604     TEST_SUITE: "check.gst-plugins-ugly\\..*"
605   rules:
606     - changes:
607       - "*"
608       - scripts/*
609       - ci/**/*
610       - subprojects/gst-devtools/**/*
611       - subprojects/gstreamer/**/*
612       - subprojects/gst-plugins-base/**/*
613       - subprojects/gst-plugins-good/**/*
614       - subprojects/gst-plugins-ugly/**/*
615
616 valgrind bad:
617   extends: '.valgrind fedora x86_64'
618   variables:
619     TEST_SUITE: "check.gst-plugins-bad\\..*"
620   rules:
621     - changes:
622       - "*"
623       - scripts/*
624       - ci/**/*
625       - subprojects/gst-devtools/**/*
626       - subprojects/gstreamer/**/*
627       - subprojects/gst-plugins-base/**/*
628       - subprojects/gst-plugins-good/**/*
629       - subprojects/gst-plugins-bad/**/*
630
631 valgrind ges:
632   extends: '.valgrind fedora x86_64'
633   variables:
634     TEST_SUITE: "check.gst-editing-services\\..*"
635   rules:
636     - changes:
637       - "*"
638       - scripts/*
639       - ci/**/*
640       - subprojects/gst-devtools/**/*
641       - subprojects/gstreamer/**/*
642       - subprojects/gst-plugins-base/**/*
643       - subprojects/gst-plugins-good/**/*
644       - subprojects/gst-plugins-bad/**/*
645       - subprojects/gst-editing-services/**/*
646       - subprojects/gst-python/**/*
647
648 # ---- Integration ----- #
649
650 .documentation:
651   extends: '.build fedora x86_64'
652   variables:
653     MESON_ARGS: *simple_build
654     MESON_BUILDTYPE_ARGS: "-Ddoc=enabled -Drs=enabled -Dgst-docs:fatal_warnings=true"
655     # Disable werror for the docs build, we don't need it
656     MESON_GST_WERROR: ''
657     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
658   script:
659   - export PATH=/usr/local/cargo/bin/:/usr/local/bin/:$PATH
660   - export RUSTUP_HOME='/usr/local/rustup'
661
662   - ci/scripts/handle-subprojects-cache.py subprojects/
663   - echo $MESON_ARGS
664   - meson build/ $MESON_ARGS
665   - ccache --show-stats
666
667   - ./gst-env.py ninja -C build/ plugins_doc_caches
668   # Ignore modifications to wrap files made by meson
669   - git checkout subprojects/*.wrap
670   - ./ci/scripts/check-documentation-diff.py
671
672   - ./gst-env.py ninja -C build subprojects/gst-docs/GStreamer-doc
673   - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
674
675   artifacts:
676     when: always
677     expire_in: "7 days"
678     paths:
679     - documentation/
680     - plugins-cache-diffs/
681
682 #
683 # This jobs runs in gstreamer namespace when after the merge into main branch.
684 # The produced artifact is later used to automatically update the web page.
685 #
686 documentation:
687   stage: integrate
688   extends:
689     - '.documentation'
690   needs:
691     - "fedora amd64 docker"
692   rules:
693     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
694
695 #
696 # This job is run in users namespace to validate documentation before merging
697 # MR.
698 #
699 build documentation:
700   extends:
701     - '.documentation'
702   stage: build
703   needs:
704     - "fedora amd64 docker"
705   rules:
706     # Never run post merge, we have the `documentation` always running for that
707     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
708       when: never
709     - changes:
710       - .gitlab-ci.yml
711       - ci/gitlab/*.py
712       - subprojects/*.wrap
713       - subprojects/gst-docs/**/*
714       - subprojects/gst-devtools/**/*
715       - subprojects/gst-editing-services/**/*
716       - subprojects/gst-libav/**/*
717       - subprojects/gst-omx/**/*
718       - subprojects/gst-plugins-bad/**/*
719       - subprojects/gst-plugins-base/**/*
720       - subprojects/gst-plugins-good/**/*
721       - subprojects/gst-plugins-ugly/**/*
722       - subprojects/gstreamer/**/*
723       - subprojects/gstreamer-vaapi/**/*
724       - subprojects/gst-rtsp-server/**/*
725
726 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
727 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
728 cerbero trigger:
729   stage: build
730   timeout: '4h'
731   tags:
732     - placeholder-job
733   extends:
734     - '.fedora image'
735     - '.fdo.suffixed-image@fedora'
736   needs:
737     - "fedora amd64 docker"
738   script:
739     - ci/gitlab/trigger_cerbero_pipeline.py
740
741   rules:
742     # Never run post merge
743     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
744       when: never
745     - changes:
746       - .gitlab-ci.yml
747       - ci/gitlab/*.py
748       - subprojects/gst-devtools/**/*
749       - subprojects/gst-editing-services/**/*
750       - subprojects/gst-libav/**/*
751       - subprojects/gst-plugins-bad/**/*
752       - subprojects/gst-plugins-base/**/*
753       - subprojects/gst-plugins-good/**/*
754       - subprojects/gst-plugins-ugly/**/*
755       - subprojects/gst-python/**/*
756       - subprojects/gstreamer/**/*
757       - subprojects/gst-rtsp-server/**/*
758       - subprojects/gst-examples/**/*