mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 22:25:40 +00:00
41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
|
# 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:
|
||
|
# Install Rust in Linux, Macos
|
||
|
- displayName: "Install Rust (Linux, macOS)"
|
||
|
script: |
|
||
|
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
|
||
|
condition: not(eq(variables['Agent.OS'], 'Windows_NT'))
|
||
|
|
||
|
- displayName: "Install Rust (Windows)"
|
||
|
script: |
|
||
|
set -ex
|
||
|
if [ -x "`command -v rustup`" ]; then
|
||
|
echo `command -v rustup` `rustup -V` installed
|
||
|
else
|
||
|
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"
|
||
|
fi
|
||
|
condition: eq(variables['Agent.OS'], 'Windows_NT')
|
||
|
|
||
|
- displayName: Install Rust
|
||
|
bash: |
|
||
|
set -ex
|
||
|
rustup update $RUST_TOOLCHAIN
|
||
|
rustup default $RUST_TOOLCHAIN
|
||
|
|
||
|
rustc -Vv
|
||
|
cargo -V
|