ci: Switch install_gst powershell script to error by default

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1298>
This commit is contained in:
Nirbheek Chauhan 2023-07-19 14:13:08 +05:30
parent d96d164c8d
commit 0d7555bed0

View file

@ -1,31 +1,19 @@
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
# Make sure powershell exits on errors
$ErrorActionPreference = "Stop"
# Download gstreamer and all its subprojects # Download gstreamer and all its subprojects
git clone -b $env:DEFAULT_BRANCH --depth 1 https://gitlab.freedesktop.org/gstreamer/gstreamer.git C:\gstreamer git clone -b $env:DEFAULT_BRANCH --depth 1 https://gitlab.freedesktop.org/gstreamer/gstreamer.git C:\gstreamer
if (!$?) {
Write-Host "Failed to clone gstreamer"
Exit 1
}
Set-Location C:\gstreamer Set-Location C:\gstreamer
# Copy the cache we already have in the image to avoid massive redownloads # Copy the cache we already have in the image to avoid massive redownloads
Move-Item C:/subprojects/* C:\gstreamer\subprojects Move-Item C:/subprojects/* C:\gstreamer\subprojects
if (!$?) {
Write-Host "Failed to copy subprojects cache"
Exit 1
}
# Update the subprojects cache # Update the subprojects cache
Write-Output "Running meson subproject reset" Write-Output "Running meson subproject reset"
meson subprojects update --reset meson subprojects update --reset
if (!$?) {
Write-Host "Failed to reset subprojects state"
Exit 1
}
$env:MESON_ARGS = "--prefix=C:\gst-install\ " + $env:MESON_ARGS = "--prefix=C:\gst-install\ " +
"-Dglib:installed_tests=false " + "-Dglib:installed_tests=false " +
"-Dlibnice:tests=disabled " + "-Dlibnice:tests=disabled " +
@ -50,14 +38,6 @@ $env:MESON_ARGS = "--prefix=C:\gst-install\ " +
Write-Output "Building gst" Write-Output "Building gst"
cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && meson setup _build $env:MESON_ARGS && meson compile -C _build && meson install -C _build" cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && meson setup _build $env:MESON_ARGS && meson compile -C _build && meson install -C _build"
if (!$?) {
Write-Host "Failed to build and install gst"
Exit 1
}
cd C:\ cd c:\
cmd /c rmdir /s /q C:\gstreamer Remove-Item -LiteralPath "C:\gstreamer" -Force -Recurse
if (!$?) {
Write-Host "Failed to remove gst checkout"
Exit 1
}