From 430168cc8fbeb495ac24db7b20374fa181dcc1db Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 4 Jun 2021 08:50:10 +0200 Subject: [PATCH 1/2] CI: Split test execution into per-backend jobs This creates one job per cairo backend that is tested on CI. That backend is then tested in its own job. One motivation is that this will hopefully be faster, because tests are run in parallel. Another motivation is that this lets us get around the one hour time limit per job. A downside is that the inter-backend tests are not run in CI. For example, xlib-surface-source requires a working X11 server. I am not providing that X11 server here. Signed-off-by: Uli Schlachter --- .gitlab-ci.yml | 124 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 92 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52db4de47..5d455afb8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,7 @@ variables: stages: - prep + - build - test # Global CI policy: This can be used to configure global behaviour our our jobs @@ -98,39 +99,25 @@ fedora autotools build: extends: - '.fdo.distribution-image@fedora' - '.ccache_setup' - stage: 'test' + stage: 'build' script: - ./autogen.sh - # Current test failures that we ignore for now - - export CAIRO_TEST_UGLY_HACK_TO_SOMETIMES_IGNORE_SCRIPT_XCB_HUGE_IMAGE_SHM=1 - - export CAIRO_TEST_UGLY_HACK_TO_IGNORE_CREATE_FOR_STREAM=1 - - export CAIRO_TEST_IGNORE_pdf_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-pdf-argb32.txt) - - export CAIRO_TEST_IGNORE_pdf_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-pdf-rgb24.txt) - - export CAIRO_TEST_IGNORE_script_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-script-argb32.txt) - - export CAIRO_TEST_IGNORE_image_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-image-argb32.txt) - - export CAIRO_TEST_IGNORE_image_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-image-rgb24.txt) - - export CAIRO_TEST_IGNORE_image16_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-image16-rgb24.txt) - - export CAIRO_TEST_IGNORE_recording_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-recording-argb32.txt) - - export CAIRO_TEST_IGNORE_recording_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-recording-rgb24.txt) - - export CAIRO_TEST_IGNORE_svg11_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-svg11-argb32.txt) - - export CAIRO_TEST_IGNORE_svg11_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-svg11-rgb24.txt) - - export CAIRO_TEST_IGNORE_xcb_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-argb32.txt) - - export CAIRO_TEST_IGNORE_xcb_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-rgb24.txt) - - export CAIRO_TEST_IGNORE_xcb_window_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-window-rgb24.txt) - - export CAIRO_TEST_IGNORE_xcb_window__rgb24=$(tr '\n' ',' < '.gitlab-ci/ignore-xcb-window&-rgb24.txt') - - export CAIRO_TEST_IGNORE_xcb_render_0_0_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-render-0-0-argb32.txt) - - export CAIRO_TEST_IGNORE_xcb_render_0_0_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-render-0-0-rgb24.txt) - - export CAIRO_TEST_IGNORE_xcb_fallback_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-fallback-rgb24.txt) - - export CAIRO_TEST_IGNORE_xlib_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-xlib-argb32.txt) - - export CAIRO_TEST_IGNORE_xlib_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xlib-rgb24.txt) - - export CAIRO_TEST_IGNORE_xlib_window_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xlib-window-rgb24.txt) - - export CAIRO_TEST_IGNORE_xlib_render_0_0_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xlib-render-0-0-rgb24.txt) - - export CAIRO_TEST_IGNORE_xlib_fallback_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xlib-fallback-rgb24.txt) - - export CAIRO_BOILERPLATE_OPEN_NO_DAEMON=1 - - export CAIRO_BOILERPLATE_DO_NOT_CRASH_ON_ANY2PPM_ERROR=1 - - export ANY2PPM="timeout 3m ./any2ppm" - - ulimit -S -s 131072 - - xvfb-run make check V=1 VERBOSE=1 + - make V=1 VERBOSE=1 + artifacts: + when: 'always' + expire_in: '2 days' + paths: + - "*" + +.test fedora autotools: + dependencies: + - 'fedora autotools build' + needs: + - 'fedora autotools build' + extends: + - '.fdo.distribution-image@fedora' + - '.ccache_setup' + stage: 'test' artifacts: when: 'always' expire_in: "7 days" @@ -143,11 +130,81 @@ fedora autotools build: - "test/**/*.cs" - "test/**/*.trace" +test fedora autotools pdf: + extends: '.test fedora autotools' + script: + - export CAIRO_TEST_IGNORE_pdf_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-pdf-argb32.txt) + - export CAIRO_TEST_IGNORE_pdf_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-pdf-rgb24.txt) + - export CAIRO_TEST_TARGET=pdf + - make check V=1 VERBOSE=1 + +test fedora autotools script: + extends: '.test fedora autotools' + script: + - export CAIRO_TEST_UGLY_HACK_TO_SOMETIMES_IGNORE_SCRIPT_XCB_HUGE_IMAGE_SHM=1 + - export CAIRO_TEST_IGNORE_script_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-script-argb32.txt) + - export CAIRO_TEST_TARGET=script + - make check V=1 VERBOSE=1 + +test fedora autotools image: + extends: '.test fedora autotools' + script: + - export CAIRO_TEST_IGNORE_image_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-image-argb32.txt) + - export CAIRO_TEST_IGNORE_image_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-image-rgb24.txt) + - export CAIRO_TEST_IGNORE_image16_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-image16-rgb24.txt) + - export CAIRO_TEST_TARGET=image,image16 + - make check V=1 VERBOSE=1 + +test fedora autotools recording: + extends: '.test fedora autotools' + script: + - export CAIRO_TEST_IGNORE_recording_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-recording-argb32.txt) + - export CAIRO_TEST_IGNORE_recording_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-recording-rgb24.txt) + - export CAIRO_TEST_TARGET=recording + - make check V=1 VERBOSE=1 + +test fedora autotools svg: + extends: '.test fedora autotools' + script: + - export CAIRO_TEST_UGLY_HACK_TO_IGNORE_CREATE_FOR_STREAM=1 + - export CAIRO_TEST_IGNORE_svg11_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-svg11-argb32.txt) + - export CAIRO_TEST_IGNORE_svg11_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-svg11-rgb24.txt) + - export CAIRO_TEST_TARGET=svg11 + - export CAIRO_BOILERPLATE_OPEN_NO_DAEMON=1 + - export CAIRO_BOILERPLATE_DO_NOT_CRASH_ON_ANY2PPM_ERROR=1 + - export ANY2PPM="timeout 3m ./any2ppm" + - ulimit -S -s 131072 + - make check V=1 VERBOSE=1 + +test fedora autotools xcb: + extends: '.test fedora autotools' + script: + - export CAIRO_TEST_IGNORE_xcb_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-argb32.txt) + - export CAIRO_TEST_IGNORE_xcb_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-rgb24.txt) + - export CAIRO_TEST_IGNORE_xcb_window_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-window-rgb24.txt) + - export CAIRO_TEST_IGNORE_xcb_window__rgb24=$(tr '\n' ',' < '.gitlab-ci/ignore-xcb-window&-rgb24.txt') + - export CAIRO_TEST_IGNORE_xcb_render_0_0_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-render-0-0-argb32.txt) + - export CAIRO_TEST_IGNORE_xcb_render_0_0_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-render-0-0-rgb24.txt) + - export CAIRO_TEST_IGNORE_xcb_fallback_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xcb-fallback-rgb24.txt) + - export CAIRO_TEST_TARGET="xcb,xcb-window,xcb-window&,xcb-render-0_0,xcb-fallback" + - xvfb-run make check V=1 VERBOSE=1 + +test fedora autotools xlib: + extends: '.test fedora autotools' + script: + - export CAIRO_TEST_IGNORE_xlib_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-xlib-argb32.txt) + - export CAIRO_TEST_IGNORE_xlib_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xlib-rgb24.txt) + - export CAIRO_TEST_IGNORE_xlib_window_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xlib-window-rgb24.txt) + - export CAIRO_TEST_IGNORE_xlib_render_0_0_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xlib-render-0-0-rgb24.txt) + - export CAIRO_TEST_IGNORE_xlib_fallback_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-xlib-fallback-rgb24.txt) + - export CAIRO_TEST_TARGET="xlib,xlib-window,xlib-render-0_0,xlib-fallback" + - xvfb-run make check V=1 VERBOSE=1 + fedora meson build: extends: - '.fdo.distribution-image@fedora' - '.ccache_setup' - stage: 'test' + stage: 'build' variables: MESON_ARGS: > ${DEFAULT_MESON_ARGS} @@ -166,6 +223,7 @@ fedora meson build: # Based on https://gitlab.freedesktop.org/gstreamer/gst-ci/-/blob/master/gitlab/ci_template.yml .build meson windows: image: $WINDOWS_IMAGE + stage: 'build' tags: - 'docker' - 'windows' @@ -214,6 +272,7 @@ meson vs2017 x86: meson android arm64 fedora: # See https://gitlab.freedesktop.org/gstreamer/gst-ci/container_registry/164 for current images image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/android-fedora:2020-10-22.0-master' + stage: 'build' artifacts: name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}" expire_in: '5 days' @@ -255,6 +314,7 @@ meson android arm64 fedora: meson macOS: tags: - gst-macos-11.1 + stage: 'build' artifacts: when: 'always' expire_in: "7 days" From 987bbdd7bd7ad890ef5830d48e11e1901c3369b9 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 4 Jun 2021 16:11:18 +0200 Subject: [PATCH 2/2] Always run tests with an X11 server This allows tests xcb-surface-source and xlib-surface-source to run. Somehow I thought this would be more complicated... Signed-off-by: Uli Schlachter --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d455afb8..b378c0556 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -136,7 +136,7 @@ test fedora autotools pdf: - export CAIRO_TEST_IGNORE_pdf_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-pdf-argb32.txt) - export CAIRO_TEST_IGNORE_pdf_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-pdf-rgb24.txt) - export CAIRO_TEST_TARGET=pdf - - make check V=1 VERBOSE=1 + - xvfb-run make check V=1 VERBOSE=1 test fedora autotools script: extends: '.test fedora autotools' @@ -144,7 +144,7 @@ test fedora autotools script: - export CAIRO_TEST_UGLY_HACK_TO_SOMETIMES_IGNORE_SCRIPT_XCB_HUGE_IMAGE_SHM=1 - export CAIRO_TEST_IGNORE_script_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-script-argb32.txt) - export CAIRO_TEST_TARGET=script - - make check V=1 VERBOSE=1 + - xvfb-run make check V=1 VERBOSE=1 test fedora autotools image: extends: '.test fedora autotools' @@ -153,7 +153,7 @@ test fedora autotools image: - export CAIRO_TEST_IGNORE_image_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-image-rgb24.txt) - export CAIRO_TEST_IGNORE_image16_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-image16-rgb24.txt) - export CAIRO_TEST_TARGET=image,image16 - - make check V=1 VERBOSE=1 + - xvfb-run make check V=1 VERBOSE=1 test fedora autotools recording: extends: '.test fedora autotools' @@ -161,7 +161,7 @@ test fedora autotools recording: - export CAIRO_TEST_IGNORE_recording_argb32=$(tr '\n' ',' < .gitlab-ci/ignore-recording-argb32.txt) - export CAIRO_TEST_IGNORE_recording_rgb24=$(tr '\n' ',' < .gitlab-ci/ignore-recording-rgb24.txt) - export CAIRO_TEST_TARGET=recording - - make check V=1 VERBOSE=1 + - xvfb-run make check V=1 VERBOSE=1 test fedora autotools svg: extends: '.test fedora autotools' @@ -174,7 +174,7 @@ test fedora autotools svg: - export CAIRO_BOILERPLATE_DO_NOT_CRASH_ON_ANY2PPM_ERROR=1 - export ANY2PPM="timeout 3m ./any2ppm" - ulimit -S -s 131072 - - make check V=1 VERBOSE=1 + - xvfb-run make check V=1 VERBOSE=1 test fedora autotools xcb: extends: '.test fedora autotools'