From 1b57860f3180e4c31d39da6f321e0570e929f97b Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Wed, 7 Nov 2018 14:52:03 +0100 Subject: [PATCH 1/8] Fix Travis Windows UI tests Just using `dos2unix tests/ui/**/*` did not work because the tool was only transforming the first directory. That's the reason for using `find`. Interestingly `find` has precedence rules for its operators, too. So you have to be careful to add opening/closing braces to denote the precedence. Example: ```shell find tests/ui/* -name '*.rs' -or -name '*.stderr' -exec dos2unix '{}' + ``` The above will be interpreted like this: (find files matching `*.rs`) OR (find files matching `*.stderr` AND exec dos2unix) which would only execute over the stderr files. That's why the braces are needed: ```shell find tests/ui/* \( -name '*.rs' -or -name '*.stderr' -or -name '*.stdout' \) -exec dos2unix '{}' + ``` --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ee990111af96..ba19ae16ac35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,7 @@ install: fi if [ "$TRAVIS_OS_NAME" == "windows" ]; then choco install windows-sdk-10.0 + find tests/ui/* \( -name '*.rs' -or -name '*.stderr' -or -name '*.stdout' \) -exec dos2unix '{}' + fi fi From c5b07e7f88eae438363ced3436025a695582eb66 Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Thu, 8 Nov 2018 07:48:25 +0100 Subject: [PATCH 2/8] Run dos2unix on ui-toml tests --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ba19ae16ac35..25179f40e5fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ install: if [ "$TRAVIS_OS_NAME" == "windows" ]; then choco install windows-sdk-10.0 find tests/ui/* \( -name '*.rs' -or -name '*.stderr' -or -name '*.stdout' \) -exec dos2unix '{}' + + find tests/ui-toml/* \( -name '*.rs' -or -name '*.stderr' -or -name '*.stdout' -or -name '*.toml' \) -exec dos2unix '{}' + fi fi From e4dd0efd25dc7d49aedb119bd74bda95f76aa4e2 Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Fri, 9 Nov 2018 07:13:34 +0100 Subject: [PATCH 3/8] Allow failures in Travis windows build --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 25179f40e5fb..5d93264e3d23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,9 +83,6 @@ matrix: if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try) - env: INTEGRATION=chronotope/chrono if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try) - allow_failures: - - os: windows - env: CARGO_INCREMENTAL=0 BASE_TESTS=true # prevent these jobs with default env vars exclude: - os: linux From 3414a829607f8b5cc9122b45c267a005f3d45f9d Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Sun, 11 Nov 2018 09:19:43 +0100 Subject: [PATCH 4/8] debugging staging branch failure --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5d93264e3d23..b28a98f5c6c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,12 +28,17 @@ install: nvm use stable npm install remark-cli remark-lint fi + echo "the cake is a lie" if [ "$TRAVIS_OS_NAME" == "windows" ]; then + echo "first debug" choco install windows-sdk-10.0 + echo "second debug" find tests/ui/* \( -name '*.rs' -or -name '*.stderr' -or -name '*.stdout' \) -exec dos2unix '{}' + + echo "third debug" find tests/ui-toml/* \( -name '*.rs' -or -name '*.stderr' -or -name '*.stdout' -or -name '*.toml' \) -exec dos2unix '{}' + fi fi + echo "end of install step" # disabling the integration tests in forks should be done with # if: fork = false From 953924ac914b8656430b152bc5d82ee7ef2233cf Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Sun, 11 Nov 2018 09:30:21 +0100 Subject: [PATCH 5/8] verbose chocolatey output --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b28a98f5c6c3..51829b9e94e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ install: echo "the cake is a lie" if [ "$TRAVIS_OS_NAME" == "windows" ]; then echo "first debug" - choco install windows-sdk-10.0 + choco install windows-sdk-10.0 -v echo "second debug" find tests/ui/* \( -name '*.rs' -or -name '*.stderr' -or -name '*.stdout' \) -exec dos2unix '{}' + echo "third debug" From 49f07c8b795f5aaa2ec3d9fc4cb97f97f964312a Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Sun, 11 Nov 2018 10:26:40 +0100 Subject: [PATCH 6/8] cat chocolatey log if choco install fails --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 51829b9e94e4..753624370b2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ install: echo "the cake is a lie" if [ "$TRAVIS_OS_NAME" == "windows" ]; then echo "first debug" - choco install windows-sdk-10.0 -v + (choco install windows-sdk-10.0 -yv) || cat /c/ProgramData/chocolatey/logs/chocolatey.log echo "second debug" find tests/ui/* \( -name '*.rs' -or -name '*.stderr' -or -name '*.stdout' \) -exec dos2unix '{}' + echo "third debug" From fae8ba2b26b7418139ec8e13244b121c672caad7 Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Wed, 28 Nov 2018 07:29:05 +0100 Subject: [PATCH 7/8] Change conditional Maybe uname == Linux was true on the windows VM? This could be a way to avoid the secret environment variable issue with Travis CI. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 753624370b2b..f0b73d83bee4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,7 +108,7 @@ script: after_success: | #!/bin/bash - if [ $(uname) == Linux ]; then + if [ "$TRAVIS_OS_NAME" == "linux" ]; then set -ex if [ -z ${INTEGRATION} ]; then ./.github/deploy.sh From 2ccf5156232130e23359173b3c321ef6dfafd119 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Fri, 12 Jul 2019 10:58:06 +0200 Subject: [PATCH 8/8] Add master toolchain binaries to the PATH --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f0b73d83bee4..8fa257413f74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -98,7 +98,11 @@ script: - | rm rust-toolchain ./setup-toolchain.sh - export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib + if [ "$TRAVIS_OS_NAME" == "windows" ]; then + export PATH=$PATH:$(rustc --print sysroot)/bin + else + export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib + fi - | if [ -z ${INTEGRATION} ]; then travis_wait 30 ./ci/base-tests.sh && sleep 5