ci: Rework use of BUILD_GST_DEBUG and BUILD_TYPE variables

When using parallel:matrix variables, only the value of the
variable is shown in the Gitlab GUI and thus we end up with
a job name resembling "build fedora gcc: [both, true]".

Pass down the whole string/arguments as the matrix variable
values so that we will have a bit more context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4698>
This commit is contained in:
Jordan Petridis 2023-05-24 15:26:44 +03:00
parent cf1286b0e9
commit 8057597dd2

View file

@ -248,12 +248,10 @@ commitlint:
# build setup templates # build setup templates
# #
# Expects: # Expects:
# BUILD_TYPE: Dynamic or shared library # BUILD_TYPE: Proxy of meson's --default-library arg
# must be 'shared' or 'static' or 'both' # must be 'shared' or 'static' or 'both'
# corresponds to --default-library meson arg
# BUILD_GST_DEBUG: Build with gst debug symbols or not # BUILD_GST_DEBUG: Build with gst debug symbols or not
# must be a string of a boolean, "true" or "false". Not yaml bool. # must be a string like this: -Dgstreamer:gst_debug=true.
# corresponds to -Dgstreamer:gst_debug meson arg
# GST_WERROR: make warning fatal or not # GST_WERROR: make warning fatal or not
# must be a string of a boolean, "true" or "false". Not yaml bool. # must be a string of a boolean, "true" or "false". Not yaml bool.
# SUBPROJECTS_CACHE_DIR: The location in the image of the subprojects cache # SUBPROJECTS_CACHE_DIR: The location in the image of the subprojects cache
@ -266,7 +264,7 @@ commitlint:
- date -R - date -R
- ci/scripts/handle-subprojects-cache.py --cache-dir /subprojects subprojects/ - ci/scripts/handle-subprojects-cache.py --cache-dir /subprojects subprojects/
- date -R - date -R
- export ARGS="--default-library=${BUILD_TYPE:-both} -Dgstreamer:gst_debug=${BUILD_GST_DEBUG:-true} ${MESON_ARGS}" - export ARGS="${BUILD_TYPE:---default-library=both} ${BUILD_GST_DEBUG:--Dgstreamer:gst_debug=true} ${MESON_ARGS}"
- echo $GST_WERROR - echo $GST_WERROR
- |- - |-
if [ "$GST_WERROR" = "true" ]; then if [ "$GST_WERROR" = "true" ]; then
@ -326,7 +324,7 @@ commitlint:
# Also need to take into account I/O of pulling docker images and uploading artifacts # Also need to take into account I/O of pulling docker images and uploading artifacts
timeout: '45min' timeout: '45min'
variables: variables:
BUILD_GST_DEBUG: "true" BUILD_GST_DEBUG: "-Dgstreamer:gst_debug=true"
GST_WERROR: "true" GST_WERROR: "true"
MESON_ARGS: "${DEFAULT_MESON_ARGS}" MESON_ARGS: "${DEFAULT_MESON_ARGS}"
SUBPROJECTS_CACHE_DIR: "/subprojects" SUBPROJECTS_CACHE_DIR: "/subprojects"
@ -376,11 +374,11 @@ build fedora gcc:
CXX: 'ccache g++' CXX: 'ccache g++'
parallel: parallel:
matrix: matrix:
- BUILD_TYPE: ['shared', 'both'] - BUILD_TYPE: [ "--default-library=shared", "--default-library=both"]
BUILD_GST_DEBUG: ["true", "false", ] BUILD_GST_DEBUG: ["-Dgstreamer:gst_debug=true", "-Dgstreamer:gst_debug=false"]
- BUILD_TYPE: ['static'] - BUILD_TYPE: ["--default-library=static"]
BUILD_GST_DEBUG: ["true", "false"] BUILD_GST_DEBUG: ["-Dgstreamer:gst_debug=true", "-Dgstreamer:gst_debug=false"]
# Passing Dpython=enabled prohibits us from -Dgst-editing-services:python=disabled which we # Passing Dpython=enabled prohibits us from -Dgst-editing-services:python=disabled which we
# currently need to statically build ges. # currently need to statically build ges.
# #
@ -402,11 +400,11 @@ build fedora clang:
CXX: 'ccache clang++' CXX: 'ccache clang++'
parallel: parallel:
matrix: matrix:
- BUILD_TYPE: ['shared', 'both'] - BUILD_TYPE: [ "--default-library=shared", "--default-library=both"]
BUILD_GST_DEBUG: ["true"] BUILD_GST_DEBUG: ["-Dgstreamer:gst_debug=true"]
- BUILD_TYPE: ['shared', 'both'] - BUILD_TYPE: [ "--default-library=shared", "--default-library=both"]
BUILD_GST_DEBUG: ["false"] BUILD_GST_DEBUG: ["-Dgstreamer:gst_debug=false"]
# FIXME: # FIXME:
# clang complains about the gir files when gst_debug is false: # clang complains about the gir files when gst_debug is false:
# We can merge the two parallel: matrix after # We can merge the two parallel: matrix after
@ -417,8 +415,8 @@ build fedora clang:
# ^ # ^
MESON_ARGS: "${SIMPLE_BUILD} -Dintrospection=disabled" MESON_ARGS: "${SIMPLE_BUILD} -Dintrospection=disabled"
- BUILD_TYPE: ['static'] - BUILD_TYPE: ["--default-library=static"]
BUILD_GST_DEBUG: ["true", "false"] BUILD_GST_DEBUG: ["-Dgstreamer:gst_debug=true", "-Dgstreamer:gst_debug=false"]
# Passing Dpython=enabled prohibits us from -Dgst-editing-services:python=disabled which we # Passing Dpython=enabled prohibits us from -Dgst-editing-services:python=disabled which we
# currently need to statically build ges. # currently need to statically build ges.
# #
@ -556,7 +554,6 @@ build macos:
- '.build' - '.build'
- '.macos image' - '.macos image'
variables: variables:
BUILD_GST_DEBUG: "true"
# gst-libav/ffmpeg throws Wundef errors # gst-libav/ffmpeg throws Wundef errors
GST_WERROR: "false" GST_WERROR: "false"
MESON_ARGS: "${DEFAULT_MESON_ARGS}" MESON_ARGS: "${DEFAULT_MESON_ARGS}"
@ -569,8 +566,8 @@ build macos:
- subprojects/macos-*/* - subprojects/macos-*/*
parallel: parallel:
matrix: matrix:
- BUILD_TYPE: ['both'] - BUILD_TYPE: ["--default-library=both"]
BUILD_GST_DEBUG: ["true"] BUILD_GST_DEBUG: ["-Dgstreamer:gst_debug=true"]
# FIXME: We currently don't have pkg-config required by gobject-introspection/pygobject/sharp # FIXME: We currently don't have pkg-config required by gobject-introspection/pygobject/sharp
# macos doesn't support vaapi # macos doesn't support vaapi
MESON_ARGS: >- MESON_ARGS: >-
@ -720,7 +717,7 @@ gstreamer-full static build:
extends: '.build fedora x86_64' extends: '.build fedora x86_64'
stage: 'build' stage: 'build'
variables: variables:
BUILD_TYPE: "static" BUILD_TYPE: "--default-library=static"
MESON_ARGS: >- MESON_ARGS: >-
-Ddoc=disabled -Ddoc=disabled
SUBPROJECTS_CACHE_DIR: "/subprojects" SUBPROJECTS_CACHE_DIR: "/subprojects"
@ -732,9 +729,9 @@ gstreamer-full-minimal static build:
extends: 'gstreamer-full static build' extends: 'gstreamer-full static build'
stage: 'build' stage: 'build'
variables: variables:
BUILD_GST_DEBUG: 'false' BUILD_GST_DEBUG: "-Dgstreamer:gst_debug=false"
GST_WERROR: "true" GST_WERROR: "true"
BUILD_TYPE: "static" BUILD_TYPE: "--default-library=static"
MESON_ARGS: >- MESON_ARGS: >-
-Ddoc=disabled -Ddoc=disabled
-Dauto_features=disabled -Dauto_features=disabled