Skip to content

Commit

Permalink
[DNM] Test: Cache latest version of RTIM
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Jul 14, 2019
1 parent ce2a7b0 commit c61e4e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ os:
- osx
- windows

cache:
directories:
- $HOME/.cargo/bin/rustup-toolchain-install-master

branches:
# Don't build these branches
except:
Expand Down
7 changes: 7 additions & 0 deletions setup-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@

cd "$(dirname "$0")"

cratesio_version=$(cargo search rustup-toolchain-install-master | grep -o "[0-9]\.[0-9]\.[0-9]")
rtim_version=$(rustup-toolchain-install-master --version | grep -o "[0-9]\.[0-9]\.[0-9]")

if ! command -v rustup-toolchain-install-master > /dev/null; then
cargo install rustup-toolchain-install-master --debug
else
if [ $rtim_version != $cratesio_version ]; then
cargo install rustup-toolchain-install-master --debug --force
fi
fi

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

0 comments on commit c61e4e1

Please sign in to comment.