From 7aef8e06d49058a43c668b4ddf7d97ac0c525f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ho=C3=A0ng=20=C4=90=E1=BB=A9c=20Hi=E1=BA=BFu?= Date: Fri, 22 Feb 2019 15:19:51 +0700 Subject: [PATCH] travis: ensure consistent toolchain between local and CI --- .travis.yml | 9 ++++++++- Cargo.lock | 2 ++ rust-toolchain | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7b4be2c..d6fc620 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: rust -rust: nightly-2018-12-06 +rust: nightly-2019-02-22 os: - linux - osx @@ -26,6 +26,13 @@ before_install: echo "Only docs were updated, stopping build process." exit fi +- | + rust_toolchain="$(cat rust-toolchain)" + travis_yml="$(grep '^rust: ' .travis.yml | head -n 1 | sed -E 's/^rust: //')" + if [[ $travis_yml != $rust_toolchain ]]; then + echo "error: the nightly version in $1 is different than the one in rust-toolchain!" 1>&2 + exit 1 + fi install: - bash ./scripts/install.sh diff --git a/Cargo.lock b/Cargo.lock index b7dc143..05a683a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "aligned" version = "0.2.0" diff --git a/rust-toolchain b/rust-toolchain index bc0fd71..c505a40 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2019-01-01 +nightly-2019-02-22