Skip to content

Cache cargo binaries #4659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -13,6 +13,13 @@ branches:
- trying.tmp
- staging.tmp

cache:
directories:
- $HOME/.cargo
before_cache:
- cargo install -Z install-upgrade cargo-cache --debug
- cargo cache --autoclean

env:
global:
- RUST_BACKTRACE=1
@@ -23,8 +30,10 @@ before_install:
- export PATH="$HOME/.cargo/bin:$PATH"
install:
- |
if [ -z ${INTEGRATION} ]; then
rustup component add rustfmt || cargo install --git https://github.com/rust-lang/rustfmt/ --force
if [[ -z ${INTEGRATION} ]]; then
if ! rustup component add rustfmt; then
cargo install -Z install-upgrade --git https://github.com/rust-lang/rustfmt --bin rustfmt
fi
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
. $HOME/.nvm/nvm.sh
nvm install stable
8 changes: 7 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -13,12 +13,18 @@ branches:
- auto
- try

cache:
- '%USERPROFILE%\.cargo'
on_finish:
- cargo install -Z install-upgrade cargo-cache --debug
- cargo cache --autoclean

install:
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
- rustup-init.exe -y --default-host %TARGET% --default-toolchain nightly --profile=minimal
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- del rust-toolchain
- cargo install rustup-toolchain-install-master --debug || echo "rustup-toolchain-install-master already installed"
- cargo install -Z install-upgrade rustup-toolchain-install-master --debug || echo "rustup-toolchain-install-master already installed"
- rustup-toolchain-install-master -f -n master
- rustup component add rustfmt --toolchain nightly & exit 0 # Format test handles missing rustfmt
- rustup default master
1 change: 1 addition & 0 deletions setup-toolchain.sh
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ cd "$(dirname "$0")" || exit

if ! command -v rustup-toolchain-install-master > /dev/null; then
cargo install \
-Z install-upgrade \
rustup-toolchain-install-master \
--bin rustup-toolchain-install-master \
--debug