Merge pull request #181 from alexcrichton/fix-ci

Attempt to fix CI
This commit is contained in:
Alex Crichton 2019-06-05 14:24:57 -05:00 committed by GitHub
commit 9bbab437dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View File

@ -5,15 +5,17 @@ steps:
if [ "$toolchain" = "" ]; then
toolchain=stable
fi
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
echo "##vso[task.prependpath]$HOME/.cargo/bin"
if command -v rustup; then
rustup update $toolchain
rustup default $toolchain
else
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
fi
displayName: Install rust (unix)
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: |
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -y --default-toolchain stable-%TARGET%
echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
- bash: rustup update stable-$TOOLCHAIN && rustup default stable-$TOOLCHAIN
displayName: Install rust (windows)
condition: eq( variables['Agent.OS'], 'Windows_NT' )

View File

@ -18,7 +18,7 @@ run() {
--user $(id -u):$(id -g) \
-e CARGO_HOME=/cargo \
-e CARGO_TARGET_DIR=/target \
-v $HOME/.cargo:/cargo \
-v $(dirname $(dirname `which cargo`)):/cargo \
-v `pwd`/target:/target \
-v `pwd`:/checkout:ro \
-v `rustc --print sysroot`:/rust:ro \