This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 2106152  ARROW-2163: [CI] Make apt installs explicit
2106152 is described below

commit 2106152d050adfc04b467407c9569e9f6e8c867c
Author: Antoine Pitrou <anto...@python.org>
AuthorDate: Mon Feb 19 10:53:49 2018 -0500

    ARROW-2163: [CI] Make apt installs explicit
    
    Together with increasing timeouts and retries, this will hopefully make the 
builds less flaky. Besides, we can now skip installing for jobs that don't have 
related changes (e.g. Python jobs when a Java-only change is tested), speeding 
up builds slightly.
    
    Author: Antoine Pitrou <anto...@python.org>
    
    Closes #1625 from pitrou/ARROW-2163-explicit-apt-installs and squashes the 
following commits:
    
    eb94e1f8 [Antoine Pitrou] Remove temporary changes [skip appveyor]
    563d176f [Antoine Pitrou] glib-only change [skip appveyor]
    b7781033 [Antoine Pitrou] Factor out c_glib installs [skip ci]
    31923fee [Antoine Pitrou] Java-only change [skip appveyor]
    f702fcc1 [Antoine Pitrou] Fix integration build [skip ci]
    701fc9e6 [Antoine Pitrou] Python-only change [skip appveyor]
    427a9dcb [Antoine Pitrou] Reenable all builds [skip appveyor]
    4669b017 [Antoine Pitrou] Avoid travis_before_script_cpp.sh if not C++ was 
modified [skip appveyor]
    1720020a [Antoine Pitrou] Merge branch 'master' into 
ARROW-2163-explicit-apt-installs
    2c8b4a65 [Antoine Pitrou] Dummy change [skip appveyor]
    2d95dbf0 [Antoine Pitrou] Python-only change [skip appveyor]
    bdcdd3e3 [Antoine Pitrou] [skip ci]
    4e08a980 [Antoine Pitrou] Python-only change [skip appveyor]
    3d16e1b4 [Antoine Pitrou] glib-only change [skip appveyor]
    0a8a70c7 [Antoine Pitrou] JS-only change [skip appveyor]
    eb0ea328 [Antoine Pitrou] Java-only change [skip appveyor]
    9a2a2fe3 [Antoine Pitrou] glib-only change [skip appveyor]
    9dcc93ab [Antoine Pitrou] ARROW-2163 [skip appveyor]
---
 .travis.yml                                        | 155 +++++++++++----------
 ci/travis_before_script_c_glib.sh                  |   6 +
 ci/travis_install_clang_tools.sh                   |   2 +-
 ...tall_clang_tools.sh => travis_install_linux.sh} |  12 +-
 4 files changed, 93 insertions(+), 82 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 9ef16b5..73a9f46 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,23 +17,6 @@
 
 sudo: required
 dist: trusty
-addons:
-  apt:
-    sources:
-    - ubuntu-toolchain-r-test
-    packages:
-    - gcc-4.9   # Needed for C++11
-    - g++-4.9   # Needed for C++11
-    - gdb
-    - ccache
-    - valgrind
-    - libboost-dev
-    - libboost-filesystem-dev
-    - libboost-system-dev
-    - libjemalloc-dev
-    - gtk-doc-tools
-    - autoconf-archive
-    - libgirepository1.0-dev
 
 services:
   - docker
@@ -41,6 +24,18 @@ services:
 cache:
   ccache: true
 
+before_install:
+  # Common pre-install steps for all builds
+  - ulimit -c unlimited -S
+  - |
+      if [ $TRAVIS_OS_NAME == "linux" ]; then
+        sudo bash -c "echo -e 'Acquire::Retries 10; Acquire::http::Timeout 
\"20\";' > /etc/apt/apt.conf.d/99-travis-retry"
+        sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
+        sudo apt-get update -qq
+      fi
+  - eval `python $TRAVIS_BUILD_DIR/ci/travis_detect_changes.py`
+
+
 matrix:
   fast_finish: true
   allow_failures:
@@ -51,24 +46,27 @@ matrix:
     language: cpp
     os: linux
     group: deprecated
