]> git.lizzy.rs Git - rust.git/blobdiff - .travis.yml
Fix prctl SET_NAME and GET_NAME behaviour.
[rust.git] / .travis.yml
index ba3b8d3639917f3b672d5e9b365f0a44efa23bdb..a074d6b14d8da72a8b24d69a924b3daab7210ebb 100644 (file)
@@ -4,59 +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:
-# macOS weirdness (https://github.com/travis-ci/travis-ci/issues/6307, https://github.com/travis-ci/travis-ci/issues/10165)
-- if [[ "$TRAVIS_OS_NAME" == osx ]]; then rvm get stable; fi
 # 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-version)
+    RUSTC_HASH=$(cat rust-version)
   fi
-# 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
+- cargo --version
 
 script:
-- set -e
-- |
-  # Test and install plain miri
-  cargo build --release --all-features --all-targets &&
-  cargo test --release --all-features &&
-  cargo install --all-features --force --path .
-- |
-  # Get ourselves a MIR-full libstd, and use it henceforth
-  cargo miri setup &&
-  if [ "$TRAVIS_OS_NAME" == osx ]; then
-    export MIRI_SYSROOT=~/Library/Caches/miri.miri.miri/HOST
-  else
-    export MIRI_SYSROOT=~/.cache/miri/HOST
-  fi
-- |
-  # Test miri with full MIR
-  cargo test --release --all-features
-- |
-  # Test cargo integration
-  (cd cargo-miri-test && ./run-test.py)
+- ./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