Skip to content

Commit 1e33455

Browse files
committed
[DNM] Test: Cache latest version of RTIM
1 parent ce2a7b0 commit 1e33455

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ os:
77
- osx
88
- windows
99

10+
cache:
11+
directories:
12+
- $HOME/.cargo/bin/
13+
1014
branches:
1115
# Don't build these branches
1216
except:

setup-toolchain.sh

+7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@
33

44
cd "$(dirname "$0")"
55

6+
cratesio_version=$(cargo search rustup-toolchain-install-master | grep -o "[0-9]\.[0-9]\.[0-9]")
7+
rtim_version=$(rustup-toolchain-install-master --version | grep -o "[0-9]\.[0-9]\.[0-9]")
8+
69
if ! command -v rustup-toolchain-install-master > /dev/null; then
710
cargo install rustup-toolchain-install-master --debug
11+
else
12+
if [ $rtim_version != $cratesio_version ]; then
13+
cargo install rustup-toolchain-install-master --debug --force
14+
fi
815
fi
916

1017
RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')

0 commit comments

Comments
 (0)