From 8ca969292453ca7ef43418429acc67d718bcecae Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Thu, 25 Aug 2022 21:28:45 +0300 Subject: [PATCH] windows: Install dav1d in the docker image Also to be used in the gst-plugins-rs CI Part-of: --- ci/images_template.yml | 2 +- ci/windows-docker/Dockerfile | 7 ++++--- ci/windows-docker/install_dav1d.ps1 | 28 ++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 ci/windows-docker/install_dav1d.ps1 diff --git a/ci/images_template.yml b/ci/images_template.yml index 0a03f499b..5974d8800 100644 --- a/ci/images_template.yml +++ b/ci/images_template.yml @@ -1,4 +1,4 @@ variables: - GST_RS_IMG_TAG: '2022-08-23.2' + GST_RS_IMG_TAG: '2022-08-31.1' GST_RS_STABLE: '1.63.0' GST_RS_MSRV: '1.60.0' diff --git a/ci/windows-docker/Dockerfile b/ci/windows-docker/Dockerfile index 89222ed5a..3c5b6d649 100644 --- a/ci/windows-docker/Dockerfile +++ b/ci/windows-docker/Dockerfile @@ -9,15 +9,16 @@ SHELL ["powershell","-NoLogo", "-NonInteractive", "-Command"] ARG DEFAULT_BRANCH="main" ARG RUST_VERSION="invalid" -RUN choco install -y pkgconfiglite +RUN choco install -y pkgconfiglite nasm llvm # https://stackoverflow.com/a/50716450 -RUN setx PATH '%PATH%;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" -COPY install_gst.ps1 install_gtk.ps1 C:\ +COPY install_gst.ps1 install_gtk.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 RUN C:\rustup-init.exe -y --profile minimal --default-toolchain $env:RUST_VERSION diff --git a/ci/windows-docker/install_dav1d.ps1 b/ci/windows-docker/install_dav1d.ps1 new file mode 100644 index 000000000..ebf47b641 --- /dev/null +++ b/ci/windows-docker/install_dav1d.ps1 @@ -0,0 +1,28 @@ +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; + +# Download gstreamer and all its subprojects +git clone -b 1.0.0 --depth 1 https://code.videolan.org/videolan/dav1d.git C:\dav1d +if (!$?) { + Write-Host "Failed to clone dav1d" + Exit 1 +} + +Set-Location C:\dav1d + +# This is fine, we are not going to use the GtkMedia* apis +$env:MESON_ARGS = "--prefix=C:\gst-install\" + +Write-Output "Building dav1d" +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 dav1d" + Exit 1 +} + +cd C:\ +cmd /c rmdir /s /q C:\dav1d +if (!$?) { + Write-Host "Failed to remove dav1d checkout" + Exit 1 +}