Skip to content

Apache DataFusion SQL Query Engine

ARROW-2376: [Rust] Travis builds the Rust library

Andy Grove4bed06c868b2
diff --git a/.travis.yml b/.travis.yml
index 03bc8e26ae..c3e08b9b25 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -192,6 +192,12 @@ matrix:
- $TRAVIS_BUILD_DIR/ci/travis_before_script_c_glib.sh
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh
+ - language: rust
+ rust: stable
+ before_script:
+ - if [ $ARROW_CI_RUST_AFFECTED != "1" ]; then exit; fi
+ script:
+ - $TRAVIS_BUILD_DIR/ci/travis_script_rust.sh
after_failure:
- COREFILE=$(find . -maxdepth 2 -name "core*" | head -n 1)
diff --git a/ci/travis_detect_changes.py b/ci/travis_detect_changes.py
index d60b13227a..5295d554b5 100644
--- a/ci/travis_detect_changes.py
+++ b/ci/travis_detect_changes.py
@@ -26,7 +26,7 @@ import subprocess
perr = functools.partial(print, file=sys.stderr)
-LANGUAGE_TOPICS = ['c_glib', 'cpp', 'java', 'js', 'python']
+LANGUAGE_TOPICS = ['c_glib', 'cpp', 'java', 'js', 'python', 'rust']
ALL_TOPICS = LANGUAGE_TOPICS + ['integration', 'site']
@@ -127,7 +127,7 @@ def get_affected_topics(affected_files):
elif p in ('java', 'js'):
affected[p] = True
affected['integration'] = True
- elif p in ('c_glib', 'integration', 'python', 'site'):
+ elif p in ('c_glib', 'integration', 'python', 'site', 'rust'):
affected[p] = True
return affected
diff --git a/ci/travis_env_common.sh b/ci/travis_env_common.sh
index 416977c130..46e02f1a05 100755
--- a/ci/travis_env_common.sh
+++ b/ci/travis_env_common.sh
@@ -27,6 +27,7 @@ export ARROW_C_GLIB_DIR=$TRAVIS_BUILD_DIR/c_glib
export ARROW_JAVA_DIR=${TRAVIS_BUILD_DIR}/java
export ARROW_JS_DIR=${TRAVIS_BUILD_DIR}/js
export ARROW_INTEGRATION_DIR=$TRAVIS_BUILD_DIR/integration
+export ARROW_RUST_DIR=${TRAVIS_BUILD_DIR}/rust
export CPP_BUILD_DIR=$TRAVIS_BUILD_DIR/cpp-build
diff --git a/ci/travis_script_rust.sh b/ci/travis_script_rust.sh
new file mode 100755
index 0000000000..89554f6e43
--- /dev/null
+++ b/ci/travis_script_rust.sh
@@ -0,0 +1,28 @@
+#!/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
+
+RUST_DIR=${TRAVIS_BUILD_DIR}/rust
+
+pushd $RUST_DIR
+
+cargo test
+
+popd