From 31b392fe3a6961596a0bd4e1bb24c0da2a9b7b42 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 6 Nov 2019 19:05:37 -0500 Subject: CI: replace compiletest-rs with trybuild We use compiletest to run compile-fail tests but compiletest depends on compiler internals so it breaks every now and then and requires nightly. With trybuild we can also run compile-fail tests but it works on stable and it already has reached version 1.0 --- ci/script.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ci') diff --git a/ci/script.sh b/ci/script.sh index 9cb03fc..5c898a8 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -37,10 +37,10 @@ main() { mkdir -p ci/builds if [ $T = x86_64-unknown-linux-gnu ]; then - if [ $TRAVIS_RUST_VERSION = nightly ]; then - # compile-fail tests - cargo test --test single --target $T + # compile-fail tests + cargo test --test single --target $T + if [ $TRAVIS_RUST_VERSION = nightly ]; then # multi-core compile-pass tests pushd heterogeneous local exs=( -- cgit v1.2.3 From da9c6a714eaa9420694dc6377c6e0167fe08f5d4 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 6 Nov 2019 19:39:57 -0500 Subject: run cfail tests only when rustc --version == $MSRV this version is more or less fixed so new releases of Rust (stable or nightly channel) are unlikely to break to build due to changes in diagnostic messages --- ci/script.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ci') diff --git a/ci/script.sh b/ci/script.sh index 5c898a8..e87e50a 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -37,8 +37,11 @@ main() { mkdir -p ci/builds if [ $T = x86_64-unknown-linux-gnu ]; then - # compile-fail tests - cargo test --test single --target $T + if [ $TRAVIS_RUST_VERSION == 1.*.* ]; then + # test on a fixed version (MSRV) to avoid problems with changes in rustc diagnostics + # compile-fail tests + cargo test --test single --target $T + fi if [ $TRAVIS_RUST_VERSION = nightly ]; then # multi-core compile-pass tests -- cgit v1.2.3 From e9a83947bc919487d8566ec0f7348bbe0d9ae8af Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 6 Nov 2019 19:48:02 -0500 Subject: fix bash comparison --- ci/script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ci') diff --git a/ci/script.sh b/ci/script.sh index e87e50a..78341e1 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -37,7 +37,7 @@ main() { mkdir -p ci/builds if [ $T = x86_64-unknown-linux-gnu ]; then - if [ $TRAVIS_RUST_VERSION == 1.*.* ]; then + if [[ $TRAVIS_RUST_VERSION == 1.*.* ]]; then # test on a fixed version (MSRV) to avoid problems with changes in rustc diagnostics # compile-fail tests cargo test --test single --target $T -- cgit v1.2.3