3 # Test just one basic build, if it succeeds proceed to test the rest
6 # Run multiple builds and tests, multi-distro, multi-arch
9 # build some apps to check that cross-platform binaries are usable
14 ANDROID_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/android:2019-03-26-196225'
15 CERBERO_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/cerbero-fedora:7ed820aa1fcf95938cc161e397b1bf455f1f5b74'
16 FEDORA_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2019-05-13-295487'
17 INDENT_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/gst-indent:6f7e01e1e30a73efa880acdc8e911f1f20c58dbb'
18 MANIFEST_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/build-manifest:d19082b72667fb3382bdc3621520c4d26e258b2e'
33 DEFAULT_CERBERO_ARGS: >
38 image: $MANIFEST_IMAGE
42 - gitlab/build_manifest.py --self-update
43 - gitlab/build_manifest.py ${CI_PROJECT_DIR}/manifest.xml
44 - cat ${CI_PROJECT_DIR}/manifest.xml
56 # man indent. grep RETURN VALUE, grab a beer on my behalf...
57 - indent --version || true
58 - curl -o gst-indent https://gitlab.freedesktop.org/gstreamer/gstreamer/raw/master/tools/gst-indent
60 - find . -name '*.c' -exec ./gst-indent {} +
62 if git diff --quiet; then
63 echo "Code is properly formatted"
65 git diff --color=always
66 echo 'style diverges, please run gst-indent first'
71 # No point on trying to format C files in those repositories
72 - $CI_PROJECT_NAME == "gstreamer-sharp"
73 - $CI_PROJECT_NAME == "gst-integration-testsuites"
74 - $CI_PROJECT_NAME == "cerbero"
75 - $CI_PROJECT_NAME == "gst-docs"
84 CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
85 CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
86 MESON_ARGS: "${DEFAULT_MESON_ARGS}"
90 # Not sure why, but permission errors else
91 # https://gitlab.freedesktop.org/alatiera/gstreamer/-/jobs/41441
92 - cp -r /gst-build/ . && cd gst-build
93 - ./git-update --no-interaction --manifest="${CI_PROJECT_DIR}/manifest.xml"
94 - meson build/ $MESON_ARGS
99 # Clean the artifacts packages to avoid copying "useless" build products.
100 - test -d build && find build -name '*.[ao]' -delete
101 # Clean the .git repos since we won't need them anymore
102 - rm -rf subprojects/*/.git/
103 - rm -rf build/subprojects/*/.git/
105 key: "${CI_JOB_NAME}"
116 - $CI_PROJECT_NAME == "cerbero"
123 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Domx=enabled -Dgst-omx:target=generic -Ddoc=enabled"
125 build nodebug fedora x86_64:
130 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic"
135 # Disable colored output to avoid weird rendering issues
136 GST_DEBUG_NO_COLOR: "true"
137 CI_ARTIFACTS_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/validate-logs/"
138 GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
141 - echo "-> Running ${TEST_SUITE}"
144 gst-validate-launcher ${TEST_SUITE}
150 --fail-on-testlist-change
151 -l "${CI_PROJECT_DIR}/validate-logs/"
152 --xunit-file "${CI_PROJECT_DIR}/validate-logs/xunit.xml"
153 ${EXTRA_VALIDATE_ARGS}
158 - 'gst-build/build/meson-logs/'
162 - "validate-logs/*.xml"
163 # We disable the .build above, which this job usually depends upon for cerbero
166 - $CI_PROJECT_NAME == "cerbero"
167 - $CI_PROJECT_NAME == "gst-examples"
168 - $CI_PROJECT_NAME == "gst-docs"
174 - build fedora x86_64
177 extends: '.test fedora x86_64'
179 TEST_SUITE: "check.gst*"
182 - $CI_PROJECT_NAME == "gst-integration-testsuites"
183 - $CI_PROJECT_NAME == "cerbero"
184 - $CI_PROJECT_NAME == "gst-examples"
185 - $CI_PROJECT_NAME == "gst-omx"
186 - $CI_PROJECT_NAME == "gst-docs"
188 integration testsuites fedora:
189 extends: '.test fedora x86_64'
191 - rm -f gst-build/build/subprojects/gstreamer-vaapi/gst/vaapi/libgstvaapi.so
193 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --check-bugs"
194 TEST_SUITE: "validate ges"
197 - $CI_PROJECT_NAME == "gst-omx"
198 - $CI_PROJECT_NAME == "gstreamer-vaapi"
199 - $CI_PROJECT_NAME == "cerbero"
200 - $CI_PROJECT_NAME == "gst-docs"
203 .valgrind fedora x86_64:
204 extends: '.test fedora x86_64'
207 EXTRA_VALIDATE_ARGS: "--valgrind"
208 # Some suppression files are missing a newline at the end which messes things
209 # up when concatenating them. awk will add missing newlines (unlike cat)
212 extends: '.valgrind fedora x86_64'
214 TEST_SUITE: "check.gstreamer\\..*"
217 - $CI_PROJECT_NAME == "gstreamer"
220 extends: '.valgrind fedora x86_64'
222 TEST_SUITE: "check.gst-plugins-base\\..*"
225 - $CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base)$/
228 extends: '.valgrind fedora x86_64'
230 TEST_SUITE: "check.gst-plugins-good\\..*"
233 - $CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good)$/
236 extends: '.valgrind fedora x86_64'
238 TEST_SUITE: "check.gst-plugins-ugly\\..*"
241 - $CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-ugly)$/
244 extends: '.valgrind fedora x86_64'
246 TEST_SUITE: "check.gst-plugins-bad\\..*"
249 - $CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-plugins-bad)$/
252 extends: '.valgrind fedora x86_64'
254 TEST_SUITE: "check.gst-editing-services\\..*"
257 - $CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-editing-services)$/
259 # Template for Cerbero GStreamer Build
262 # CONFIG: The name of the configuration file to use
264 # Produces runtime and devel tarball packages.
267 image: $CERBERO_IMAGE
271 CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
272 CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
273 CCACHE_MAXSIZE: "1.7G"
274 CERBERO_HOME: "${CI_PROJECT_DIR}/cerbero-build"
275 CERBERO_SOURCES: "${CI_PROJECT_DIR}/cerbero-sources"
276 CERBERO_DEPS: "cerbero-deps.tar.gz"
277 CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS}"
278 CERBERO: "./cerbero-uninstalled -c config/${CONFIG} -c localconf.cbc -m manifest.xml"
280 # FIXME Wrong namespace
281 # Workaround build-tools having hardcoded internal path
282 - mkdir -p /builds/gstreamer
283 - ln -sf ${CI_PROJECT_DIR} /builds/gstreamer/cerbero
284 - rsync -aH /cerbero/ .
285 - test -f ${CERBERO_DEPS} && tar -C ${CERBERO_HOME} -xf ${CERBERO_DEPS}
286 - echo "home_dir = \"${CERBERO_HOME}\"" >> localconf.cbc
287 - echo "local_sources = \"${CERBERO_SOURCES}\"" >> localconf.cbc
288 - ./cerbero-uninstalled --self-update manifest.xml
291 - $CERBERO $CERBERO_ARGS show-config
292 - $CERBERO $CERBERO_ARGS fetch-bootstrap --build-tools-only
293 - $CERBERO $CERBERO_ARGS fetch-package --deps gstreamer-1.0
294 - $CERBERO $CERBERO_ARGS fetch-cache
295 - $CERBERO $CERBERO_ARGS bootstrap --offline --build-tools-only
296 - $CERBERO $CERBERO_ARGS package --offline -t -o ${CI_PROJECT_DIR} gstreamer-1.0
300 - $CI_PROJECT_NAME == "gst-build"
301 - $CI_PROJECT_NAME == "gst-docs"
303 key: "${CI_JOB_NAME}"
306 - "${CERBERO_SOURCES}"
308 name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
313 - "cerbero-build/logs"
316 # Template for Cerbero GStreamer Deps
318 # This template is used by cerbero/ project to pre-built the GStreamer
319 # depedencies. When available, the .cerbero jobs will download this artifact
320 # in order to speed up the build.
323 # CONFIG: The name of the configuration file to use
324 # ARCH: The cerbero <os>_<cpu> (used in cache key)
326 # Produce an artifact with the dist/ and .cache along
327 # with the associated build-tools.
332 - $CERBERO $CERBERO_ARGS show-config
333 - $CERBERO $CERBERO_ARGS fetch-bootstrap --build-tools-only
334 - $CERBERO $CERBERO_ARGS fetch-package --deps gstreamer-1.0
335 - $CERBERO $CERBERO_ARGS bootstrap --offline --build-tools-only
336 - $CERBERO $CERBERO_ARGS build-deps --offline
337 gstreamer-1.0 gst-plugins-base-1.0 gst-plugins-good-1.0
338 gst-plugins-bad-1.0 gst-plugins-ugly-1.0 gst-rtsp-server-1.0
339 gst-libav-1.0 gst-validate gst-editing-services-1.0 libnice
340 - $CERBERO $CERBERO_ARGS fetch-cache --skip-fetch --job-id=${CI_JOB_ID}
341 - tar -C ${CERBERO_HOME} -czf $CERBERO_DEPS
342 build-tools build-tools.cache
343 dist/${ARCH} ${ARCH}.cache
347 - $CI_PROJECT_NAME == "cerbero"
349 name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
354 - "cerbero-build/logs"
355 - "cerbero-build/cerbero-deps.log"
359 # Cerbero Linux X86_64 build
361 cerbero deps fedora x86_64:
362 extends: '.cerbero deps'
364 CONFIG: "linux.config"
367 .cerbero fedora x86_64:
370 CONFIG: "linux.config"
372 cerbero fedora x86_64:
373 extends: '.cerbero fedora x86_64'
375 - "cerbero deps fedora x86_64"
378 - $CI_PROJECT_NAME == "cerbero"
380 build cerbero fedora x86_64:
381 extends: '.cerbero fedora x86_64'
384 - $CI_PROJECT_NAME == "cerbero"
385 - $CI_PROJECT_NAME == "gst-build"
386 - $CI_PROJECT_NAME == "gst-omx"
387 - $CI_PROJECT_NAME == "gstreamer-vaapi"
388 - $CI_PROJECT_NAME == "gst-docs"
391 # Cerbero Android Universal build
393 cerbero deps android universal:
394 extends: '.cerbero deps'
396 CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS} -v nowerror"
397 CONFIG: "cross-android-universal.cbc"
398 ARCH: "android_universal"
400 .cerbero android universal:
403 CERBERO_ARGS: "${DEFAULT_CERBERO_ARGS} -v nowerror"
404 CONFIG: "cross-android-universal.cbc"
406 cerbero android universal:
407 extends: '.cerbero android universal'
409 - "cerbero deps android universal"
412 - $CI_PROJECT_NAME == "cerbero"
414 build cerbero android universal:
415 extends: '.cerbero android universal'
418 - $CI_PROJECT_NAME == "cerbero"
419 - $CI_PROJECT_NAME == "gst-build"
420 - $CI_PROJECT_NAME == "gst-omx"
421 - $CI_PROJECT_NAME == "gstreamer-vaapi"
422 - $CI_PROJECT_NAME == "gst-docs"
425 # Cerbero Cross Windows builds
427 cerbero deps windows x86:
428 extends: '.cerbero deps'
430 CONFIG: "cross-win32.cbc"
433 .cerbero cross win32:
436 CONFIG: "cross-win32.cbc"
439 extends: '.cerbero cross win32'
441 - "cerbero deps windows x86"
444 - $CI_PROJECT_NAME == "cerbero"
446 build cerbero cross win32:
447 extends: '.cerbero cross win32'
450 - $CI_PROJECT_NAME == "cerbero"
451 - $CI_PROJECT_NAME == "gst-build"
452 - $CI_PROJECT_NAME == "gst-omx"
453 - $CI_PROJECT_NAME == "gstreamer-vaapi"
454 - $CI_PROJECT_NAME == "gst-docs"
456 cerbero deps windows x86_64:
457 extends: '.cerbero deps'
459 CONFIG: "cross-win64.cbc"
460 ARCH: "windows_x86_64"
462 .cerbero cross win64:
465 CONFIG: "cross-win64.cbc"
468 extends: '.cerbero cross win64'
470 - "cerbero deps windows x86_64"
473 - $CI_PROJECT_NAME == "cerbero"
475 build cerbero cross win64:
476 extends: '.cerbero cross win64'
479 - $CI_PROJECT_NAME == "cerbero"
480 - $CI_PROJECT_NAME == "gst-build"
481 - $CI_PROJECT_NAME == "gst-omx"
482 - $CI_PROJECT_NAME == "gstreamer-vaapi"
483 - $CI_PROJECT_NAME == "gst-docs"
486 # Build an Android App using the android binaries
488 .android universal examples:
489 image: $ANDROID_IMAGE
492 EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples
493 GSTREAMER_ROOT_ANDROID: ${CI_PROJECT_DIR}/examples/cerbero-android-universal
495 - mkdir -p ${EXAMPLES_HOME}/outputs
496 - curl -o clone_manifest_ref.py https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/master/gitlab/clone_manifest_ref.py
497 - chmod +x clone_manifest_ref.py
498 - ./clone_manifest_ref.py --manifest manifest.xml --project gst-examples --destination ${EXAMPLES_HOME}/gst-examples
499 - ./clone_manifest_ref.py --manifest manifest.xml --project gst-docs --destination ${EXAMPLES_HOME}/gst-docs
500 - rm clone_manifest_ref.py
502 # extract our binaries
503 - rm -f gstreamer-1.0-android-universal-*-runtime.tar.bz2
504 - mkdir ${GSTREAMER_ROOT_ANDROID}
505 - tar -C ${GSTREAMER_ROOT_ANDROID} -xf gstreamer-1.0-android-universal-*.tar.bz2
508 - chmod +x ${EXAMPLES_HOME}/gst-examples/playback/player/android/gradlew
509 - ${EXAMPLES_HOME}/gst-examples/playback/player/android/gradlew --no-search-upward --no-daemon --project-dir ${EXAMPLES_HOME}/gst-examples/playback/player/android assembleDebug
510 - cp ${EXAMPLES_HOME}/gst-examples/playback/player/android/app/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/
512 # gst-docs android tutorials
513 - chmod +x ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/gradlew
514 - ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/gradlew --no-search-upward --no-daemon --project-dir ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android assembleDebug
515 - cp ${EXAMPLES_HOME}/gst-docs/examples/tutorials/android/android-tutorial-*/build/outputs/apk/debug/*.apk ${EXAMPLES_HOME}/outputs/
517 - rm -rf ${GSTREAMER_ROOT_ANDROID}
518 - rm -rf ${EXAMPLES_HOME}/gst-examples ${EXAMPLES_HOME}/gst-docs
520 name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
525 - "${EXAMPLES_HOME}/outputs"
527 android universal examples:
528 extends: ".android universal examples"
530 - "build cerbero android universal"
533 - $CI_PROJECT_NAME == "cerbero"
534 - $CI_PROJECT_NAME == "gst-build"
535 - $CI_PROJECT_NAME == "gst-omx"
536 - $CI_PROJECT_NAME == "gst-integration-testsuites"
537 - $CI_PROJECT_NAME == "gstreamer-vaapi"
538 - $CI_PROJECT_NAME == "gst-docs"
540 cerbero android universal examples:
541 extends: ".android universal examples"
543 - "cerbero android universal"
546 - $CI_PROJECT_NAME == "cerbero"
551 - 'build fedora x86_64'
556 - ./gst-uninstalled.py hotdoc run --conf-file=build/subprojects/gst-docs/GStreamer-doc.json --fatal-warnings
558 - mv gst-build/build/subprojects/gst-docs/GStreamer-doc/html documentation/