ci: Replace REGEX variables

Passing regex as variable does not really works, we ended up matching the
regex as a string instead. Replace all REGEX variable with rules: override.
It is longer but more reliable.

Related to !247
Fixes #63
This commit is contained in:
Nicolas Dufresne 2020-03-17 21:58:54 -04:00
parent bbc624175d
commit a8941a8566

View file

@ -38,19 +38,9 @@ variables:
#
# Global CI policy
#
# This can be used to configure global behaviour our our jobs. It also
# supports some variable to affect the job when:
#
# EXCEPT_PROJECT_REGEX: Will mark to never if that regex match
# ONLY_PROJECT_REGEX: Will mark to never if that regex do not match
# This can be used to configure global behaviour our our jobs.
#
.global_ci_policy:
rules:
- if: '$EXCEPT_PROJECT_REGEX && $CI_PROJECT_NAME =~ $EXCEPT_PROJECT_REGEX'
when: 'never'
- if: '$ONLY_PROJECT_REGEX && $CI_PROJECT_NAME !~ $ONLY_PROJECT_REGEX'
when: 'never'
- when: 'on_success'
retry:
max: 2
when:
@ -88,7 +78,8 @@ gst indent:
stage: 'preparation'
variables:
GIT_STRATEGY: 'fetch'
EXCEPT_PROJECT_REGEX: '/^(gstreamer-sharp|gst-integration-testsuites|cerbero|gst-docs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(gstreamer-sharp|gst-integration-testsuites|cerbero|gst-docs)$/'
script:
# man indent. grep RETURN VALUE, grab a beer on my behalf...
- indent --version || true
@ -123,7 +114,8 @@ gst indent:
CARGO_HOME: "/cache/gstreamer/cargo"
MESON_ARGS: "${DEFAULT_MESON_ARGS} ${MESON_BUILDTYPE_ARGS} --werror"
EXCEPT_PROJECT_REGEX: '/^(cerbero)$/'
rules:
- if: '$CI_PROJECT_NAME != "cerbero"'
script:
- ccache --show-stats
@ -151,7 +143,8 @@ build fedora x86_64:
image: $FEDORA_IMAGE
variables:
MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Domx=enabled -Dgst-omx:target=generic -Ddoc=enabled -Drs=disabled ${MESON_BUILDTYPE_ARGS} --werror"
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-omx|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-omx|gst-plugins-rs)$/'
artifacts:
expire_in: '5 days'
when: always
@ -165,26 +158,30 @@ build nodebug fedora x86_64:
image: $FEDORA_IMAGE
variables:
MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic -Drs=disabled ${MESON_BUILDTYPE_ARGS} --werror"
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
build static fedora x86_64:
extends: 'build fedora x86_64'
variables:
MESON_BUILDTYPE_ARGS: "--default-library=static -Dintrospection=disabled -Ddoc=disabled"
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
build static nodebug fedora x86_64:
extends: 'build nodebug fedora x86_64'
variables:
MESON_BUILDTYPE_ARGS: "--default-library=static -Dintrospection=disabled -Ddoc=disabled"
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
build clang fedora x86_64:
extends: 'build fedora x86_64'
variables:
CC: 'ccache clang'
CXX: 'ccache clang++'
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
.test:
stage: 'test'
@ -197,7 +194,8 @@ build clang fedora x86_64:
GST_VALIDATE_LAUNCHER_FORCE_COLORS: "true"
TIMEOUT_FACTOR: "2"
CARGO_HOME: "/cache/gstreamer/cargo"
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-examples|gst-docs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-examples|gst-docs)$/'
script:
- cd gst-build/
- echo "-> Running ${TEST_SUITE}"
@ -235,7 +233,8 @@ check fedora:
extends: '.test fedora x86_64'
variables:
TEST_SUITE: "check.gst*"
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-docs|gst-examples|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-examples|gst-integration-testsuites|gst-omx|gst-plugins-rs)$/'
integration testsuites fedora:
extends: '.test fedora x86_64'
@ -243,7 +242,8 @@ integration testsuites fedora:
variables:
EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures --check-bugs --parts=${CI_NODE_TOTAL} --part-index=${CI_NODE_INDEX}"
TEST_SUITE: "validate ges"
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-docs|gst-omx|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-omx|gst-plugins-rs)$/'
gstreamer-full:
extends: 'build static fedora x86_64'
@ -253,8 +253,9 @@ gstreamer-full:
--default-library=static
-Dauto_features=disabled
-Dgst-plugins-good:alpha=enabled
EXCEPT_PROJECT_REGEX: ''
ONLY_PROJECT_REGEX: '/^(gst-build|gst-ci)$/'
rules:
- if: '$CI_PROJECT_NAME =~ /^(gst-build|gst-ci)$/'
after_script:
- cd gst-build/
- ninja -C build install
@ -280,37 +281,43 @@ valgrind core:
extends: '.valgrind fedora x86_64'
variables:
TEST_SUITE: "check.gstreamer\\..*"
ONLY_PROJECT_REGEX: '/^(gstreamer|gst-ci)$/'
rules:
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-ci)$/'
valgrind base:
extends: '.valgrind fedora x86_64'
variables:
TEST_SUITE: "check.gst-plugins-base\\..*"
ONLY_PROJECT_REGEX: '/^(gstreamer|gst-plugins-base|gst-ci)$/'
rules:
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-ci)$/'
valgrind good:
extends: '.valgrind fedora x86_64'
variables:
TEST_SUITE: "check.gst-plugins-good\\..*"
ONLY_PROJECT_REGEX: '/^(gstreamer|gst-plugins-base|gst-plugins-good|gst-ci)$/'
rules:
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-ci)$/'
valgrind ugly:
extends: '.valgrind fedora x86_64'
variables:
TEST_SUITE: "check.gst-plugins-ugly\\..*"
ONLY_PROJECT_REGEX: '/^(gstreamer|gst-plugins-base|gst-plugins-ugly|gst-ci)$/'
rules:
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-ugly|gst-ci)$/'
valgrind bad:
extends: '.valgrind fedora x86_64'
variables:
TEST_SUITE: "check.gst-plugins-bad\\..*"
ONLY_PROJECT_REGEX: '/^(gstreamer|gst-plugins-base|gst-plugins-good|gst-plugins-bad|gst-ci)$/'
rules:
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-plugins-bad|gst-ci)$/'
valgrind ges:
extends: '.valgrind fedora x86_64'
variables:
TEST_SUITE: "check.gst-editing-services\\..*"
ONLY_PROJECT_REGEX: '/^(gstreamer|gst-plugins-base|gst-plugins-good|gst-editing-services|gst-ci|gst-devtools)$/'
rules:
- if: '$CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-editing-services|gst-ci|gst-devtools)$/'
# Template for Cerbero GStreamer Build
#
@ -324,6 +331,8 @@ valgrind ges:
image: $CERBERO_IMAGE
extends:
- '.global_ci_policy'
rules:
- if: '$CI_PROJECT_NAME == "cerbero"'
needs:
- "manifest"
# Ensure that the runners it will be executed on
@ -414,7 +423,8 @@ valgrind ges:
-Dlibav=disabled
-Dvaapi=disabled
-Ddevtools=disabled
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs|gstreamer-vaapi)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-docs|gst-integration-testsuites|gst-omx|gst-plugins-rs|gstreamer-vaapi)$/'
script:
# Sometimes there's seems to be an existing gst-build clone that comes either from the ether or
# from a previous job due to some gitlab bug or implicit behavior?
@ -509,8 +519,8 @@ build msys2 :
# with the associated build-tools.
.cerbero deps:
extends: .cerbero
variables:
ONLY_PROJECT_REGEX: '/^cerbero$/'
rules:
- if: '$CI_PROJECT_NAME == "cerbero"'
stage: "pre-build"
script:
- $CERBERO $CERBERO_ARGS show-config
@ -554,15 +564,13 @@ cerbero deps fedora x86_64:
cerbero fedora x86_64:
extends: '.cerbero fedora x86_64'
variables:
ONLY_PROJECT_REGEX: '/^cerbero$/'
needs:
- "cerbero deps fedora x86_64"
build cerbero fedora x86_64:
extends: '.cerbero fedora x86_64'
variables:
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
#
# Cerbero Android Universal build
@ -588,15 +596,13 @@ cerbero deps cross-android universal:
cerbero cross-android universal:
extends: '.cerbero cross-android universal'
variables:
ONLY_PROJECT_REGEX: '/^cerbero$/'
needs:
- "cerbero deps cross-android universal"
build cerbero cross-android universal:
extends: '.cerbero cross-android universal'
variables:
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
#
# Cerbero Cross Windows builds
@ -616,15 +622,13 @@ cerbero deps cross-windows x86:
cerbero cross win32:
extends: '.cerbero cross win32'
variables:
ONLY_PROJECT_REGEX: '/^cerbero$/'
needs:
- "cerbero deps cross-windows x86"
build cerbero cross win32:
extends: '.cerbero cross win32'
variables:
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
cerbero deps cross-windows x86_64:
extends: '.cerbero deps'
@ -641,15 +645,13 @@ cerbero deps cross-windows x86_64:
cerbero cross win64:
extends: '.cerbero cross win64'
variables:
ONLY_PROJECT_REGEX: '/^cerbero$/'
needs:
- "cerbero deps cross-windows x86_64"
build cerbero cross win64:
extends: '.cerbero cross win64'
variables:
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-docs|gst-integration-testsuites|gst-plugins-rs)$/'
#
# Build an Android App using the android binaries
@ -697,15 +699,15 @@ build cerbero cross win64:
cross-android universal examples:
extends: ".cross-android universal examples"
variables:
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
needs:
- "build cerbero cross-android universal"
cerbero cross-android universal examples:
extends: ".cross-android universal examples"
variables:
ONLY_PROJECT_REGEX: '/^cerbero$/'
rules:
- if: '$CI_PROJECT_NAME == "cerbero"'
needs:
- "cerbero cross-android universal"
@ -746,15 +748,13 @@ cerbero deps macos x86_64:
cerbero macos x86_64:
extends: '.cerbero macos x86_64'
variables:
ONLY_PROJECT_REGEX: '/^cerbero$/'
needs:
- "cerbero deps macos x86_64"
build cerbero macos x86_64:
extends: '.cerbero macos x86_64'
variables:
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-build|gst-docs|gst-omx|gst-sharp|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gst-sharp|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
#
# Cerbero iOS build
@ -792,22 +792,20 @@ cerbero deps cross-ios universal:
cerbero cross-ios universal:
extends: '.cerbero cross-ios universal'
variables:
ONLY_PROJECT_REGEX: '/^cerbero$/'
needs:
- "cerbero deps cross-ios universal"
build cerbero cross-ios universal:
extends: '.cerbero cross-ios universal'
variables:
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-build|gst-docs|gst-omx|gst-sharp|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-docs|gst-omx|gst-sharp|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
documentation:
image: $FEDORA_IMAGE
extends:
- '.global_ci_policy'
variables:
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-build|gst-sharp|gst-integration-testsuites|gst-omx|gst-plugins-rs|gst-python)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-sharp|gst-integration-testsuites|gst-omx|gst-plugins-rs|gst-python)$/'
needs:
- "build fedora x86_64"
stage: integrate
@ -839,7 +837,8 @@ documentation:
CODE_SIGN_IDENTITY=""
CODE_SIGNING_ALLOWED="NO"
CODE_SIGN_ENTITLEMENTS=""
EXCEPT_PROJECT_REGEX: '/^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
rules:
- if: '$CI_PROJECT_NAME !~ /^(cerbero|gst-build|gst-omx|gstreamer-vaapi|gst-integration-testsuites|gst-plugins-rs)$/'
script:
# install the binaries
- installer -pkg gstreamer-1.0-devel-*-ios-universal.pkg -target CurrentUserHomeDirectory -verbose
@ -873,8 +872,8 @@ cross-ios universal examples:
cerbero cross-ios universal examples:
extends: ".cross-ios universal examples"
variables:
ONLY_PROJECT_REGEX: '/^cerbero$/'
rules:
- if: '$CI_PROJECT_NAME == "cerbero"'
needs:
- "cerbero cross-ios universal"
@ -882,8 +881,8 @@ build gst-omx zynq fedora x86_64:
extends: 'build fedora x86_64'
variables:
MESON_ARGS: "-Domx=enabled -Dgst-omx:target=zynqultrascaleplus -Dgst-omx:header_path=${CI_PROJECT_DIR}/vcu-omx-il/omx_header -Dpython=disabled -Dlibav=disabled -Dlibnice=disabled -Dugly=disabled -Dbad=disabled -Ddevtools=disabled -Dges=disabled -Drtsp_server=disabled -Dvaapi=disabled -Dsharp=disabled -Dgst-examples=disabled -Drs=disabled ${MESON_BUILDTYPE_ARGS} --werror"
EXCEPT_PROJECT_REGEX: ''
ONLY_PROJECT_REGEX: '/^(gst-omx|gst-ci)$/'
rules:
- if: '$CI_PROJECT_NAME =~ /^(gst-omx|gst-ci)$/'
before_script:
- git clone https://github.com/Xilinx/vcu-omx-il.git --branch=release-2019.2 ${CI_PROJECT_DIR}/vcu-omx-il
@ -892,8 +891,8 @@ build gst-omx tizonia fedora x86_64:
variables:
MESON_ARGS: "-Domx=enabled -Dgst-omx:target=tizonia -Dpython=disabled -Dlibav=disabled -Dlibnice=disabled -Dugly=disabled -Dbad=disabled -Ddevtools=disabled -Dges=disabled -Drtsp_server=disabled -Dvaapi=disabled -Dsharp=disabled -Dgst-examples=disabled -Drs=disabled ${MESON_BUILDTYPE_ARGS} --werror"
PKG_CONFIG_PATH: ${PKG_CONFIG_PATH}:${CI_PROJECT_DIR}/tizonia-install/lib64/pkgconfig/
EXCEPT_PROJECT_REGEX: ''
ONLY_PROJECT_REGEX: '/^(gst-omx|gst-ci)$/'
rules:
- if: '$CI_PROJECT_NAME =~ /^(gst-omx|gst-ci)$/'
before_script:
- git clone https://github.com/tizonia/tizonia-openmax-il --branch v0.20.2
- cd tizonia-openmax-il