Apache DataFusion SQL Query Engine
ARROW-2520: [Rust] CI should also build against nightly Rust
Krisztián Szűcs978beaf0ef26
diff --git a/.travis.yml b/.travis.ymlindex d919baff6d..43a5725cdf 100644--- a/.travis.yml+++ b/.travis.yml@@ -212,7 +212,6 @@ matrix:# Rust- language: rustcache: cargo- rust: stableaddons:apt:packages:@@ -223,17 +222,15 @@ matrix:- cmakebefore_script:- if [ $ARROW_CI_RUST_AFFECTED != "1" ]; then exit; fi- - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH- - export CARGO_TARGET_DIR=$TRAVIS_BUILD_DIR/target- - cargo install cargo-travis || echo "Skipping cargo-travis installation as it already exists in cache"- - export PATH=$HOME/.cargo/bin:$PATH+ - $TRAVIS_BUILD_DIR/ci/travis_install_cargo.shscript:- - $TRAVIS_BUILD_DIR/ci/travis_script_rust.sh+ - RUSTUP_TOOLCHAIN=stable $TRAVIS_BUILD_DIR/ci/travis_script_rust.sh+ - RUSTUP_TOOLCHAIN=nightly $TRAVIS_BUILD_DIR/ci/travis_script_rust.sh || trueafter_success:- pushd ${TRAVIS_BUILD_DIR}/rust# Run coverage for codecov.io- mkdir -p target/kcov- - RUST_BACKTRACE=1 cargo coverage --verbose+ - RUST_BACKTRACE=1 RUSTUP_TOOLCHAIN=stable cargo coverage --verbose- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"# Go- language: godiff --git a/appveyor.yml b/appveyor.ymlindex 1bbdf65bd2..18ad9f5f56 100644--- a/appveyor.yml+++ b/appveyor.yml@@ -60,8 +60,7 @@ environment:GENERATOR: NinjaCONFIGURATION: "Release"BUILD_SCRIPT: "CMake_Build_Script"- - JOB: "Rust_Stable"- RUST_VERSION: stable+ - JOB: "Rust"TARGET: x86_64-pc-windows-msvcUSE_CLCACHE: falsediff --git a/ci/appveyor-build.bat b/ci/appveyor-build.batindex 4d6f04791c..304afc0887 100644--- a/ci/appveyor-build.bat+++ b/ci/appveyor-build.bat@@ -17,12 +17,26 @@@echo on-if "%JOB%" == "Rust_Stable" (- cd rust+if "%JOB%" == "Rust" (+ pushd rust++ rustup default stable+ rustup showcargo build --target %TARGET% || exit /Bcargo build --target %TARGET% --release || exit /Bcargo test --target %TARGET% || exit /Bcargo test --target %TARGET% --release || exit /B++ rustup default nightly+ rustup show+ cargo build --target %TARGET%+ cargo build --target %TARGET% --release+ cargo test --target %TARGET%+ cargo test --target %TARGET% --release++ rustup default stable++ popd) else (git config core.symlinks truegit reset --harddiff --git a/ci/appveyor-install.bat b/ci/appveyor-install.batindex f514e78ec1..483f262368 100644--- a/ci/appveyor-install.bat+++ b/ci/appveyor-install.bat@@ -17,10 +17,12 @@@echo on-if "%JOB%" == "Rust_Stable" (+if "%JOB%" == "Rust" (curl -sSf -o rustup-init.exe https://win.rustup.rs/- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%+ rustup-init.exe -y --default-host %TARGET% --default-toolchain stableset "PATH=%PATH%;C:\Users\Appveyor\.cargo\bin"+ rustup install stable+ rustup install nightlyrustc -Vvcargo -V) else (diff --git a/ci/travis_install_cargo.sh b/ci/travis_install_cargo.shnew file mode 100755index 0000000000..f433033091--- /dev/null+++ b/ci/travis_install_cargo.sh@@ -0,0 +1,32 @@+#!/usr/bin/env bash++# Licensed to the Apache Software Foundation (ASF) under one+# or more contributor license agreements. See the NOTICE file+# distributed with this work for additional information+# regarding copyright ownership. The ASF licenses this file+# to you under the Apache License, Version 2.0 (the+# "License"); you may not use this file except in compliance+# with the License. You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing,+# software distributed under the License is distributed on an+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY+# KIND, either express or implied. See the License for the+# specific language governing permissions and limitations+# under the License.++set -e++# ensure that both toolchains are installed+rustup install stable+rustup install nightly++pip install 'travis-cargo<0.2' --user++export PATH=$HOME/.local/bin:$PATH+export CARGO_TARGET_DIR=$TRAVIS_BUILD_DIR/target++cargo install cargo-travis || echo "Skipping cargo-travis installation as it already exists in cache"+export PATH=$HOME/.cargo/bin:$PATHdiff --git a/ci/travis_script_rust.sh b/ci/travis_script_rust.shindex f85820fdbc..9fecb3f214 100755--- a/ci/travis_script_rust.sh+++ b/ci/travis_script_rust.sh@@ -23,9 +23,13 @@ RUST_DIR=${TRAVIS_BUILD_DIR}/rustpushd $RUST_DIR+# show activated toolchain+rustup show+# raises on any formatting errorsrustup component add rustfmt-previewcargo fmt --all -- --check+# raises on any warningscargo rustc -- -D warnings