mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
ci: Don't build the gtk subproject unless the changes are relevant
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7439>
This commit is contained in:
parent
9638692761
commit
cb89358d74
2 changed files with 20 additions and 8 deletions
|
@ -320,6 +320,16 @@ commitlint:
|
||||||
- if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
|
- if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
|
# Check whether the gtk wrap had any changes, and if so, build it
|
||||||
|
.gtk-build-rules:
|
||||||
|
rules:
|
||||||
|
- changes:
|
||||||
|
- .gitlab-ci.yml
|
||||||
|
- meson.build
|
||||||
|
- subprojects/*.wrap
|
||||||
|
variables:
|
||||||
|
GTK_ARGS: "-Dgtk=enabled"
|
||||||
|
|
||||||
.build:
|
.build:
|
||||||
stage: 'build'
|
stage: 'build'
|
||||||
needs:
|
needs:
|
||||||
|
@ -465,8 +475,8 @@ build debian x86_64:
|
||||||
-Dgst-plugins-good:cairo=enabled
|
-Dgst-plugins-good:cairo=enabled
|
||||||
-Dgst-plugins-good:soup=enabled
|
-Dgst-plugins-good:soup=enabled
|
||||||
-Dgst-plugins-bad:d3d11-wgc=enabled
|
-Dgst-plugins-bad:d3d11-wgc=enabled
|
||||||
-Dgtk=enabled
|
|
||||||
rules:
|
rules:
|
||||||
|
- !reference [.gtk-build-rules, rules]
|
||||||
- !reference [.upstream-branch-rules, rules]
|
- !reference [.upstream-branch-rules, rules]
|
||||||
- changes:
|
- changes:
|
||||||
*modules_changes
|
*modules_changes
|
||||||
|
@ -484,7 +494,7 @@ build debian x86_64:
|
||||||
- $env:PYTHONUNBUFFERED = '1'
|
- $env:PYTHONUNBUFFERED = '1'
|
||||||
- ci/scripts/handle-subprojects-cache.py --cache-dir /subprojects subprojects/
|
- ci/scripts/handle-subprojects-cache.py --cache-dir /subprojects subprojects/
|
||||||
- $env:PYTHONUNBUFFERED = ''
|
- $env:PYTHONUNBUFFERED = ''
|
||||||
- echo $env:MESON_ARGS
|
- echo $env:MESON_ARGS $env:GTK_ARGS
|
||||||
# We do not pick up any deps with cmake, so speed up dependency checks
|
# We do not pick up any deps with cmake, so speed up dependency checks
|
||||||
- $env:CMAKE = 'false'
|
- $env:CMAKE = 'false'
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -497,7 +507,7 @@ build vs2022 amd64:
|
||||||
extends: '.build windows'
|
extends: '.build windows'
|
||||||
script:
|
script:
|
||||||
- !reference [".build windows", "script"]
|
- !reference [".build windows", "script"]
|
||||||
- meson setup --vsenv build $env:MESON_ARGS
|
- meson setup --vsenv build $env:MESON_ARGS $env:GTK_ARGS
|
||||||
- meson compile -C build --jobs $env:FDO_CI_CONCURRENT
|
- meson compile -C build --jobs $env:FDO_CI_CONCURRENT
|
||||||
- .\gst-env.py gst-inspect-1.0.exe --version
|
- .\gst-env.py gst-inspect-1.0.exe --version
|
||||||
- .\gst-env.py gst-inspect-1.0.exe
|
- .\gst-env.py gst-inspect-1.0.exe
|
||||||
|
@ -512,7 +522,6 @@ build vs2022 amd64 full-static:
|
||||||
extends: ".build windows"
|
extends: ".build windows"
|
||||||
script:
|
script:
|
||||||
- !reference [".build windows", "script"]
|
- !reference [".build windows", "script"]
|
||||||
- echo $env:MESON_ARGS
|
|
||||||
- cmd.exe /C "meson setup --vsenv build --default-library=static $env:MESON_ARGS"
|
- cmd.exe /C "meson setup --vsenv build --default-library=static $env:MESON_ARGS"
|
||||||
- meson compile -C build --jobs $env:FDO_CI_CONCURRENT
|
- meson compile -C build --jobs $env:FDO_CI_CONCURRENT
|
||||||
- .\gst-env.py gst-inspect-1.0.exe --version
|
- .\gst-env.py gst-inspect-1.0.exe --version
|
||||||
|
@ -532,7 +541,7 @@ build vs2022 amd64 full-static:
|
||||||
# Setting up a cross build with MSVC is still non-trivial because
|
# Setting up a cross build with MSVC is still non-trivial because
|
||||||
# the --vsenv argument cannot be used to set it up
|
# the --vsenv argument cannot be used to set it up
|
||||||
- echo $env:MESON_CROSS_ARGS
|
- echo $env:MESON_CROSS_ARGS
|
||||||
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH && meson setup build $env:MESON_ARGS $env:MESON_CROSS_ARGS"
|
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH && meson setup build $env:MESON_ARGS $env:GTK_ARGS $env:MESON_CROSS_ARGS"
|
||||||
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH && meson compile -C build --jobs $env:FDO_CI_CONCURRENT"
|
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH && meson compile -C build --jobs $env:FDO_CI_CONCURRENT"
|
||||||
|
|
||||||
build vs2022 x86:
|
build vs2022 x86:
|
||||||
|
@ -576,7 +585,7 @@ build msys2:
|
||||||
- $env:MESON_ARGS = $env:MESON_ARGS.replace('-Dgst-plugins-bad:d3d11-wgc=enabled','') + ' -Dpython=disabled -Dintrospection=disabled'
|
- $env:MESON_ARGS = $env:MESON_ARGS.replace('-Dgst-plugins-bad:d3d11-wgc=enabled','') + ' -Dpython=disabled -Dintrospection=disabled'
|
||||||
# Configure MSYS2 to use the UCRT64 environment, start in the same directory
|
# Configure MSYS2 to use the UCRT64 environment, start in the same directory
|
||||||
# and inherit PATH
|
# and inherit PATH
|
||||||
- C:\msys64\msys2_shell.cmd -ucrt64 -defterm -no-start -here -use-full-path -lc "meson setup build $env:MESON_ARGS && meson compile -C build --jobs $env:FDO_CI_CONCURRENT"
|
- C:\msys64\msys2_shell.cmd -ucrt64 -defterm -no-start -here -use-full-path -lc "meson setup build $env:MESON_ARGS $env:GTK_ARGS && meson compile -C build --jobs $env:FDO_CI_CONCURRENT"
|
||||||
|
|
||||||
build macos:
|
build macos:
|
||||||
extends:
|
extends:
|
||||||
|
@ -588,6 +597,7 @@ build macos:
|
||||||
MESON_ARGS: "${DEFAULT_MESON_ARGS}"
|
MESON_ARGS: "${DEFAULT_MESON_ARGS}"
|
||||||
SUBPROJECTS_CACHE_DIR: "/Users/gst-ci/subprojects"
|
SUBPROJECTS_CACHE_DIR: "/Users/gst-ci/subprojects"
|
||||||
rules:
|
rules:
|
||||||
|
- !reference [.gtk-build-rules, rules]
|
||||||
- !reference [.upstream-branch-rules, rules]
|
- !reference [.upstream-branch-rules, rules]
|
||||||
- changes:
|
- changes:
|
||||||
*modules_changes
|
*modules_changes
|
||||||
|
@ -609,7 +619,6 @@ build macos:
|
||||||
-Dgst-plugins-base:pango=enabled
|
-Dgst-plugins-base:pango=enabled
|
||||||
-Dgst-plugins-good:cairo=enabled
|
-Dgst-plugins-good:cairo=enabled
|
||||||
-Dgst-plugins-good:soup=enabled
|
-Dgst-plugins-good:soup=enabled
|
||||||
-Dgtk=enabled
|
|
||||||
|
|
||||||
# ---- Tests ----- #
|
# ---- Tests ----- #
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,9 @@ export RUSTUP_HOME="/usr/local/rustup"
|
||||||
export CARGO_HOME="/usr/local/cargo"
|
export CARGO_HOME="/usr/local/cargo"
|
||||||
export PATH="/usr/local/cargo/bin:$PATH"
|
export PATH="/usr/local/cargo/bin:$PATH"
|
||||||
|
|
||||||
|
# Allow unbound variable
|
||||||
|
GTK_ARGS="${GTK_ARGS:-}"
|
||||||
|
|
||||||
# nproc works on linux
|
# nproc works on linux
|
||||||
# sysctl for macos
|
# sysctl for macos
|
||||||
_jobs=$(nproc || sysctl -n hw.ncpu)
|
_jobs=$(nproc || sysctl -n hw.ncpu)
|
||||||
|
@ -30,7 +33,7 @@ jobs="${FDO_CI_CONCURRENT:-$_jobs}"
|
||||||
date -R
|
date -R
|
||||||
ci/scripts/handle-subprojects-cache.py --cache-dir "${SUBPROJECTS_CACHE_DIR}" subprojects/
|
ci/scripts/handle-subprojects-cache.py --cache-dir "${SUBPROJECTS_CACHE_DIR}" subprojects/
|
||||||
|
|
||||||
ARGS="${BUILD_TYPE:---default-library=both} ${BUILD_GST_DEBUG:--Dgstreamer:gst_debug=true} ${MESON_ARGS}"
|
ARGS="${BUILD_TYPE:---default-library=both} ${BUILD_GST_DEBUG:--Dgstreamer:gst_debug=true} ${MESON_ARGS} ${GTK_ARGS}"
|
||||||
echo "Werror: $GST_WERROR"
|
echo "Werror: $GST_WERROR"
|
||||||
|
|
||||||
if [ "$GST_WERROR" = "true" ]; then
|
if [ "$GST_WERROR" = "true" ]; then
|
||||||
|
|
Loading…
Reference in a new issue