ci: Install gtk on the windows image

So we can use it in gst-plugins-rs CI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1084>
This commit is contained in:
Jordan Petridis 2022-08-17 17:31:28 +03:00
parent f7248408cb
commit 9a9b7bc5ce
2 changed files with 33 additions and 2 deletions

View file

@ -9,10 +9,12 @@ SHELL ["powershell","-NoLogo", "-NonInteractive", "-Command"]
ARG DEFAULT_BRANCH="main" ARG DEFAULT_BRANCH="main"
ARG RUST_VERSION="invalid" ARG RUST_VERSION="invalid"
COPY install_gst.ps1 C:\
RUN C:\install_gst.ps1
RUN choco install -y pkgconfiglite RUN choco install -y pkgconfiglite
ENV PKG_CONFIG_PATH="C:/lib/pkgconfig" ENV PKG_CONFIG_PATH="C:/lib/pkgconfig"
COPY install_gst.ps1 install_gtk.ps1 C:\
RUN C:\install_gst.ps1
RUN C:\install_gtk.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
RUN C:\rustup-init.exe -y --profile minimal --default-toolchain $env:RUST_VERSION RUN C:\rustup-init.exe -y --profile minimal --default-toolchain $env:RUST_VERSION

View file

@ -0,0 +1,29 @@
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
$env:Path += ";C:\gst-install\bin\"
# Download gstreamer and all its subprojects
git clone -b gtk-4-6 --depth 1 https://gitlab.gnome.org/gnome/gtk.git C:\gtk
if (!$?) {
Write-Host "Failed to clone gtk"
Exit 1
}
Set-Location C:\gtk
$env:MESON_ARGS = ""
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
}