Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 9bbab43

Browse files
authored
Merge pull request #181 from alexcrichton/fix-ci
Attempt to fix CI
2 parents 98ae0df + d146802 commit 9bbab43

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

ci/azure-install-rust.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ steps:
55
if [ "$toolchain" = "" ]; then
66
toolchain=stable
77
fi
8-
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
9-
echo "##vso[task.prependpath]$HOME/.cargo/bin"
8+
if command -v rustup; then
9+
rustup update $toolchain
10+
rustup default $toolchain
11+
else
12+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
13+
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
14+
fi
1015
displayName: Install rust (unix)
1116
condition: ne( variables['Agent.OS'], 'Windows_NT' )
1217
13-
- script: |
14-
curl -sSf -o rustup-init.exe https://win.rustup.rs
15-
rustup-init.exe -y --default-toolchain stable-%TARGET%
16-
echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
18+
- bash: rustup update stable-$TOOLCHAIN && rustup default stable-$TOOLCHAIN
1719
displayName: Install rust (windows)
1820
condition: eq( variables['Agent.OS'], 'Windows_NT' )
1921

ci/run-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ run() {
1818
--user $(id -u):$(id -g) \
1919
-e CARGO_HOME=/cargo \
2020
-e CARGO_TARGET_DIR=/target \
21-
-v $HOME/.cargo:/cargo \
21+
-v $(dirname $(dirname `which cargo`)):/cargo \
2222
-v `pwd`/target:/target \
2323
-v `pwd`:/checkout:ro \
2424
-v `rustc --print sysroot`:/rust:ro \

0 commit comments

Comments
 (0)