mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 17:41:05 +00:00
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>
This commit is contained in:
parent
781b352d32
commit
29572bb981
3 changed files with 34 additions and 5 deletions
|
@ -13,10 +13,8 @@ RUN choco install -y pkgconfiglite nasm llvm openssl
|
|||
RUN setx PATH '%PATH%;C:\Program Files\NASM;C:\gst-install\bin'
|
||||
ENV PKG_CONFIG_PATH="C:\gst-install\lib\pkgconfig"
|
||||
|
||||
COPY install_gst.ps1 install_dav1d.ps1 C:\
|
||||
COPY install_gst.ps1 install_dav1d.ps1 install_rust.ps1 install_cargo_utils.ps1 C:\
|
||||
RUN C:\install_gst.ps1
|
||||
RUN C:\install_dav1d.ps1
|
||||
|
||||
RUN Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile C:\rustup-init.exe
|
||||
RUN C:\rustup-init.exe -y --profile minimal --default-toolchain $env:RUST_VERSION
|
||||
RUN cargo install --locked cargo-c --version 0.9.22+cargo-0.72
|
||||
RUN C:\install_rust.ps1
|
||||
RUN C:\install_cargo_utils.ps1
|
||||
|
|
14
ci/windows-docker/install_cargo_utils.ps1
Normal file
14
ci/windows-docker/install_cargo_utils.ps1
Normal file
|
@ -0,0 +1,14 @@
|
|||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
|
||||
|
||||
rustup --version
|
||||
rustc --version
|
||||
cargo --version
|
||||
|
||||
cargo install --locked cargo-c --version 0.9.26+cargo-0.72
|
||||
|
||||
if (!$?) {
|
||||
Write-Host "Failed to install cargo-c"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
cargo-cbuild --version
|
17
ci/windows-docker/install_rust.ps1
Normal file
17
ci/windows-docker/install_rust.ps1
Normal file
|
@ -0,0 +1,17 @@
|
|||
[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
|
||||
}
|
Loading…
Reference in a new issue