diff options
Diffstat (limited to 'third_party/rust/mio/ci/azure-install-rust.yml')
-rw-r--r-- | third_party/rust/mio/ci/azure-install-rust.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/third_party/rust/mio/ci/azure-install-rust.yml b/third_party/rust/mio/ci/azure-install-rust.yml new file mode 100644 index 0000000000..43d806e7f7 --- /dev/null +++ b/third_party/rust/mio/ci/azure-install-rust.yml @@ -0,0 +1,32 @@ +steps: + # Linux and macOS. + - script: | + set -e + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none + export PATH=$PATH:$HOME/.cargo/bin + rustup toolchain install $RUSTUP_TOOLCHAIN + rustup default $RUSTUP_TOOLCHAIN + echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" + env: + RUSTUP_TOOLCHAIN: ${{parameters.rust_version}} + displayName: "Install rust (*nix)" + condition: not(eq(variables['Agent.OS'], 'Windows_NT')) + + # Windows. + - script: | + curl -sSf -o rustup-init.exe https://win.rustup.rs + rustup-init.exe -y --default-toolchain none + set PATH=%PATH%;%USERPROFILE%\.cargo\bin + rustup toolchain install %RUSTUP_TOOLCHAIN% + rustup default %RUSTUP_TOOLCHAIN% + echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" + env: + RUSTUP_TOOLCHAIN: ${{parameters.rust_version}} + displayName: "Install rust (windows)" + condition: eq(variables['Agent.OS'], 'Windows_NT') + + # All platforms. + - script: | + rustc -Vv + cargo -V + displayName: Query rust and cargo versions |