# 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: required
dist: trusty
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-4.9
    - g++-4.9
    - valgrind
    - libboost-dev
    - libboost-filesystem-dev
    - libboost-regex-dev
    - libboost-system-dev
    - libboost-program-options-dev
    - libboost-test-dev
    - libssl-dev
    - libtool
    - bison
    - flex
    - pkg-config
matrix:
  fast_finish: true
  include:
  - compiler: gcc
    os: linux
    before_script:
    - export PARQUET_CXXFLAGS="-DARROW_NO_DEPRECATED_API"
    - source $TRAVIS_BUILD_DIR/ci/before_script_travis.sh
  - compiler: gcc
    os: linux
    before_script:
    - source $TRAVIS_BUILD_DIR/ci/before_script_travis.sh
  - compiler: clang
    os: linux
    before_script:
    - export PARQUET_CXXFLAGS="-DARROW_NO_DEPRECATED_API"
    - source $TRAVIS_BUILD_DIR/ci/before_script_travis.sh
  - compiler: clang
    os: osx
    osx_image: xcode6.4
    addons:
    before_script:
    - export PARQUET_CXXFLAGS="-DARROW_NO_DEPRECATED_API"
    - source $TRAVIS_BUILD_DIR/ci/before_script_travis.sh
    before_install:
    - mkdir $TRAVIS_BUILD_DIR/parquet-build
    - pushd $TRAVIS_BUILD_DIR/parquet-build
  - compiler: gcc
    os: linux
    env: PARQUET_BUILD_GROUP=toolchain
    before_script:
    script:
    - export PARQUET_CXXFLAGS="-DARROW_NO_DEPRECATED_API"
    - $TRAVIS_BUILD_DIR/ci/travis_script_static.sh
  - compiler: gcc
    os: linux
    env: PARQUET_BUILD_GROUP=toolchain
    before_script:
    script:
    - $TRAVIS_BUILD_DIR/ci/travis_script_toolchain.sh

language: cpp

# PARQUET-626: revisit llvm toolchain when/if llvm.org apt repo resurfaces

# before_install:
# - wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
# - sudo apt-get install -y software-properties-common
# - sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
# - sudo apt-add-repository -y "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7
#   main"
# - sudo apt-add-repository -y "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8
#   main"
# - sudo apt-get update
# - sudo apt-get install -y clang-tidy-3.7 clang-format-3.7 cmake
# - mkdir $TRAVIS_BUILD_DIR/parquet-build
# - pushd $TRAVIS_BUILD_DIR/parquet-build

before_install:
- mkdir $TRAVIS_BUILD_DIR/parquet-build
- pushd $TRAVIS_BUILD_DIR/parquet-build

script:
- $TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh

env:
  global:
  - secure: "sGGfe2N9i2dItR0FryQYZDdzdi9gl6QFXxGWxxXWfPz+mideJWaMLSA17dsWkbrag5GlAcs+8BRGWWagAXicPlOqD1tKKJqZxA4PEPDECny26Sh/pebZvmvnAV5136sXkKXMQkcTfoo3v22zYdVthVa+8EQTXKxGzhbL61AosSk="
