wasmer/.azure/install-rust.yml

44 lines
1.5 KiB
YAML
Raw Normal View History

2019-08-10 18:11:54 +00:00
# This template installs Rust (if doesn't exist in the systems)
# Also installs the desired Rust toolchain
# Template inspired by Tokio and wasm-bindgen templates
# Tokio template: https://github.com/tokio-rs/tokio/blob/master/ci/azure-install-rust.yml
# Wasm-bindgen template: https://github.com/rustwasm/wasm-bindgen/blob/master/ci/azure-install-rust.yml
steps:
2019-08-10 22:32:09 +00:00
- bash: |
2019-08-10 18:11:54 +00:00
set -ex
if [ -x "`command -v rustup`" ]; then
echo `command -v rustup` `rustup -V` installed
else
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUST_TOOLCHAIN
echo "##vso[task.prependpath]$HOME/.cargo/bin"
fi
2019-08-10 21:56:58 +00:00
displayName: "Install Rust (Linux, macOS)"
2019-08-10 18:11:54 +00:00
condition: not(eq(variables['Agent.OS'], 'Windows_NT'))
2019-08-10 22:32:09 +00:00
- bash: |
2019-08-10 18:11:54 +00:00
set -ex
if [ -x "`command -v rustup`" ]; then
echo `command -v rustup` `rustup -V` installed
else
2019-08-29 00:38:01 +00:00
choco install rust -y
# curl -sSf -o rustup-init.exe https://win.rustup.rs
# ./rustup-init.exe -y --default-toolchain $RUST_TOOLCHAIN
# echo "##vso[task.prependpath]$USERPROFILE/.cargo/bin"
2019-08-10 18:11:54 +00:00
fi
2019-08-10 21:56:58 +00:00
displayName: "Install Rust (Windows)"
2019-08-10 18:11:54 +00:00
condition: eq(variables['Agent.OS'], 'Windows_NT')
2019-08-10 21:56:58 +00:00
- bash: |
2019-08-10 18:11:54 +00:00
set -ex
rustup update $RUST_TOOLCHAIN
rustup default $RUST_TOOLCHAIN
rustc -Vv
cargo -V
2019-08-10 21:56:58 +00:00
displayName: Install Rust
- bash: echo "##vso[task.setvariable variable=RUSTC_VERSION;]`rustc --version`"
displayName: Set rustc version in env var