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