]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Auto merge of #1565 - RalfJung:rustup, r=RalfJung
[rust.git] / .travis.yml
1 language: generic
2 os:
3 - linux
4 - osx
5 dist: xenial
6 cache:
7   # Cache the global cargo directory, but NOT the local `target` directory which
8   # we cannot reuse anyway when the nightly changes (and it grows quite large
9   # over time).
10   directories:
11   - $HOME/.cargo
12   - $HOME/.rustup
13
14 # Run in PRs and for bors, but not on master.
15 branches:
16   only:
17   - master
18   - auto
19   - try
20 if: branch = auto OR branch = try OR type = pull_request OR type = cron
21
22 before_script:
23 # Compute the Rust version we use. We do not use "language: rust" to have more control here.
24 - |
25   if [[ "$TRAVIS_EVENT_TYPE" == cron ]]; then
26     RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
27   else
28     RUSTC_HASH=$(cat rust-version)
29   fi
30 # Install Rust. We use the "stable" toolchain for better caching, it is just used to build `rustup-toolchain-install-master`.
31 # But we also need to take into account that the build cache might have a different, outdated default.
32 - curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain none --profile minimal
33 - export PATH=$HOME/.cargo/bin:$PATH
34 - rustup default stable
35 - rustup toolchain uninstall beta nightly
36 - rustup update
37 # Install "master" toolchain.
38 - cargo install rustup-toolchain-install-master
39 - travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c rust-src -c rustc-dev -c llvm-tools
40 - rustup default master
41 - rustc --version
42 - cargo --version
43
44 script:
45 - ./ci.sh
46
47 before_cache:
48 # Don't cache "master" toolchain, it's a waste.
49 - rustup default stable
50 - rustup toolchain uninstall master
51
52 notifications:
53   email:
54     on_success: never
55     recipients:
56     - post+travis@ralfj.de
57     - travis-miri@oli-obk.de