2023-10-24 03:46:36 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# Install Rust
|
2024-08-10 19:13:33 +00:00
|
|
|
RUSTUP_VERSION=1.27.1
|
2024-10-17 17:10:35 +00:00
|
|
|
RUST_VERSION=1.82.0
|
2023-10-24 03:46:36 +00:00
|
|
|
RUST_ARCH="x86_64-unknown-linux-gnu"
|
|
|
|
|
|
|
|
RUSTUP_URL=https://static.rust-lang.org/rustup/archive/$RUSTUP_VERSION/$RUST_ARCH/rustup-init
|
|
|
|
curl -o rustup-init $RUSTUP_URL
|
|
|
|
|
|
|
|
export RUSTUP_HOME="/usr/local/rustup"
|
|
|
|
export CARGO_HOME="/usr/local/cargo"
|
|
|
|
export PATH="/usr/local/cargo/bin:$PATH"
|
|
|
|
|
|
|
|
chmod +x rustup-init;
|
|
|
|
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION;
|
|
|
|
rm rustup-init;
|
|
|
|
chmod -R a+w $RUSTUP_HOME $CARGO_HOME
|
|
|
|
|
2024-10-18 10:10:43 +00:00
|
|
|
cargo install --locked cargo-c --version 0.10.5+cargo-0.83.0
|
2023-10-24 03:46:36 +00:00
|
|
|
|
|
|
|
rustup --version
|
|
|
|
cargo --version
|
|
|
|
rustc --version
|
2024-09-30 20:16:36 +00:00
|
|
|
cargo cinstall --version
|
2024-07-29 12:40:24 +00:00
|
|
|
|
|
|
|
# Cleanup the registry after install
|
|
|
|
# so we don't have to save 200mb of the index in the ci image
|
|
|
|
rm -rf "$CARGO_HOME/registry"
|