+    env:
+    - ARROW_TRAVIS_USE_TOOLCHAIN=1
+    - ARROW_TRAVIS_VALGRIND=1
+    - ARROW_TRAVIS_PLASMA=1
+    - ARROW_TRAVIS_ORC=1
+    - ARROW_TRAVIS_CLANG_FORMAT=1
+    - ARROW_BUILD_WARNING_LEVEL=CHECKIN
+    - CC="clang-5.0"
+    - CXX="clang++-5.0"
     before_script:
-    - eval `python $TRAVIS_BUILD_DIR/ci/travis_detect_changes.py`
-    - export ARROW_TRAVIS_USE_TOOLCHAIN=1
-    - export ARROW_TRAVIS_VALGRIND=1
-    - export ARROW_TRAVIS_PLASMA=1
-    - export ARROW_TRAVIS_ORC=1
-    - export ARROW_TRAVIS_CLANG_FORMAT=1
-    - export ARROW_BUILD_WARNING_LEVEL=CHECKIN
-    - export CC="clang-5.0"
-    - export CXX="clang++-5.0"
+    # (ARROW_CI_CPP_AFFECTED implies ARROW_CI_PYTHON_AFFECTED)
+    - if [ $ARROW_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_install_linux.sh
     - $TRAVIS_BUILD_DIR/ci/travis_install_clang_tools.sh
     - $TRAVIS_BUILD_DIR/ci/travis_lint.sh
     - if [ $ARROW_CI_CPP_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh; fi
     script:
     - if [ $ARROW_CI_CPP_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh; fi
-    - if [ $ARROW_CI_PYTHON_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_build_parquet_cpp.sh; fi
-    - if [ $ARROW_CI_PYTHON_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_python.sh 2.7; fi
-    - if [ $ARROW_CI_PYTHON_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_python.sh 3.6; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_build_parquet_cpp.sh
+    - $TRAVIS_BUILD_DIR/ci/travis_script_python.sh 2.7
+    - $TRAVIS_BUILD_DIR/ci/travis_script_python.sh 3.6
   # [OS X] C++ & Python w/ XCode 6.4
   - compiler: clang
     language: cpp
@@ -76,22 +74,22 @@ matrix:
     os: osx
     cache:
     addons:
+    env:
+    - ARROW_TRAVIS_USE_TOOLCHAIN=1
+    - ARROW_TRAVIS_PLASMA=1
+    - ARROW_TRAVIS_ORC=1
+    - ARROW_BUILD_WARNING_LEVEL=CHECKIN
     before_script:
-    - eval `python $TRAVIS_BUILD_DIR/ci/travis_detect_changes.py`
-    - export ARROW_TRAVIS_USE_TOOLCHAIN=1
-    - export ARROW_TRAVIS_PLASMA=1
-    - export ARROW_TRAVIS_ORC=1
-    - export ARROW_BUILD_WARNING_LEVEL=CHECKIN
+    - if [ $ARROW_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
     - if [ $ARROW_CI_CPP_AFFECTED == "1" ]; then travis_wait 50 
$TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh; fi
     script:
     - if [ $ARROW_CI_CPP_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh; fi
-    - if [ $ARROW_CI_PYTHON_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_build_parquet_cpp.sh; fi
-    - if [ $ARROW_CI_PYTHON_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_python.sh 2.7; fi
-    - if [ $ARROW_CI_PYTHON_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_python.sh 3.6; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_build_parquet_cpp.sh
+    - $TRAVIS_BUILD_DIR/ci/travis_script_python.sh 2.7
+    - $TRAVIS_BUILD_DIR/ci/travis_script_python.sh 3.6
   # [manylinux1] Python
   - language: cpp
     before_script:
-    - eval `python $TRAVIS_BUILD_DIR/ci/travis_detect_changes.py`
     - if [ $ARROW_CI_PYTHON_AFFECTED == "1" ]; then docker pull 
quay.io/xhochy/arrow_manylinux1_x86_64_base:latest; fi
     script:
     - if [ $ARROW_CI_PYTHON_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_manylinux.sh; fi
@@ -100,18 +98,19 @@ matrix:
     os: linux
     jdk: openjdk7
     before_script:
-    - eval `python $TRAVIS_BUILD_DIR/ci/travis_detect_changes.py`
+    - if [ $ARROW_CI_JAVA_AFFECTED != "1" ]; then exit; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_install_linux.sh
     script:
-    - if [ $ARROW_CI_JAVA_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_java.sh; fi
-    - if [ $ARROW_CI_JAVA_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_javadoc.sh; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_script_java.sh
+    - $TRAVIS_BUILD_DIR/ci/travis_script_javadoc.sh
   # Java w/ Oracle JDK 9
   - language: java
     os: linux
     jdk: oraclejdk9
     before_script:
-    - eval `python $TRAVIS_BUILD_DIR/ci/travis_detect_changes.py`
+    - if [ $ARROW_CI_JAVA_AFFECTED != "1" ]; then exit; fi
     script:
-    - if [ $ARROW_CI_JAVA_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_java.sh; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_script_java.sh
     addons:
       apt:
         packages:
@@ -121,51 +120,58 @@ matrix:
     os: linux
     env: ARROW_TEST_GROUP=integration
     jdk: openjdk8
+    env:
+    - CC="clang-5.0"
+    - CXX="clang++-5.0"
     before_script:
-    - eval `python $TRAVIS_BUILD_DIR/ci/travis_detect_changes.py`
-    - source $TRAVIS_BUILD_DIR/ci/travis_install_clang_tools.sh
-    - export CC="clang-5.0"
-    - export CXX="clang++-5.0"
+    - if [ $ARROW_CI_INTEGRATION_AFFECTED != "1" ]; then exit; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_install_linux.sh
+    - $TRAVIS_BUILD_DIR/ci/travis_install_clang_tools.sh
     - nvm install node
-    - if [ $ARROW_CI_INTEGRATION_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_before_script_js.sh; fi
-    - if [ $ARROW_CI_INTEGRATION_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_before_script_js.sh
+    - $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh
     script:
-    - if [ $ARROW_CI_INTEGRATION_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_integration.sh; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_script_integration.sh
   # NodeJS
   - language: node_js
     os: linux
     node_js: node
     before_script:
-    - eval `python $TRAVIS_BUILD_DIR/ci/travis_detect_changes.py`
-    - if [ $ARROW_CI_JS_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_before_script_js.sh; fi
+    - if [ $ARROW_CI_JS_AFFECTED != "1" ]; then exit; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_install_linux.sh
+    - $TRAVIS_BUILD_DIR/ci/travis_before_script_js.sh
     script:
-    - if [ $ARROW_CI_JS_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_js.sh; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_script_js.sh
   # C++ & glib w/ gcc 4.9 & autotools
   - compiler: gcc
     language: cpp
     os: linux
-    env: BUILD_SYSTEM=autotools BUILD_TORCH_EXAMPLE=no
+    env:
+    - BUILD_SYSTEM=autotools BUILD_TORCH_EXAMPLE=no
+    - CC="gcc-4.9"
+    - CXX="g++-4.9"
     before_script:
-    - eval `python $TRAVIS_BUILD_DIR/ci/travis_detect_changes.py`
-    - export CC="gcc-4.9"
-    - export CXX="g++-4.9"
-    - if [ $ARROW_CI_C_GLIB_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh --only-library; fi
-    - if [ $ARROW_CI_C_GLIB_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_before_script_c_glib.sh; fi
+    - if [ $ARROW_CI_C_GLIB_AFFECTED != "1" ]; then exit; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_install_linux.sh
+    - $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh --only-library
+    - $TRAVIS_BUILD_DIR/ci/travis_before_script_c_glib.sh
     script:
-    - if [ $ARROW_CI_C_GLIB_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh
   # C++ & glib w/ gcc 4.9 & meson
   - compiler: gcc
     language: cpp
     os: linux
-    env: BUILD_SYSTEM=meson BUILD_TORCH_EXAMPLE=no
+    env:
+    - BUILD_SYSTEM=meson BUILD_TORCH_EXAMPLE=no
+    - CC="gcc-4.9"
+    - CXX="g++-4.9"
     before_script:
-    - eval `python $TRAVIS_BUILD_DIR/ci/travis_detect_changes.py`
-    - export CC="gcc-4.9"
-    - export CXX="g++-4.9"
-    - if [ $ARROW_CI_C_GLIB_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh --only-library; fi
-    - if [ $ARROW_CI_C_GLIB_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_before_script_c_glib.sh; fi
+    - if [ $ARROW_CI_C_GLIB_AFFECTED != "1" ]; then exit; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_install_linux.sh
+    - $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh --only-library
+    - $TRAVIS_BUILD_DIR/ci/travis_before_script_c_glib.sh
     script:
-    - if [ $ARROW_CI_C_GLIB_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh
   # [OS X] C++ & glib w/ XCode 8.3 & autotools
   - compiler: clang
     osx_image: xcode8.3
@@ -173,17 +179,14 @@ matrix:
     cache:
     addons:
     rvm: 2.2
-    env: BUILD_SYSTEM=autotools
+    env:
+    - BUILD_SYSTEM=autotools
     before_script:
-    - eval `python $TRAVIS_BUILD_DIR/ci/travis_detect_changes.py`
-    - if [ $ARROW_CI_C_GLIB_AFFECTED == "1" ]; then brew update && brew bundle 
--file=$TRAVIS_BUILD_DIR/c_glib/Brewfile; fi
-    - if [ $ARROW_CI_C_GLIB_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh --only-library; fi
-    - if [ $ARROW_CI_C_GLIB_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_before_script_c_glib.sh; fi
+    - if [ $ARROW_CI_C_GLIB_AFFECTED != "1" ]; then exit; fi
+    - $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh --only-library
+    - $TRAVIS_BUILD_DIR/ci/travis_before_script_c_glib.sh
     script:
-    - if [ $ARROW_CI_C_GLIB_AFFECTED == "1" ]; then 
$TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh; fi
-
-before_install:
-- ulimit -c unlimited -S
+    - $TRAVIS_BUILD_DIR/ci/travis_script_c_glib.sh
 
 after_failure:
 - COREFILE=$(find . -maxdepth 2 -name "core*" | head -n 1)
diff --git a/ci/travis_before_script_c_glib.sh 
b/ci/travis_before_script_c_glib.sh
index 9d07e02..27d1e86 100755
--- a/ci/travis_before_script_c_glib.sh
+++ b/ci/travis_before_script_c_glib.sh
@@ -22,6 +22,12 @@ set -ex
 source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh
 
 if [ $TRAVIS_OS_NAME = "osx" ]; then
+  brew update && brew bundle --file=$TRAVIS_BUILD_DIR/c_glib/Brewfile
+else  # Linux
+  sudo apt-get install -y -q gtk-doc-tools autoconf-archive 
libgirepository1.0-dev
+fi
+
+if [ $TRAVIS_OS_NAME = "osx" ]; then
   export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig
   export XML_CATALOG_FILES=/usr/local/etc/xml/catalog
 fi
diff --git a/ci/travis_install_clang_tools.sh b/ci/travis_install_clang_tools.sh
index 630c09e..9c89253 100755
--- a/ci/travis_install_clang_tools.sh
+++ b/ci/travis_install_clang_tools.sh
@@ -20,5 +20,5 @@
 wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
 sudo apt-add-repository -y \
      "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-5.0 main"
-sudo apt-get update -q
+sudo apt-get update -qq
 sudo apt-get install -q clang-5.0 clang-format-5.0 clang-tidy-5.0
diff --git a/ci/travis_install_clang_tools.sh b/ci/travis_install_linux.sh
similarity index 75%
copy from ci/travis_install_clang_tools.sh
copy to ci/travis_install_linux.sh
index 630c09e..acee9eb 100755
--- a/ci/travis_install_clang_tools.sh
+++ b/ci/travis_install_linux.sh
@@ -17,8 +17,10 @@
 # specific language governing permissions and limitations
 # under the License.
 
-wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
-sudo apt-add-repository -y \
-     "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-5.0 main"
-sudo apt-get update -q
-sudo apt-get install -q clang-5.0 clang-format-5.0 clang-tidy-5.0
+sudo apt-get install -y -q \
+    gdb ccache libboost-dev libboost-filesystem-dev \
+    libboost-system-dev libjemalloc-dev
+
+if [ "$ARROW_TRAVIS_VALGRIND" == "1" ]; then
+    sudo apt-get install -y -q valgrind
+fi

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.

Reply via email to