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