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