]> git.lizzy.rs Git - rust.git/blobdiff - .travis.yml
Fix prctl SET_NAME and GET_NAME behaviour.
[rust.git] / .travis.yml
index 137e612598819cac4a00347c25a1f1265ee43259..a074d6b14d8da72a8b24d69a924b3daab7210ebb 100644 (file)
@@ -4,76 +4,60 @@ cache:
   # we cannot reuse anyway when the nightly changes (and it grows quite large
   # over time).
   directories:
-    - /home/travis/.cargo
+    - $HOME/.cargo
+    - $HOME/.rustup
 
 os:
 - linux
 - osx
+dist: xenial
+
+# Run in PRs and for bors, but not on master.
+if: branch = auto OR branch = try OR type = pull_request OR type = cron
+
+env:
+  global:
+  - RUST_TEST_NOCAPTURE=1
+  - RUST_BACKTRACE=1
+  - CARGO_INCREMENTAL=0
 
 before_script:
-# mac os weirdness (https://github.com/travis-ci/travis-ci/issues/6307)
-- rvm get stable
 # Compute the rust version we use. We do not use "language: rust" to have more control here.
 - |
-  if [ "$TRAVIS_EVENT_TYPE" = cron ]; then
-    RUST_TOOLCHAIN=nightly
+  if [[ "$TRAVIS_EVENT_TYPE" == cron ]]; then
+    RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
   else
-    RUST_TOOLCHAIN=$(cat rust-toolchain)
+    RUSTC_HASH=$(cat rust-version)
   fi
-- rm rust-toolchain
-# install Rust
-- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN"
+# Install Rust ("stable" toolchain for better caching, it is just used to build rustup-toolchain-install-master)
+- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain stable --profile minimal
 - export PATH=$HOME/.cargo/bin:$PATH
+- rustup default stable
+- rustup toolchain uninstall beta
+- rustup update
+# Install "master" toolchain
+- cargo install rustup-toolchain-install-master
+- travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c rust-src -c rustc-dev
+- rustup default master
 - rustc --version
-# customize installation
-- rustup target add i686-unknown-linux-gnu
-- rustup target add i686-pc-windows-gnu
-- rustup target add i686-pc-windows-msvc
-- rustup component add rust-src
-- cargo install xargo || echo "Skipping xargo install"
+- cargo --version
 
 script:
-- set -e
-- |
-  # Test and install plain miri
-  cargo build --release --all-features &&
-  cargo test --release --all-features &&
-  cargo install --all-features --force --path .
-- |
-  # test that the rustc_tests binary compiles
-  cd rustc_tests &&
-  cargo build --release &&
-  cd ..
-- |
-  # get ourselves a MIR-full libstd
-  xargo/build.sh &&
-  export MIRI_SYSROOT=~/.xargo/HOST
-- |
-  # run all tests with full mir
-  cargo test --release --all-features
-- |
-  # test `cargo miri`
-  cd cargo-miri-test &&
-  if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
-    cargo miri -q -- -Zmiri-start-fn
-  else
-    cargo miri -q -- -Zmiri-start-fn >stdout.real 2>stderr.real &&
-    cat stdout.real stderr.real &&
-    # Test `cargo miri` output. Not on mac because output redirecting doesn't
-    # work. There is no error. It just stops CI.
-    diff -u stdout.ref stdout.real &&
-    diff -u stderr.ref stderr.real
-  fi &&
-  # test `cargo miri test`
-  cargo miri test &&
-  cd ..
+- ./travis.sh
+
+before_cache:
+# Don't cache "master" toolchain, it's a waste
+- rustup default stable
+- rustup toolchain uninstall master
 
 notifications:
   email:
     on_success: never
+    recipients:
+      - post+travis@ralfj.de
+      - travis-miri@oli-obk.de
 branches:
   only:
   - master
-env:
-  global:
-  - RUST_TEST_NOCAPTURE=1
+  - auto
+  - try