[ 
https://issues.apache.org/jira/browse/ARROW-2163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16369251#comment-16369251
 ] 

ASF GitHub Bot commented on ARROW-2163:
---------------------------------------

wesm closed pull request #1625: ARROW-2163: [CI] Make apt installs explicit
URL: https://github.com/apache/arrow/pull/1625
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index 9ef16b5cf..73a9f4642 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 9d07e02a8..27d1e86fd 100755
--- a/ci/travis_before_script_c_glib.sh
+++ b/ci/travis_before_script_c_glib.sh
@@ -21,6 +21,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
diff --git a/ci/travis_install_clang_tools.sh b/ci/travis_install_clang_tools.sh
index 630c09e31..9c89253df 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_linux.sh b/ci/travis_install_linux.sh
new file mode 100755
index 000000000..acee9ebcb
--- /dev/null
+++ b/ci/travis_install_linux.sh
@@ -0,0 +1,26 @@
+#!/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.
+
+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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Install apt dependencies separate from built-in Travis commands, retry on 
> flakiness
> -----------------------------------------------------------------------------------
>
>                 Key: ARROW-2163
>                 URL: https://issues.apache.org/jira/browse/ARROW-2163
>             Project: Apache Arrow
>          Issue Type: Improvement
>            Reporter: Wes McKinney
>            Assignee: Antoine Pitrou
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> This would also allow us to run the detect changes script earlier than 
> installing apt dependencies, so unnecessary builds will terminate faster



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to