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