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