ci: re-enable artifacts upload for the windows jobs
[platform/upstream/gstreamer.git] / ci / docker / windows / install_gst.ps1
1 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
2
3 # Download gstreamer and all its subprojects
4 git clone -b $env:DEFAULT_BRANCH --depth 1 https://gitlab.freedesktop.org/gstreamer/gstreamer.git C:\gstreamer
5 if (!$?) {
6   Write-Host "Failed to clone gstreamer"
7   Exit 1
8 }
9
10 Set-Location C:\gstreamer
11
12 # Copy the cache we already have in the image to avoid massive redownloads
13 Move-Item C:/subprojects/*  C:\gstreamer\subprojects
14
15 if (!$?) {
16   Write-Host "Failed to copy subprojects cache"
17   Exit 1
18 }
19
20 # Update the subprojects cache
21 Write-Output "Running meson subproject reset"
22 meson subprojects update --reset
23
24 if (!$?) {
25   Write-Host "Failed to reset subprojects state"
26   Exit 1
27 }
28
29 $env:MESON_ARGS = "-Dglib:installed_tests=false " +
30     "-Dlibnice:tests=disabled " +
31     "-Dlibnice:examples=disabled " +
32     "-Dffmpeg:tests=disabled " +
33     "-Dopenh264:tests=disabled " +
34     "-Dpygobject:tests=false " +
35     "-Dugly=enabled " +
36     "-Dbad=enabled " +
37     "-Dges=enabled " +
38     "-Drtsp_server=enabled " +
39     "-Ddevtools=enabled " +
40     "-Dsharp=disabled " +
41     "-Dpython=disabled " +
42     "-Dlibav=disabled " +
43     "-Dvaapi=disabled " +
44     "-Dgst-plugins-base:pango=enabled " +
45     "-Dgst-plugins-good:cairo=enabled " +
46     "-Dgpl=enabled "
47
48 Write-Output "Building gst"
49 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"
50
51 if (!$?) {
52   Write-Host "Failed to build and install gst"
53   Exit 1
54 }
55
56 git clean -fdxx
57
58 if (!$?) {
59   Write-Host "Failed to git clean"
60   Exit 1
61 }