Blacklist check.gstreamer-sharp.SdpTests
[platform/upstream/gstreamer.git] / gitlab / ci_template.yml
1 stages:
2   - 'preparation'
3   # Test just one basic build, if it succeeds proceed to test the rest
4   - 'build'
5   - 'test'
6   # Run multiple builds and tests, multi-distro, multi-arch
7   - 'full builds'
8   - 'full tests'
9
10 variables:
11   CERBERO_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/cerbero-fedora:bd83865236a1cd5b1694adefee24bc1a6b4f1ec4'
12   FEDORA_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:b8c24cc7f4cfb19813a324cbbb65c5e89b55eebc'
13   ANDROID_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/ubuntu:b16ec7445ff7874d905eb5759ceaee5f93d29e66'
14   INDENT_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/gst-indent:6f7e01e1e30a73efa880acdc8e911f1f20c58dbb'
15   MANIFEST_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/build-manifest:d19082b72667fb3382bdc3621520c4d26e258b2e'
16
17   GIT_STRATEGY: none
18   DEFAULT_MESON_ARGS: >
19     --werror
20     -Dpython=enabled
21     -Dlibav=enabled
22     -Dugly=enabled
23     -Dbad=enabled
24     -Ddevtools=enabled
25     -Dges=enabled
26     -Drtsp_server=enabled
27     -Dvaapi=enabled
28     -Dsharp=disabled
29
30 manifest:
31   image: $MANIFEST_IMAGE
32   stage: 'preparation'
33   script:
34     - cd /gst-ci
35     - gitlab/build_manifest.py --self-update
36     - gitlab/build_manifest.py ${CI_PROJECT_DIR}/manifest.xml
37     - cat ${CI_PROJECT_DIR}/manifest.xml
38   artifacts:
39     expire_in: "7 days"
40     paths:
41       - "manifest.xml"
42
43 gst indent:
44   image: $INDENT_IMAGE
45   stage: 'preparation'
46   variables:
47     GIT_STRATEGY: 'fetch'
48   script:
49     # man indent. grep RETURN VALUE, grab a beer on my behalf...
50     - indent --version || true
51     - curl -o gst-indent https://gitlab.freedesktop.org/gstreamer/gstreamer/raw/master/tools/gst-indent
52     - chmod +x gst-indent
53     - find . -name '*.c' -exec ./gst-indent {} +
54     - |
55       if git diff --quiet; then
56           echo "Code is properly formatted"
57       else
58           git diff --color=always
59           echo 'style diverges, please run gst-indent first'
60           exit 1
61       fi
62   except:
63     variables:
64       # No point on trying to format C files in those repositories
65       - $CI_PROJECT_NAME == "gstreamer-sharp"
66       - $CI_PROJECT_NAME == "cerbero"
67
68 .build:
69   stage: 'full builds'
70   dependencies:
71     - "manifest"
72   variables:
73     CC: "ccache gcc"
74     CXX: "ccache g++"
75     CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
76     CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
77     MAIN_DIR: "${CI_PROJECT_DIR}/validate-output/"
78     MESON_ARGS: "${DEFAULT_MESON_ARGS}"
79
80   script:
81     - ccache -z
82     # Not sure why, but permission errors else
83     # https://gitlab.freedesktop.org/alatiera/gstreamer/-/jobs/41441
84     - cp -r /gst-build/ . && cd gst-build
85     - ./git-update --no-interaction --manifest="${CI_PROJECT_DIR}/manifest.xml"
86     - meson build/ $MESON_ARGS
87     - ninja -C build/
88     - ccache -s
89   after_script:
90     - cd gst-build/
91     # Clean the artifacts packages to avoid copying "useless" build products.
92     - test -d build && find build -name '*.[ao]' -delete
93     # Clean the .git repos since we won't need them anymore
94     - rm -rf subprojects/*/.git/
95     - rm -rf build/subprojects/*/.git/
96   cache:
97     key: "${CI_JOB_NAME}"
98     paths:
99       - "${CCACHE_DIR}"
100   artifacts:
101     expire_in: '5 days'
102     when: always
103     paths:
104       - "manifest.xml"
105       - "gst-build/"
106   except:
107     variables:
108       - $CI_PROJECT_NAME == "cerbero"
109
110 build fedora x86_64:
111   extends: '.build'
112   stage: 'build'
113   image: $FEDORA_IMAGE
114   variables:
115     MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled"
116
117 build android arm64 api28:
118   extends: '.build'
119   image: $ANDROID_IMAGE
120   variables:
121     MESON_ARGS: >
122       -Dbad=enabled
123       -Dbad:androidmedia=enabled
124       --cross-file cross-files/android_arm64_api28.txt
125
126 .test:
127   stage: 'test'
128   variables:
129     MAIN_DIR: "${CI_PROJECT_DIR}/validate-output/"
130     # Disable colored output to avoid weird rendering issues
131     GST_DEBUG_COLOR: 'no'
132
133     # note the -b at the start of each line
134     # Can't comment inline sadly
135     # FIXME: get this into gst-validate-launcher KNOWN_ISSUES
136     # gstreamer.pipelines_parse_launch.delayed_link: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/345
137     # gstreamer.gst_gstsystemclock.test_async_sync_interaction: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/346
138     # gstreamer.gst_gstsystemclock.test_periodic_multi: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/347
139     # gstreamer.gst_gstsystemclock.test_periodic_shot: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/348
140     # elements_multisocketsink.test_sending_buffers_with_9_gstmemories: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/525
141     # elements_multisocketsink.test_client_next_keyframe: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/516
142     # flvmux.test_incrementing_timestamps: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/530
143     # flvmux.test_video_caps_late: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/543
144     # rtpbin.test_sender_eos: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/527
145     # rtpbin.test_cleanup_recv: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/546
146     # souphttpsrc.test_icy_stream: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/307
147     # rtspserver.test_shared_udp: https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/61
148     # rtpsession.test_multiple_senders_roundrobin_rbs: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/548
149     # dtls: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/811
150     # mpegtsmux.test_align: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/844
151     # shm.test_shm_live: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/847
152     # splitmux.test_splitmuxsink_async: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/531
153     # splitmux.test_splitmuxsrc_caps_change: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/547
154     # splitmux.test_splitmuxsrc_sparse_streams: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/544
155     # netsim.netsim_stress: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/849
156     # nle_complex.test_one_expandable_another: https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/55
157     # nle_simple.test_simplest: https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/57
158     # ges_basic.test_ges_pipeline_change_state: https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/58
159     # gst-editing-services.pythontests.pyunittest.python.test_timeline.TestTransitions.test_transition_type: https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/62
160     # gst-editing-services.pythontests.pyunittest.python.test_timeline.TestTransitions.test_auto_transition: https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/63
161     # pipelines_tcp.test_that_tcpserversink_and_tcpclientsrc_are_symmetrical: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/221
162     # elements_capsfilter.test_unfixed_downstream_caps: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/335
163     # gst_rtspclientsink.test_record: https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/55
164     # elements_audiotestsrc.test_layout: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/535
165     # camerabin.test_image_video_cycle: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/864
166     # camerabin.test_single_video_recording: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/864#note_101558
167     # camerabin.test_multiple_video_recordings: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/864#note_101646
168     # audiomixer.test_flush_start_flush_stop: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/555
169     # check.gstreamer-sharp.SdpTests: https://gitlab.freedesktop.org/gstreamer/gstreamer-sharp/issues/17
170     #
171     # TO FURTHER INVESTIGATE:
172     # check.gst-plugins-base.libs_gstglcolorconvert.test_reorder_buffer
173     # check.gstreamer.gst_gstelement.test_foreach_pad
174     # check.gstreamer.libs_baseparse.parser_pull_short_read
175     # check.gstreamer.pipelines_seek.test_loopback_2
176     # check.gst-plugins-base.elements_appsrc.test_appsrc_blocked_on_caps
177     BLACKLIST: >
178       -b check.gstreamer.pipelines_parse_launch.delayed_link
179       -b check.gstreamer.gst_gstsystemclock.test_async_sync_interaction
180       -b check.gstreamer.gst_gstsystemclock.test_periodic_multi
181       -b check.gstreamer.gst_gstsystemclock.test_periodic_shot
182       -b check.gstreamer.pipelines_seek.test_loopback_2
183       -b check.gstreamer.gst_gstelement.test_foreach_pad
184       -b check.gstreamer.libs_baseparse.parser_pull_short_read
185       -b check.gst-plugins-base.elements_multisocketsink.test_sending_buffers_with_9_gstmemories
186       -b check.gst-plugins-base.elements_multisocketsink.test_client_next_keyframe
187       -b check.gst-plugins-base.elements_multisocketsink.test_add_client
188       -b check.gst-plugins-base.libs_gstglcolorconvert.test_reorder_buffer
189       -b check.gst-plugins-base.elements_audiotestsrc.test_layout
190       -b check.gst-plugins-good.elements_souphttpsrc.test_icy_stream
191       -b check.gst-plugins-good.elements_rtpbin.test_sender_eos
192       -b check.gst-plugins-good.elements_rtpbin.test_cleanup_recv
193       -b check.gst-plugins-good.elements_flvmux.test_incrementing_timestamps
194       -b check.gst-plugins-good.elements_flvmux.test_video_caps_late
195       -b check.gst-plugins-base.elements_appsrc.test_appsrc_blocked_on_caps
196       -b check.gst-plugins-good.elements_splitmux.test_splitmuxsrc_sparse_streams
197       -b check.gst-plugins-good.elements_splitmux.test_splitmuxsrc_caps_change
198       -b check.gst-plugins-bad.elements_dtls.test_data_transfer
199       -b check.gst-plugins-bad.elements_dtls.test_create_and_unref
200       -b check.gst-plugins-bad.elements_camerabin.test_image_video_cycle
201       -b check.gst-plugins-bad.elements_camerabin.test_single_video_recording
202       -b check.gst-plugins-bad.elements_camerabin.test_multiple_video_recordings
203       -b check.gst-plugins-good.elements_rtpsession.test_multiple_senders_roundrobin_rbs
204       -b check.gst-plugins-bad.elements_shm.test_shm_live
205       -b check.gst-plugins-good.elements_splitmux.test_splitmuxsink_async
206       -b check.gst-plugins-bad.elements_netsim.netsim_stress
207       -b check.gst-editing-services.nle_complex.test_one_expandable_another
208       -b check.gst-editing-services.nle_simple.test_simplest
209       -b check.gst-editing-services.ges_basic.test_ges_pipeline_change_state
210       -b check.gst-editing-services.pythontests.pyunittest.python.test_timeline.TestTransitions.test_transition_type
211       -b check.gst-editing-services.pythontests.pyunittest.python.test_timeline.TestTransitions.test_auto_transition
212       -b check.gst-plugins-base.pipelines_tcp.test_that_tcpserversink_and_tcpclientsrc_are_symmetrical
213       -b check.gstreamer.elements_capsfilter.test_unfixed_downstream_caps
214       -b check.gst-rtsp-server.gst_rtspclientsink.test_record
215       -b check.gst-rtsp-server.gst_rtspserver.test_shared_udp
216       -b check.gst-plugins-base.elements_audiomixer.test_flush_start_flush_stop
217       -b check.gstreamer-sharp.SdpTests
218   script:
219     - cd gst-build/
220     - >
221       ./gst-uninstalled.py
222       gst-validate-launcher ${TEST_SUITE}
223       -fs
224       --mute
225       --shuffle
226       --no-display
227       --dump-on-failure
228       --meson-no-rebuild
229       -M "${CI_PROJECT_DIR}/validate-output/"
230       --xunit-file "${CI_PROJECT_DIR}/validate-output/logs/xunit.xml"
231       ${BLACKLIST}
232   artifacts:
233     expire_in: '14 days'
234     when: always
235     paths:
236       - 'gst-build/build/meson-logs/'
237       - 'validate-output/logs'
238     reports:
239       junit:
240         - "validate-output/logs/*.xml"
241   # We disable the .build above, which this job usually depends upon for cerbero
242   except:
243     variables:
244       - $CI_PROJECT_NAME == "cerbero"
245
246 .test fedora x86_64:
247   image: $FEDORA_IMAGE
248   extends: '.test'
249   dependencies:
250     - build fedora x86_64
251
252 check fedora:
253   extends: '.test fedora x86_64'
254   variables:
255     TEST_SUITE: "check.gst*"
256
257 # Template for Cerbero GStreamer Build
258 #
259 # Parameters:
260 # CONFIG: The name of the configuration file to use
261 #
262 # Produces runtime and devel tarball packages.
263 .cerbero:
264   stage: "full builds"
265   image: $CERBERO_IMAGE
266   dependencies:
267     - "manifest"
268   variables:
269     CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
270     CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
271     CCACHE_MAXSIZE: "1.7G"
272     CERBERO_HOME: "${CI_PROJECT_DIR}/cerbero-build"
273     CERBERO_SOURCES: "${CI_PROJECT_DIR}/cerbero-sources"
274     CERBERO_DEPS: "cerbero-deps.tar.gz"
275     CERBERO: ./cerbero-uninstalled -c config/${CONFIG} -c localconf.cbc -m manifest.xml
276   before_script:
277     # FIXME Wrong namespace
278     # Workaround build-tools having hardcoded internal path
279     - mkdir -p /builds/gstreamer
280     - ln -sf ${CI_PROJECT_DIR} /builds/gstreamer/cerbero
281     - rsync -aH /cerbero/ .
282     - test -f ${CERBERO_DEPS} && tar -C ${CERBERO_HOME} -xf ${CERBERO_DEPS}
283     - echo "home_dir = \"${CERBERO_HOME}\"" >> localconf.cbc
284     - echo "local_sources = \"${CERBERO_SOURCES}\"" >> localconf.cbc
285     - ./cerbero-uninstalled --self-update manifest.xml
286     - ccache -z
287   script:
288     - $CERBERO show-config
289     - $CERBERO fetch-bootstrap --build-tools-only
290     - $CERBERO fetch-package --deps gstreamer-1.0
291     - $CERBERO fetch-cache
292     - $CERBERO bootstrap --offline --build-tools-only
293     - $CERBERO package --offline -t -o ${CI_PROJECT_DIR} gstreamer-1.0
294     - ccache -s
295   except:
296     variables:
297       - $CI_PROJECT_NAME == "gst-build"
298   cache:
299     key: "${CI_JOB_NAME}"
300     paths:
301       - "${CCACHE_DIR}"
302       - "${CERBERO_SOURCES}"
303   artifacts:
304     name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
305     expire_in: '5 days'
306     when: 'always'
307     paths:
308       - "manifest.xml"
309       - "cerbero-build/logs"
310       - "*.tar.bz2"
311
312 # Template for Cerbero GStreamer Deps
313 #
314 # This template is used by cerbero/ project to pre-built the GStreamer
315 # depedencies. When available, the .cerbero jobs will download this artifact
316 # in order to speed up the build.
317 #
318 # Parameters:
319 # CONFIG: The name of the configuration file to use
320 # ARCH: The cerbero <os>_<cpu> (used in cache key)
321 #
322 # Produce an artifact with the dist/ and .cache along
323 # with the associated build-tools.
324 .cerbero deps:
325   extends: .cerbero
326   stage: "build"
327   script:
328     - $CERBERO show-config
329     - $CERBERO fetch-bootstrap --build-tools-only
330     - $CERBERO fetch-package --deps gstreamer-1.0
331     - $CERBERO bootstrap --offline --build-tools-only
332     - $CERBERO build-deps --offline
333           gstreamer-1.0 gst-plugins-base-1.0 gst-plugins-good-1.0
334           gst-plugins-bad-1.0 gst-plugins-ugly-1.0 gst-rtsp-server-1.0
335           gst-libav-1.0 gst-validate gst-editing-services-1.0 libnice
336     - $CERBERO fetch-cache --skip-fetch --job-id=${CI_JOB_ID}
337     - tar -C ${CERBERO_HOME} -czf $CERBERO_DEPS
338               build-tools build-tools.cache
339               dist/${ARCH} ${ARCH}.cache
340     - ccache -s
341   only:
342     variables:
343       - $CI_PROJECT_NAME == "cerbero"
344   artifacts:
345     name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
346     expire_in: '10 days'
347     when: 'always'
348     paths:
349       - "manifest.xml"
350       - "cerbero-build/logs"
351       - "cerbero-build/cerbero-deps.log"
352       - "${CERBERO_DEPS}"
353
354 #
355 # Cerbero Linux X86_64 build
356 #
357 .build cerbero fedora x86_64:
358   extends: '.cerbero'
359   variables:
360     CONFIG: "linux.config"
361
362 .cerbero deps fedora x86_64:
363   extends: '.cerbero deps'
364   variables:
365     CONFIG: "linux.config"
366     ARCH: "linux_x86_64"
367
368 # This indirection allow overriding the image without passing again CONFIG
369 build cerbero fedora x86_64:
370   extends: '.build cerbero fedora x86_64'
371
372 #
373 # Cerbero Cross Windows builds
374 #
375 .build cerbero cross win32:
376   extends: '.cerbero'
377   variables:
378     CONFIG: "cross-win32.cbc"
379
380 .cerbero deps cross win32:
381   extends: '.cerbero deps'
382   variables:
383     CONFIG: "cross-win32.cbc"
384     ARCH: "windows_x86"
385
386 build cerbero cross win32:
387   extends: '.build cerbero cross win32'
388
389 .build cerbero cross win64:
390   extends: '.cerbero'
391   variables:
392     CONFIG: "cross-win64.cbc"
393
394 .cerbero deps cross win64:
395   extends: '.cerbero deps'
396   variables:
397     CONFIG: "cross-win64.cbc"
398     ARCH: "windows_x86_64"
399
400 build cerbero cross win64:
401   extends: '.build cerbero cross win64'