From bebb5bfa38bdfe80970a105a758474bbb29bb95b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 4 Apr 2019 10:19:18 +0100 Subject: [PATCH 1/4] use rustup-toolchain-install-master for CI --- .travis.yml | 14 +++++++++++--- rust-version | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index ee58f73c3643..29e680cbae52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ cache: # over time). directories: - /home/travis/.cargo + - /home/travis/.rustup os: - linux @@ -17,18 +18,25 @@ before_script: # 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 + 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" +- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain stable - export PATH=$HOME/.cargo/bin:$PATH +- cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed" +- rustup-toolchain-install-master -f -n master $RUSTC_HASH +- rustup default master - rustc --version script: - ./travis.sh +after_script: +# Don't cache this, it's a waste +- rustup toolchain uninstall master + notifications: email: on_success: never diff --git a/rust-version b/rust-version index b62147121802..a2b3daad97ec 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -nightly-2019-04-03 +f717b58dd70829f105960a071c7992b440720482 From 31bc4355aaa27627d96696c03faa61ec35c5b7b4 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 4 Apr 2019 10:21:32 +0100 Subject: [PATCH 2/4] adjust README --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cf7bc9e32d0b..54d8411b2fe7 100644 --- a/README.md +++ b/README.md @@ -120,13 +120,18 @@ other projects: ```sh rustup component remove miri # avoid having Miri installed twice -cargo +nightly install --path "$DIR" --force # or the nightly in `rust-version` +cargo +nightly install --path "$DIR" --force cargo +nightly miri setup ``` (We are giving `+nightly` explicitly here all the time because it is important that all of these commands get executed with the same toolchain.) +In case this fails, your nightly might be incompatible with Miri master. The +`rust-version` file contains the commit hash of rustc that Miri is currently +tested against; you can use that to find a nightly that works or you might have +to wait for the next nightly to get released. + If you want to use a different libstd (not the one that comes with the nightly), you can do that by running From 081837eff0c6f8dde9c6d87b8b9ddab1d2ecfd60 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 4 Apr 2019 10:38:49 +0100 Subject: [PATCH 3/4] fix Travis and adjust AppVeyor --- .appveyor.yml | 30 ++++++++++++++++++++---------- .travis.yml | 14 ++++++++------ 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index a46214a3c45c..e99b0cc33c9b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -3,9 +3,7 @@ environment: PROJECT_NAME: miri matrix: - TARGET: x86_64-pc-windows-msvc - MSYS2_BITS: 64 - - TARGET: i686-pc-windows-msvc - MSYS2_BITS: 32 + #- TARGET: i686-pc-windows-msvc # branches to build branches: @@ -13,18 +11,23 @@ branches: only: - master +cache: + - '%USERPROFILE%\.cargo' + - '%USERPROFILE%\.rustup' + install: - # Install Rust. - - set PATH=C:\Program Files\Git\mingw64\bin;C:\msys64\mingw%MSYS2_BITS%\bin;%PATH% - - set /p RUST_TOOLCHAIN= Date: Thu, 4 Apr 2019 16:49:16 +0100 Subject: [PATCH 4/4] fix AppVeyor --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index e99b0cc33c9b..e97380cb932f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -3,7 +3,7 @@ environment: PROJECT_NAME: miri matrix: - TARGET: x86_64-pc-windows-msvc - #- TARGET: i686-pc-windows-msvc + - TARGET: i686-pc-windows-msvc # branches to build branches: @@ -42,7 +42,7 @@ test_script: - cargo test --release --all-features # Test cargo integration - cd test-cargo-miri - - python3 run-test.py + - '"C:\msys64\mingw64\bin\python3.exe" run-test.py' after_test: # Don't cache "master" toolchain, it's a waste