Skip to content

Apache DataFusion SQL Query Engine

ARROW-6751: [CI] Fix ccache setup on Travis-CI

Antoine Pitrou821a8220dd21
diff --git a/.travis.yml b/.travis.yml
index 990fd22566..534004d0d1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,10 +26,6 @@ cache:
- $HOME/.ccache
- $HOME/.m2 # Maven
-env:
- - CCACHE_COMPRESS: 1
- - CCACHE_COMPRESSLEVEL: 5
-
git:
# ARROW-3083: We use a higher clone depth to also have the latest tag in the cloned history.
depth: 250
@@ -40,6 +36,8 @@ before_install:
matrix:
fast_finish: true
include:
+
+ # -------------------------------------------------------------------------
- name: "Lint, Release tests"
os: linux
language: python
@@ -60,6 +58,8 @@ matrix:
- docker-compose build --pull cpp-system-deps
script:
- docker-compose run cpp-system-deps
+
+ # -------------------------------------------------------------------------
# Separating Valgrind and C++ coverage makes individual jobs shorter
- name: "C++ unit tests w/ conda-forge toolchain, coverage"
compiler: gcc
@@ -95,6 +95,8 @@ matrix:
- $TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh || travis_terminate 1
- $TRAVIS_BUILD_DIR/ci/travis_script_gandiva_java.sh || travis_terminate 1
- $TRAVIS_BUILD_DIR/ci/travis_upload_cpp_coverage.sh || travis_terminate 1
+
+ # -------------------------------------------------------------------------
- name: "Python 3.6 unit tests w/ Valgrind, conda-forge toolchain, coverage"
compiler: gcc
language: cpp
@@ -128,11 +130,12 @@ matrix:
- export PLASMA_VALGRIND=1
- $TRAVIS_BUILD_DIR/ci/travis_script_python.sh 3.6
- $TRAVIS_BUILD_DIR/ci/travis_upload_cpp_coverage.sh
+
+ # -------------------------------------------------------------------------
- name: "[OS X] C++ w/ XCode 9.3"
compiler: clang
osx_image: xcode9.3
os: osx
- cache:
addons:
env:
- ARROW_TRAVIS_USE_TOOLCHAIN=1
@@ -159,11 +162,12 @@ matrix:
- $TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh || travis_terminate 1
# Disabled because of ARROW-4763
# - $TRAVIS_BUILD_DIR/ci/travis_script_gandiva_java.sh
+
+ # -------------------------------------------------------------------------
- name: "[OS X] Python w/ XCode 9.3"
compiler: clang
osx_image: xcode9.3
os: osx
- cache:
addons:
env:
- ARROW_TRAVIS_S3=1
@@ -178,6 +182,8 @@ matrix:
- if [ $ARROW_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
- $TRAVIS_BUILD_DIR/ci/travis_install_minio.sh
- $TRAVIS_BUILD_DIR/ci/travis_script_python.sh 3.6
+
+ # -------------------------------------------------------------------------
- name: "Java OpenJDK8 and OpenJDK11"
language: cpp
os: linux
@@ -186,6 +192,8 @@ matrix:
- docker-compose build --pull java-all-jdks
script:
- docker-compose run java-all-jdks
+
+ # -------------------------------------------------------------------------
- name: "Integration w/ OpenJDK 8, conda-forge toolchain"
language: java
os: linux
@@ -213,6 +221,8 @@ matrix:
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_integration.sh
# - $TRAVIS_BUILD_DIR/ci/travis_script_plasma_java_client.sh
+
+ # -------------------------------------------------------------------------
- name: "NodeJS"
language: node_js
os: linux
@@ -224,6 +234,8 @@ matrix:
- $TRAVIS_BUILD_DIR/ci/travis_before_script_js.sh
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_js.sh
+
+ # -------------------------------------------------------------------------
- name: "C++ & GLib & Ruby w/ gcc 5.4"
compiler: gcc
os: linux
@@ -243,6 +255,8 @@ matrix:
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_ruby.sh
+
+ # -------------------------------------------------------------------------
- name: "[OS X] C++ & GLib & Ruby w/ XCode 10.2 & Homebrew"
compiler: clang
osx_image: xcode10.2
@@ -256,7 +270,6 @@ matrix:
- ARROW_TRAVIS_PYTHON=1
- ARROW_TRAVIS_VERBOSE=1
- ARROW_TRAVIS_MIMALLOC=1
- cache:
addons:
before_script:
- if [ $ARROW_CI_RUBY_AFFECTED != "1" ]; then exit; fi
@@ -267,6 +280,8 @@ matrix:
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_ruby.sh
+
+ # -------------------------------------------------------------------------
- name: Rust
language: rust
cache: cargo
@@ -293,6 +308,8 @@ matrix:
- export PARQUET_TEST_DATA=$TRAVIS_BUILD_DIR/cpp/submodules/parquet-testing/data
- cargo tarpaulin --out Xml
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
+
+ # -------------------------------------------------------------------------
- name: Go
language: go
go_import_path: github.com/apache/arrow
@@ -306,9 +323,14 @@ matrix:
after_success:
- pushd ${TRAVIS_BUILD_DIR}/go/arrow
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
+
+ # -------------------------------------------------------------------------
- name: R (with and without libarrow)
language: r
- cache: packages
+ cache:
+ directories:
+ - $HOME/.ccache
+ packages: true
dist: xenial
env:
- ARROW_TRAVIS_PARQUET=1
@@ -318,6 +340,7 @@ matrix:
# Have to copy-paste this here because of how R's build steps work
- eval `python $TRAVIS_BUILD_DIR/ci/detect-changes.py`
- if [ $ARROW_CI_R_AFFECTED != "1" ]; then exit; fi
+ - source ci/travis/before-install.sh
# First check that it builds without libarrow
- pushd ${TRAVIS_BUILD_DIR}/r
- R -e 'install.packages("remotes"); remotes::install_deps(dep = TRUE)'
@@ -348,10 +371,10 @@ matrix:
- Rscript ../ci/travis_upload_r_coverage.R
after_failure:
- - source ci/travis/after-failure.sh
+ - source ${TRAVIS_BUILD_DIR}/ci/travis/after-failure.sh
after_script:
- - source ci/travis/after-script.sh
+ - source ${TRAVIS_BUILD_DIR}/ci/travis/after-script.sh
env:
global:
diff --git a/ci/docker_build_cpp.sh b/ci/docker_build_cpp.sh
index 29860bf719..8eb96a21bf 100755
--- a/ci/docker_build_cpp.sh
+++ b/ci/docker_build_cpp.sh
@@ -22,7 +22,11 @@ source_dir=${1:-/arrow/cpp}
build_dir=${2:-/build/cpp}
install_dir=${3:-${ARROW_HOME:-/usr/local}}
+export CCACHE_COMPRESS=1
+export CCACHE_COMPRESSLEVEL=5
+export CCACHE_COMPILERCHECK=content
export CCACHE_DIR=/build/ccache
+export PATH=/usr/lib/ccache/:$PATH
rm -rf ${build_dir}
mkdir -p ${build_dir}
diff --git a/ci/travis/before-install.sh b/ci/travis/before-install.sh
index fd97b46934..1eb45fd436 100755
--- a/ci/travis/before-install.sh
+++ b/ci/travis/before-install.sh
@@ -30,6 +30,11 @@ if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
echo -e 'Acquire::Retries 10; Acquire::http::Timeout \"20\";' | \
sudo tee /etc/apt/apt.conf.d/99-travis-retry
sudo apt-get update -qq
+
+ export CCACHE_COMPRESS=1
+ export CCACHE_COMPRESSLEVEL=5
+ export CCACHE_COMPILERCHECK=content
+ export PATH=/usr/lib/ccache/:$PATH
ccache --show-stats
fi