actions-base-image/install-rust.sh

26 lines
718 B
Bash
Raw Normal View History

2024-02-08 19:09:59 +00:00
#!/usr/bin/env bash
set -xe
TOOLCHAIN=${1:-'stable'}
mkdir -p /opt
curl --proto '=https' --tlsv1.2 -sSfL 'https://sh.rustup.rs' -o /opt/rustup.sh
chmod +x /opt/rustup.sh
/opt/rustup.sh --profile minimal --default-toolchain $TOOLCHAIN -y
rm /opt/rustup.sh
2024-02-08 20:17:02 +00:00
curl --proto '=https' --tlsv1.2 -sSfL 'https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh' -o /opt/cargo-binstall.sh
chmod +x /opt/cargo-binstall.sh
/opt/cargo-binstall.sh
rm /opt/cargo-binstall.sh
2024-02-08 19:09:59 +00:00
rustup component add clippy
rustup target add x86_64-unknown-linux-musl
rustup target add armv7-unknown-linux-musleabihf
rustup target add aarch64-unknown-linux-musl
2024-02-08 20:17:21 +00:00
yes | cargo binstall cargo-zigbuild