summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorJordan Petridis <jordan@centricular.com>2023-04-03 16:23:02 +0300
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2023-04-03 18:48:55 +0000
commit4e8d0b766cd724897c1d2b0fd0dcb3c56ea3f87a (patch)
tree6e0d55b8d1fb7dc9c401040d790a27ebd2c2acc3 /ci
parent0e20febad129df72699420af17e727fcc1d1eac6 (diff)
downloadgstreamer-4e8d0b766cd724897c1d2b0fd0dcb3c56ea3f87a.tar.gz
ci: Add rust in the windows base image
This is preperation for gstreamer/gstreamer!3889 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4327>
Diffstat (limited to 'ci')
-rw-r--r--ci/docker/windows/Dockerfile3
-rw-r--r--ci/docker/windows/install_rust.ps118
2 files changed, 21 insertions, 0 deletions
diff --git a/ci/docker/windows/Dockerfile b/ci/docker/windows/Dockerfile
index 02253f36c9..e76ff596cc 100644
--- a/ci/docker/windows/Dockerfile
+++ b/ci/docker/windows/Dockerfile
@@ -58,6 +58,9 @@ RUN 'git config --global user.email "cirunner@gstreamer.freedesktop.org"; git co
COPY install_mingw.ps1 C:\
RUN C:\install_mingw.ps1
+COPY install_rust.ps1 C:\
+RUN C:\install_rust.ps1
+
ARG DEFAULT_BRANCH="main"
COPY prepare_gst_env.ps1 C:\
diff --git a/ci/docker/windows/install_rust.ps1 b/ci/docker/windows/install_rust.ps1
new file mode 100644
index 0000000000..603a9cbe0f
--- /dev/null
+++ b/ci/docker/windows/install_rust.ps1
@@ -0,0 +1,18 @@
+[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
+
+$rust_version = '1.68.2'
+$rustup_url = 'https://win.rustup.rs/x86_64'
+
+Invoke-WebRequest -Uri $rustup_url -OutFile C:\rustup-init.exe
+
+if (!$?) {
+ Write-Host "Failed to download rustup"
+ Exit 1
+}
+
+C:\rustup-init.exe -y --profile minimal --default-toolchain $rust_version
+
+if (!$?) {
+ Write-Host "Failed to install rust"
+ Exit 1
+}