diff --git a/images/macos/scripts/build/install-rust.sh b/images/macos/scripts/build/install-rust.sh index eb9f9f18d08e..31f0744d9c70 100644 --- a/images/macos/scripts/build/install-rust.sh +++ b/images/macos/scripts/build/install-rust.sh @@ -15,6 +15,15 @@ rustup-init -y --no-modify-path --default-toolchain=stable --profile=minimal echo "Initialize environment variables..." CARGO_HOME=$HOME/.cargo +echo "Disable rustup self-updating" +# This is undesirable because: +# - We will keep rustup updated (just like any other dependency). +# - rustup does not need to be the latest and greatest. +# - Self-updating in CI will introduce longer build times for no benefit. +# - ... which becomes important because self-updating happens in various +# places, including `rustup toolchain install`. +rustup set auto-self-update disable + echo "Install common tools..." rustup component add rustfmt clippy diff --git a/images/ubuntu/scripts/build/install-rust.sh b/images/ubuntu/scripts/build/install-rust.sh index f27a071ad595..29cb6b5ac299 100644 --- a/images/ubuntu/scripts/build/install-rust.sh +++ b/images/ubuntu/scripts/build/install-rust.sh @@ -16,6 +16,16 @@ curl -fsSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=stable --profi # Initialize environment variables source $CARGO_HOME/env +# Disable rustup self-updating +# +# This is undesirable because: +# - We will keep rustup updated (just like any other dependency). +# - Rustup does not need to be the latest and greatest. +# - Self-updating in CI will introduce longer build times for no benefit. +# - ... which becomes important because self-updating happens in various +# places, including `rustup toolchain install`. +rustup set auto-self-update disable + # Install common tools rustup component add rustfmt clippy diff --git a/images/windows/scripts/build/Install-Rust.ps1 b/images/windows/scripts/build/Install-Rust.ps1 index 89b8a0271e57..a2efabb7ef3a 100644 --- a/images/windows/scripts/build/Install-Rust.ps1 +++ b/images/windows/scripts/build/Install-Rust.ps1 @@ -28,6 +28,16 @@ Add-DefaultPathItem "%USERPROFILE%\.cargo\bin" # Add Rust binaries to the path $env:Path += ";$env:CARGO_HOME\bin" +# Disable rustup self-updating +# +# This is undesirable because: +# - We will keep rustup updated (just like any other dependency). +# - rustup does not need to be the latest and greatest. +# - Self-updating in CI will introduce longer build times for no benefit. +# - ... which becomes important because self-updating happens in various +# places, including `rustup toolchain install`. +rustup set auto-self-update disable + # Add i686 target for building 32-bit binaries rustup target add i686-pc-windows-msvc