gstreamer-rs/ci/windows-docker/install_rust.ps1
Jordan Petridis 29572bb981 ci/windows-docker: Move rustup install into a ps1 script
We will need this in order to be able to add conditionals
depending on the rustc version, like we do on the linux
script.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1506>
2024-08-22 10:51:46 +01:00

17 lines
395 B
PowerShell

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
$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 $env:RUST_VERSION
if (!$?) {
Write-Host "Failed to install rust"
Exit 1
}