iced/build/ci-install-rust.sh

32 lines
791 B
Bash
Raw Normal View History

2020-11-28 00:32:59 +00:00
#!/bin/bash
set -e
if [ ! "$GITHUB_ACTIONS" ]; then
echo "This file should only be executed from GitHub Actions"
exit 1
fi
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
if [[ "$OSTYPE" = "darwin"* ]]; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
rustup install stable
rustup component add rustfmt
rustup component add clippy
fi
2021-12-30 14:51:13 +00:00
# Force 1.57.0 until the clippy perf bug has been added to stable
# https://github.com/rust-lang/rust-clippy/pull/8182
rustup install 1.57.0
rustup default 1.57.0
2021-12-17 18:40:52 +00:00
rustup component add rustfmt
rustup component add clippy
2020-11-28 00:32:59 +00:00
# It fails on Windows so disable auto self update
2021-08-23 22:07:06 +00:00
rustup toolchain install 1.48.0 --no-self-update
2020-11-28 00:32:59 +00:00
rustup target add wasm32-unknown-unknown
rustup update --no-self-update
rustc --version
cargo --version