# see https://nbsoftsolutions.com/blog/azure-pipelines-for-rust-projects steps: - bash: | TOOLCHAIN="${TOOLCHAIN:-$RUSTUP_TOOLCHAIN}" TOOLCHAIN="${TOOLCHAIN:-stable}" echo "##vso[task.setvariable variable=TOOLCHAIN;]$TOOLCHAIN" displayName: Set rust toolchain - script: | git clone https://github.com/microsoft/vcpkg .\vcpkg\bootstrap-vcpkg.bat .\vcpkg\vcpkg integrate install displayName: Windows install vcpkg condition: eq( variables['Agent.OS'], 'Windows_NT' ) - script: | .\vcpkg\vcpkg install openssl-windows:x64-windows displayName: Windows install openssl condition: eq( variables['Agent.OS'], 'Windows_NT' ) - script: | curl -sSf -o rustup-init.exe https://win.rustup.rs rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN% echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" displayName: Windows install rust condition: eq( variables['Agent.OS'], 'Windows_NT' ) - script: | curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" displayName: Install rust condition: ne( variables['Agent.OS'], 'Windows_NT' )