From 1d627e29cd192ed5b544abcd62094a92a317fa00 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Tue, 26 Apr 2022 20:00:16 +0300 Subject: [PATCH] ci: fix the windows-rust image builds There was a rule gated on the project name which wasn't removed once we moved to the monorepo and this job was silently broken since. Part-of: --- .gitlab-ci.yml | 10 ++-------- ci/docker/windows/install_gst.ps1 | 21 +++++---------------- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 743f0e21c3..357d963fcb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -198,8 +198,6 @@ windows amd64 docker: needs: - job: 'windows amd64 docker' artifacts: false - rules: - - if: '$CI_PROJECT_NAME == "gst-ci"' variables: # Unlike the buildah/linux jobs, this file # needs to be relative to docker/windows/ subdir @@ -207,7 +205,7 @@ windows amd64 docker: # # We also don't need a CONTEXT_DIR var as its also # hardcoded to be docker/windows/ - DOCKERFILE: 'docker/windows/rust.Dockerfile' + DOCKERFILE: 'ci/docker/windows/rust.Dockerfile' tags: - 'windows' - 'shell' @@ -216,11 +214,7 @@ windows amd64 docker: # We need to pass an array and to resolve the env vars, so we can't use a variable: - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "BASE_IMAGE=$WINDOWS_IMAGE", "--build-arg", "RUST_VERSION=$RUST_VERSION") - - $env:WINDOWS_CONTAINER_SCRIPT_PATH = "$env:CI_PROJECT_DIR\container.ps1" - - echo "Fetching $env:WINDOWS_CONTAINER_SCRIPT_URL" - - Invoke-WebRequest -Uri $env:WINDOWS_CONTAINER_SCRIPT_URL -OutFile $env:WINDOWS_CONTAINER_SCRIPT_PATH - - - "& $env:WINDOWS_CONTAINER_SCRIPT_PATH $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE" + - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE" - | if (!($?)) { echo "Failed to build the image" diff --git a/ci/docker/windows/install_gst.ps1 b/ci/docker/windows/install_gst.ps1 index 7d961cddb6..b346c8700b 100644 --- a/ci/docker/windows/install_gst.ps1 +++ b/ci/docker/windows/install_gst.ps1 @@ -1,19 +1,16 @@ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; -# Download gst-build and all its subprojects -# git clone -b $env:DEFAULT_BRANCH https://gitlab.freedesktop.org/gstreamer/gst-build.git C:\gst-build -# FIXME: need 1.19+ for cairo subproject :/ -# Should use a stable branch instead -git clone -b master --depth 1 https://gitlab.freedesktop.org/gstreamer/gst-build.git C:\gst-build +# Download gstreamer and all its subprojects +git clone -b $env:DEFAULT_BRANCH --depth 1 https://gitlab.freedesktop.org/gstreamer/gstreamer.git C:\gstreamer if (!$?) { - Write-Host "Failed to clone gst-build" + Write-Host "Failed to clone gstreamer" Exit 1 } -Set-Location C:\gst-build +Set-Location C:\gstreamer # Copy the cache we already have in the image to avoid massive redownloads -Move-Item C:/subprojects/* C:\gst-build\subprojects +Move-Item C:/subprojects/* C:\gstreamer\subprojects if (!$?) { Write-Host "Failed to copy subprojects cache" @@ -29,14 +26,6 @@ if (!$?) { Exit 1 } -Write-Output "Running git update" -python git-update --no-interaction - -if (!$?) { - Write-Host "Failed to run git-update" - Exit 1 -} - $env:MESON_ARGS = "-Dglib:installed_tests=false " + "-Dlibnice:tests=disabled " + "-Dlibnice:examples=disabled " + -- 2.34.1