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