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