]> git.lizzy.rs Git - rust.git/blob - .travis.yml
move constants to machine.rs
[rust.git] / .travis.yml
1 language: generic
2 cache:
3   # Cache the global cargo directory, but NOT the local `target` directory which
4   # we cannot reuse anyway when the nightly changes (and it grows quite large
5   # over time).
6   directories:
7     - $HOME/.cargo
8     - $HOME/.rustup
9
10 os:
11 - linux
12 - osx
13 dist: xenial
14
15 # Run in PRs and for bors, but not on master.
16 if: branch = auto OR branch = try OR type = pull_request OR type = cron
17
18 env:
19   global:
20   - RUST_TEST_NOCAPTURE=1
21   - RUST_BACKTRACE=1
22
23 before_script:
24 # Linux: install extra stuff for cross-compilation
25 - if [[ "$TRAVIS_OS_NAME" == linux ]]; then sudo apt update && sudo apt install gcc-multilib; fi
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 ("stable" toolchain for better caching, it is just used to build rustup-toolchain-install-master)
34 - curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain stable
35 - export PATH=$HOME/.cargo/bin:$PATH
36 # Install "master" toolchain
37 - cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed"
38 - travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c cargo -c rust-src
39 - rustup default master
40 - rustc --version
41
42 script:
43 - ./travis.sh
44
45 before_cache:
46 # Don't cache "master" toolchain, it's a waste
47 - rustup default stable
48 - rustup toolchain uninstall master
49
50 notifications:
51   email:
52     on_success: never
53     recipients:
54       - post+travis@ralfj.de
55       - travis-miri@oli-obk.de
56 branches:
57   only:
58   - master
59   - auto
60   - try