ci: Install GTK from the GStreamer monorepo

Force-build the gtk subproject when building gstreamer

This subproject is only pulled in when -Drs=enabled by gst-plugins-rs,
so we need to force-enable it here.

Co-authored-by: Nirbheek Chauhan <nirbheek@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1298>
This commit is contained in:
Sebastian Dröge 2023-07-19 10:54:06 +03:00 committed by Nirbheek Chauhan
parent 16e1f92489
commit c0f9551fc4
6 changed files with 5 additions and 51 deletions

View file

@ -151,7 +151,6 @@ trigger:
libcsound64-dev llvm clang nasm libsodium-dev libwebp-dev libcsound64-dev llvm clang nasm libsodium-dev libwebp-dev
FDO_DISTRIBUTION_EXEC: >- FDO_DISTRIBUTION_EXEC: >-
bash ci/install-gst.sh && bash ci/install-gst.sh &&
bash ci/install-gtk4.sh &&
bash ci/install-dav1d.sh && bash ci/install-dav1d.sh &&
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates && pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates &&
pip3 install --break-system-packages tomli pip3 install --break-system-packages tomli
@ -505,6 +504,7 @@ pages:
.windows rust docker build: .windows rust docker build:
stage: 'container-final' stage: 'container-final'
timeout: '2h'
needs: [] needs: []
variables: variables:
# Unlike the buildah/linux jobs, this file # Unlike the buildah/linux jobs, this file

View file

@ -22,6 +22,7 @@ PLUGINS="-D gst-plugins-base:ogg=enabled \
-D gst-plugins-bad:opus=enabled \ -D gst-plugins-bad:opus=enabled \
-D gst-plugins-ugly:x264=enabled" -D gst-plugins-ugly:x264=enabled"
echo "subproject('gtk')" >> meson.build
meson setup build \ meson setup build \
-D prefix=/usr/local \ -D prefix=/usr/local \
-D gpl=enabled \ -D gpl=enabled \

View file

@ -1,21 +0,0 @@
#! /bin/sh
set -eux
BRANCH=4.10.3
git clone https://gitlab.gnome.org/GNOME/gtk.git --branch $BRANCH --depth=1
cd gtk
meson setup build \
-D prefix=/usr/local \
-Ddemos=false \
-Dbuild-testsuite=false \
-Dbuild-examples=false \
-Dbuild-tests=false \
-Dwayland-protocols:tests=false
meson compile -C build
meson install -C build
ldconfig
cd ..
rm -rf gtk/

View file

@ -15,9 +15,8 @@ RUN choco install -y pkgconfiglite nasm llvm openssl
RUN setx PATH '%PATH%;C:\Program Files\NASM;C:\gst-install\bin' RUN setx PATH '%PATH%;C:\Program Files\NASM;C:\gst-install\bin'
ENV PKG_CONFIG_PATH="C:\gst-install\lib\pkgconfig" ENV PKG_CONFIG_PATH="C:\gst-install\lib\pkgconfig"
COPY install_gst.ps1 install_gtk.ps1 install_dav1d.ps1 C:\ COPY install_gst.ps1 install_dav1d.ps1 C:\
RUN C:\install_gst.ps1 RUN C:\install_gst.ps1
RUN C:\install_gtk.ps1
RUN C:\install_dav1d.ps1 RUN C:\install_dav1d.ps1
RUN Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile C:\rustup-init.exe RUN Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile C:\rustup-init.exe

View file

@ -37,6 +37,8 @@ $MESON_ARGS = @(`
"-Dgst-plugins-good:lame=disabled" "-Dgst-plugins-good:lame=disabled"
) )
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
echo "subproject('gtk')" >> meson.build
Write-Output "Building gstreamer" Write-Output "Building gstreamer"
meson setup --vsenv $MESON_ARGS _build meson setup --vsenv $MESON_ARGS _build

View file

@ -1,27 +0,0 @@
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
$env:MESON_ARGS = "--prefix=C:\gst-install\"
# Download gtk and all its subprojects
git clone -b 4.10.3 --depth 1 https://gitlab.gnome.org/gnome/gtk.git C:\gtk
if (!$?) {
Write-Host "Failed to clone gtk"
Exit 1
}
Set-Location C:\gtk
Write-Output "Building gtk"
cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && meson _build $env:MESON_ARGS && meson compile -C _build && ninja -C _build install"
if (!$?) {
Write-Host "Failed to build and install gtk"
Exit 1
}
cd C:\
cmd /c rmdir /s /q C:\gtk
if (!$?) {
Write-Host "Failed to remove gtk checkout"
Exit 1
}