From 6ce4a12f0bf57e696c7498d0bfe60bfbc8ec4905 Mon Sep 17 00:00:00 2001
From: Jordan Petridis <jordan@centricular.com>
Date: Mon, 3 Apr 2023 18:36:37 +0300
Subject: [PATCH] ci: Export cargo/rust paths into the build env

Also disable rust for all default builds unless explicitly enabled

(So it won't be automatically enabled now that rustc is in the env)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4327>
---
 .gitlab-ci.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9b873fcf82..e9f40c4b88 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -55,6 +55,7 @@ variables:
     -Drtsp_server=enabled
     -Dvaapi=enabled
     -Dsharp=disabled
+    -Drs=disabled
     -Dgpl=enabled
 
   MESON_GST_WERROR: >
@@ -245,6 +246,9 @@ commitlint:
 # build setup templates
 #
 .build_template: &build
+  - export RUSTUP_HOME="/usr/local/rustup"
+  - export CARGO_HOME="/usr/local/cargo"
+  - export PATH="/usr/local/cargo/bin:$PATH"
   - date -R
   - ci/scripts/handle-subprojects-cache.py subprojects/
   - date -R
@@ -293,7 +297,6 @@ commitlint:
   -Domx=enabled
   -Dgst-omx:target=generic
   -Ddoc=disabled
-  -Drs=disabled
   ${MESON_BUILDTYPE_ARGS}
   ${MESON_GST_WERROR}