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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2302>
This commit is contained in:
Jordan Petridis 2022-04-26 20:00:16 +03:00 committed by Jordan Petridіs
parent 47ff41bcd2
commit 1d627e29cd
2 changed files with 7 additions and 24 deletions

View file

@ -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"

View file

@ -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 " +