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