From c0f9551fc4346f1ba0d13b025519bf9d76206108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 19 Jul 2023 10:54:06 +0300 Subject: [PATCH] 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 Part-of: --- .gitlab-ci.yml | 2 +- ci/install-gst.sh | 1 + ci/install-gtk4.sh | 21 --------------------- ci/windows-docker/Dockerfile | 3 +-- ci/windows-docker/install_gst.ps1 | 2 ++ ci/windows-docker/install_gtk.ps1 | 27 --------------------------- 6 files changed, 5 insertions(+), 51 deletions(-) delete mode 100644 ci/install-gtk4.sh delete mode 100644 ci/windows-docker/install_gtk.ps1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b53f82718..de8754a0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -151,7 +151,6 @@ trigger: libcsound64-dev llvm clang nasm libsodium-dev libwebp-dev FDO_DISTRIBUTION_EXEC: >- bash ci/install-gst.sh && - bash ci/install-gtk4.sh && bash ci/install-dav1d.sh && pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates && pip3 install --break-system-packages tomli @@ -505,6 +504,7 @@ pages: .windows rust docker build: stage: 'container-final' + timeout: '2h' needs: [] variables: # Unlike the buildah/linux jobs, this file diff --git a/ci/install-gst.sh b/ci/install-gst.sh index b4022f325..438e4aafc 100755 --- a/ci/install-gst.sh +++ b/ci/install-gst.sh @@ -22,6 +22,7 @@ PLUGINS="-D gst-plugins-base:ogg=enabled \ -D gst-plugins-bad:opus=enabled \ -D gst-plugins-ugly:x264=enabled" +echo "subproject('gtk')" >> meson.build meson setup build \ -D prefix=/usr/local \ -D gpl=enabled \ diff --git a/ci/install-gtk4.sh b/ci/install-gtk4.sh deleted file mode 100644 index a4377ec49..000000000 --- a/ci/install-gtk4.sh +++ /dev/null @@ -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/ diff --git a/ci/windows-docker/Dockerfile b/ci/windows-docker/Dockerfile index 1c44f0eaa..dde0b1e53 100644 --- a/ci/windows-docker/Dockerfile +++ b/ci/windows-docker/Dockerfile @@ -15,9 +15,8 @@ RUN choco install -y pkgconfiglite nasm llvm openssl RUN setx PATH '%PATH%;C:\Program Files\NASM;C:\gst-install\bin' 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_gtk.ps1 RUN C:\install_dav1d.ps1 RUN Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile C:\rustup-init.exe diff --git a/ci/windows-docker/install_gst.ps1 b/ci/windows-docker/install_gst.ps1 index 8787eedba..16119582b 100644 --- a/ci/windows-docker/install_gst.ps1 +++ b/ci/windows-docker/install_gst.ps1 @@ -37,6 +37,8 @@ $MESON_ARGS = @(` "-Dgst-plugins-good:lame=disabled" ) +$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8' +echo "subproject('gtk')" >> meson.build Write-Output "Building gstreamer" meson setup --vsenv $MESON_ARGS _build diff --git a/ci/windows-docker/install_gtk.ps1 b/ci/windows-docker/install_gtk.ps1 deleted file mode 100644 index 791d2d552..000000000 --- a/ci/windows-docker/install_gtk.ps1 +++ /dev/null @@ -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 -}