#!/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 -ex source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh if test $1 == "--only-library" { setvar only_library_mode = 'yes' } else { setvar only_library_mode = 'no' source $TRAVIS_BUILD_DIR/ci/travis_install_conda.sh } if test $ARROW_TRAVIS_USE_TOOLCHAIN == "1" { # Set up C++ toolchain from conda-forge packages for faster builds conda create -y -q -p $CPP_TOOLCHAIN python=2.7 \ jemalloc=4.4.0 \ nomkl \ boost-cpp \ rapidjson \ flatbuffers \ gflags \ lz4-c \ snappy \ zstd \ brotli \ zlib \ cmake \ curl \ thrift-cpp \ ninja # HACK(wesm): We started experiencing OpenSSL failures when Miniconda was # updated sometime on October 2 or October 3 conda update -y -p $CPP_TOOLCHAIN ca-certificates -c defaults } if test $TRAVIS_OS_NAME == "osx" { brew update && brew bundle --file=cpp/Brewfile } mkdir $ARROW_CPP_BUILD_DIR pushd $ARROW_CPP_BUILD_DIR setvar CMAKE_COMMON_FLAGS = ""\ -DARROW_BUILD_BENCHMARKS=ON \ -DCMAKE_INSTALL_PREFIX=$ARROW_CPP_INSTALL \ -DARROW_NO_DEPRECATED_API=ON \ -DARROW_EXTRA_ERROR_CONTEXT=ON"" setvar CMAKE_LINUX_FLAGS = """" setvar CMAKE_OSX_FLAGS = """" if test $only_library_mode == "yes" { setvar CMAKE_COMMON_FLAGS = ""\ $CMAKE_COMMON_FLAGS \ -DARROW_BUILD_TESTS=OFF \ -DARROW_BUILD_UTILITIES=OFF \ -DARROW_INSTALL_NAME_RPATH=OFF"" } # Use Ninja for faster builds when using toolchain if test $ARROW_TRAVIS_USE_TOOLCHAIN == "1" { setvar CMAKE_COMMON_FLAGS = ""$CMAKE_COMMON_FLAGS -GNinja"" } if test $ARROW_TRAVIS_PLASMA == "1" { setvar CMAKE_COMMON_FLAGS = ""$CMAKE_COMMON_FLAGS -DARROW_PLASMA=ON"" } if test $ARROW_TRAVIS_VALGRIND == "1" { setvar CMAKE_COMMON_FLAGS = ""$CMAKE_COMMON_FLAGS -DARROW_TEST_MEMCHECK=ON"" } if test $TRAVIS_OS_NAME == "linux" { cmake $CMAKE_COMMON_FLAGS \ $CMAKE_LINUX_FLAGS \ -DBUILD_WARNING_LEVEL=CHECKIN \ $ARROW_CPP_DIR } else { cmake $CMAKE_COMMON_FLAGS \ $CMAKE_OSX_FLAGS \ -DBUILD_WARNING_LEVEL=CHECKIN \ $ARROW_CPP_DIR } # Build and install libraries $TRAVIS_MAKE -j4 $TRAVIS_MAKE install popd