ci: re-enable artifacts upload for the windows jobs
[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-05-09.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     - "2022"
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     - '2022'
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   - gst-env.py
286   - ci/gitlab/*.py
287   - meson.build
288   - subprojects/*.wrap
289   - subprojects/gst-devtools/**/*
290   - subprojects/gst-editing-services/**/*
291   - subprojects/gst-integration-testsuites/**/*
292   - subprojects/gst-libav/**/*
293   - subprojects/gst-omx/**/*
294   - subprojects/gst-plugins-bad/**/*
295   - subprojects/gst-plugins-base/**/*
296   - subprojects/gst-plugins-good/**/*
297   - subprojects/gst-plugins-ugly/**/*
298   - subprojects/gst-python/**/*
299   - subprojects/gstreamer/**/*
300   - subprojects/gstreamer-sharp/**/*
301   - subprojects/gstreamer-vaapi/**/*
302   - subprojects/gst-rtsp-server/**/*
303
304 .simple_fedora_build: &simple_build >-
305   ${DEFAULT_MESON_ARGS}
306   -Dsharp=enabled
307   -Domx=enabled
308   -Dgst-omx:target=generic
309   -Ddoc=disabled
310   -Drs=disabled
311   ${MESON_BUILDTYPE_ARGS}
312   ${MESON_GST_WERROR}
313
314 .build:
315   stage: 'build'
316   extends:
317     - '.build_ccache_vars'
318   needs:
319     - "trigger"
320   # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
321   # Also need to take into account I/O of pulling docker images and uploading artifacts
322   timeout: '45min'
323   variables:
324     MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
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     - '2022'
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     # Needs to not be empty otherwise the newline -> space replace command in
387     # `script:` will fail
388     MESON_CROSS_ARGS: ' '
389   rules:
390     # If this matches, it means the pipeline is running against either the main
391     # or a stable branch, so make it manual
392     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
393       when: manual
394     - changes:
395         *modules_changes
396   script:
397     # Make sure powershell exits on errors
398     # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
399     - $ErrorActionPreference = "Stop"
400
401     # Set the code page to UTF-8
402     - chcp 65001
403
404     - ci/scripts/handle-subprojects-cache.py subprojects/
405     # For some reason, options are separated by newline instead of space, so we
406     # have to replace them first.
407     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
408     - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ")
409     - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
410         meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS &&
411         ninja -C build"
412   artifacts:
413    expire_in: "7 days"
414    when: "always"
415    paths:
416      - 'build/meson-logs/'
417
418 build vs2019 amd64:
419   extends: '.build windows'
420   variables:
421     ARCH: 'amd64'
422
423 build vs2019 x86:
424   extends: '.build windows'
425   variables:
426     ARCH: 'x86'
427
428 build vs2019 arm64 uwp:
429   extends: '.build windows'
430   variables:
431     ARCH: 'arm64'
432     # pango pulls in cairo which pulls in pixman which doesn't build because of
433     # https://github.com/mesonbuild/meson/issues/9889
434     MESON_CROSS_ARGS: >
435       -Dgst-plugins-base:pango=disabled
436       -Dgst-plugins-good:cairo=disabled
437       -Dgst-devtools:cairo=disabled
438       --cross-file ci/meson/vs2019-arm64-cross-file.txt
439       --native-file ci/meson/vs2019-x64-native-file.txt
440
441 build msys2 :
442   extends: '.build windows'
443   timeout: '60min'
444   rules:
445     - changes:
446         *modules_changes
447       allow_failure: true
448       when: 'manual'
449   script:
450     # Make sure powershell exits on errors
451     # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
452     - $ErrorActionPreference = "Stop"
453
454     # Set the code page to UTF-8
455     - chcp 65001
456
457     # Configure MSYS2 to use the UCRT64 environment, start in the same directory
458     # and inherit PATH
459     - $env:MSYSTEM = "UCRT64"
460     - $env:CHERE_INVOKING = "1"
461     - $env:MSYS2_PATH_TYPE = "inherit"
462     # For some reason, options are separated by newline instead of space, so we
463     # have to replace them first.
464     - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
465     # Replace forward slashes with backwards so bash doesn't complain
466     - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
467     - C:\msys64\usr\bin\bash -lc "meson build $env:MESON_ARGS && ninja -C build"
468
469 # ---- Tests ----- #
470
471 .test:
472   stage: 'test'
473   extends:
474     - '.build_ccache_vars'
475   needs:
476     - "trigger"
477   variables:
478     MESON_ARGS: *simple_build
479
480     # Disable colored output to avoid weird rendering issues
481     GST_DEBUG_NO_COLOR: "true"
482     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
483     GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
484     TIMEOUT_FACTOR: "2"
485     CARGO_HOME: "/cache/gstreamer/cargo"
486     # Enable the fault handler so we get backtraces on segfaults.
487     # any non-empty string will do
488     PYTHONFAULTHANDLER: "enabled"
489   rules:
490     - changes:
491         *modules_changes
492   script:
493     - *build
494
495     - echo "-> Running ${TEST_SUITE}"
496     - >
497       ./gst-env.py
498       gst-validate-launcher ${TEST_SUITE}
499       --check-bugs
500       --dump-on-failure
501       --mute
502       --shuffle
503       --no-display
504       --meson-no-rebuild
505       --timeout-factor "${TIMEOUT_FACTOR}"
506       --fail-on-testlist-change
507       -l "${CI_PROJECT_DIR}/validate-logs/"
508       --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
509       ${EXTRA_VALIDATE_ARGS}
510   after_script:
511     - mv build/meson-logs/ meson-logs
512   artifacts:
513     expire_in: '14 days'
514     when: always
515     paths:
516       - 'meson-logs/'
517       - 'validate-logs'
518     reports:
519       junit:
520         - "validate-logs/*.xml"
521
522 .test fedora x86_64:
523   extends:
524     - '.fedora image'
525     - '.fdo.suffixed-image@fedora'
526     - '.test'
527   needs:
528     - "fedora amd64 docker"
529   tags: ['gstreamer']
530
531 check fedora:
532   extends: '.test fedora x86_64'
533   variables:
534     TEST_SUITE: "check.gst*"
535
536 integration testsuites fedora:
537   extends: '.test fedora x86_64'
538   parallel: 4
539   variables:
540     EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX} --sync"
541     TEST_SUITE: "validate ges"
542
543 # gstreamer-full:
544 gstreamer-full static build:
545   extends: '.build fedora x86_64'
546   stage: 'build'
547   variables:
548     MESON_ARGS: >
549       --default-library=static
550       -Ddoc=disabled
551       $MESON_GST_WERROR
552
553   script:
554   - *build
555   - meson test -C build -v test-gst-full
556   artifacts:
557     expire_in: "7 days"
558     when: "always"
559     paths:
560       - 'meson-logs/'
561
562 gstreamer-full-minimal static build:
563   extends: 'gstreamer-full static build'
564   stage: 'build'
565   variables:
566     MESON_ARGS: >
567       --default-library=static
568       -Ddoc=disabled
569       -Dgstreamer:gst_debug=false
570       -Dauto_features=disabled
571       -Dgstreamer:check=enabled
572       -Dtests=enabled
573       -Dgst-plugins-base:alsa=enabled
574       -Dgst-plugins-base:typefind=enabled
575       -Dgst-plugins-base:pbtypes=enabled
576       -Dgst-full-elements=coreelements:filesrc,fakesink,identity,input-selector
577       -Dgst-full-typefind-functions=typefindfunctions:wav,flv
578       -Dgst-full-device-providers=alsa:alsadeviceprovider
579       -Dgst-full-dynamic-types=pbtypes:video_multiview_flagset
580       $MESON_GST_WERROR
581
582   script:
583   - *build
584   - meson test -C build -v test-gst-full
585   - 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"
586   - strip build/libgstreamer-full-1.0.so
587   - ls -l build/libgstreamer-full-1.0.so
588   artifacts:
589     expire_in: "7 days"
590     when: "always"
591     paths:
592       - 'meson-logs/'
593
594 # Valgrind
595 .valgrind fedora x86_64:
596   extends: '.test fedora x86_64'
597   stage: 'test'
598   variables:
599     EXTRA_VALIDATE_ARGS: "--valgrind"
600
601 valgrind core:
602   extends: '.valgrind fedora x86_64'
603   variables:
604     TEST_SUITE: "check.gstreamer\\..*"
605   rules:
606     - changes:
607       - "*"
608       - scripts/*
609       - ci/**/*
610       - subprojects/gst-devtools/**/*
611       - subprojects/gstreamer/**/*
612
613 valgrind base:
614   extends: '.valgrind fedora x86_64'
615   variables:
616     TEST_SUITE: "check.gst-plugins-base\\..*"
617   rules:
618     - changes:
619       - "*"
620       - scripts/*
621       - ci//**/*
622       - subprojects/gst-devtools/**/*
623       - subprojects/gstreamer/**/*
624       - subprojects/gst-plugins-base/**/*
625
626 valgrind good:
627   extends: '.valgrind fedora x86_64'
628   variables:
629     TEST_SUITE: "check.gst-plugins-good\\..*"
630     # take longer time due to splitmux unit test
631     TIMEOUT_FACTOR: "4"
632   rules:
633     - changes:
634       - "*"
635       - scripts/*
636       - ci/**/*
637       - subprojects/gst-devtools/**/*
638       - subprojects/gstreamer/**/*
639       - subprojects/gst-plugins-base/**/*
640       - subprojects/gst-plugins-good/**/*
641
642 valgrind ugly:
643   extends: '.valgrind fedora x86_64'
644   variables:
645     TEST_SUITE: "check.gst-plugins-ugly\\..*"
646   rules:
647     - changes:
648       - "*"
649       - scripts/*
650       - ci/**/*
651       - subprojects/gst-devtools/**/*
652       - subprojects/gstreamer/**/*
653       - subprojects/gst-plugins-base/**/*
654       - subprojects/gst-plugins-good/**/*
655       - subprojects/gst-plugins-ugly/**/*
656
657 valgrind bad:
658   extends: '.valgrind fedora x86_64'
659   variables:
660     TEST_SUITE: "check.gst-plugins-bad\\..*"
661   rules:
662     - changes:
663       - "*"
664       - scripts/*
665       - ci/**/*
666       - subprojects/gst-devtools/**/*
667       - subprojects/gstreamer/**/*
668       - subprojects/gst-plugins-base/**/*
669       - subprojects/gst-plugins-good/**/*
670       - subprojects/gst-plugins-bad/**/*
671
672 valgrind ges:
673   extends: '.valgrind fedora x86_64'
674   variables:
675     TEST_SUITE: "check.gst-editing-services\\..*"
676   rules:
677     - changes:
678       - "*"
679       - scripts/*
680       - ci/**/*
681       - subprojects/gst-devtools/**/*
682       - subprojects/gstreamer/**/*
683       - subprojects/gst-plugins-base/**/*
684       - subprojects/gst-plugins-good/**/*
685       - subprojects/gst-plugins-bad/**/*
686       - subprojects/gst-editing-services/**/*
687       - subprojects/gst-python/**/*
688
689 # ---- Integration ----- #
690
691 .documentation:
692   image: $FEDORA_DOCS_IMAGE
693   extends:
694     - '.build_ccache_vars'
695   variables:
696     MESON_ARGS: *simple_build
697     MESON_BUILDTYPE_ARGS: "-Ddoc=enabled"
698     CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/"
699   script:
700   # FIXME: should rebuild the image with newer versions!
701   - pip3 install --upgrade hotdoc
702   - pip3 install --upgrade meson
703   - *build
704   - ./gst-env.py ninja -C build/ plugins_doc_caches
705   # Ignore modifications to wrap files made by meson
706   - git checkout subprojects/*.wrap
707   - ./ci/scripts/check-documentation-diff.py
708   - ./gst-env.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
709   - mv build/subprojects/gst-docs/GStreamer-doc/html documentation/
710
711   artifacts:
712     when: always
713     expire_in: "7 days"
714     paths:
715     - documentation/
716     - plugins-cache-diffs/
717
718 #
719 # This jobs runs in gstreamer namespace when after the merge into main branch.
720 # The produced artifact is later used to automatically update the web page.
721 #
722 documentation:
723   stage: integrate
724   extends:
725     - '.documentation'
726   needs: []
727   rules:
728     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == "main"'
729
730 #
731 # This job is run in users namespace to validate documentation before merging
732 # MR.
733 #
734 build documentation:
735   extends:
736     - '.documentation'
737   stage: build
738   needs:
739     - "trigger"
740   rules:
741     # Never run post merge, we have the `documentation` always running for that
742     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
743       when: never
744     - changes:
745       - .gitlab-ci.yml
746       - ci/gitlab/*.py
747       - subprojects/*.wrap
748       - subprojects/gst-docs/**/*
749       - subprojects/gst-devtools/**/*
750       - subprojects/gst-editing-services/**/*
751       - subprojects/gst-libav/**/*
752       - subprojects/gst-omx/**/*
753       - subprojects/gst-plugins-bad/**/*
754       - subprojects/gst-plugins-base/**/*
755       - subprojects/gst-plugins-good/**/*
756       - subprojects/gst-plugins-ugly/**/*
757       - subprojects/gstreamer/**/*
758       - subprojects/gstreamer-vaapi/**/*
759       - subprojects/gst-rtsp-server/**/*
760
761 # FIXME: Using trigger: causes permission issues, workaround using old REST API.
762 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
763 cerbero trigger:
764   stage: build
765   timeout: '3h'
766   tags:
767     - placeholder-job
768   extends:
769     - '.fedora image'
770     - '.fdo.suffixed-image@fedora'
771   needs:
772     - "fedora amd64 docker"
773   script:
774     - ci/gitlab/trigger_cerbero_pipeline.py
775
776   rules:
777     # Never run post merge
778     - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
779       when: never
780     - changes:
781       - .gitlab-ci.yml
782       - ci/gitlab/*.py
783       - subprojects/gst-devtools/**/*
784       - subprojects/gst-editing-services/**/*
785       - subprojects/gst-libav/**/*
786       - subprojects/gst-plugins-bad/**/*
787       - subprojects/gst-plugins-base/**/*
788       - subprojects/gst-plugins-good/**/*
789       - subprojects/gst-plugins-ugly/**/*
790       - subprojects/gst-python/**/*
791       - subprojects/gstreamer/**/*
792       - subprojects/gst-rtsp-server/**/*
793       - subprojects/gst-examples/**/*