language: cpp

dist: trusty
sudo: required

matrix:
  include:
    - os: linux
      compiler: gcc
      # - os: linux
      #compiler: clang

script:
  - (cd bigtable/api && make -C googleapis OUTPUT=$PWD/googleapis-gens)
  - (cd bigtable/api && cmake . && make)

addons:
  apt:
    packages:
      - vim
      - curl
      - git-core
      - make
      - gcc
      - g++
      - build-essential
      - autoconf
      - automake
      - autoconf-archive
      - libtool
      - pkg-config
      - cmake
      - clang++-3.9

# Cache the grpc directory because building it takes so long ...
cache:
  directories:
    - grpc-build

install:
  # Make clang++-3.9 available as clang++
  - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 100
  - sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.9 100
  # If needed clone the grpc directory
  - test -d grpc-build/grpc/.git || git clone https://github.com/grpc/grpc.git grpc-build/grpc
  # needed or not, update the grpc directory ...
  - (cd grpc-build/grpc && git pull && git submodule update --init)
  # build and install in $HOME/local
  - (cd grpc-build/grpc && make -j 2 && sudo make install)
  - (cd grpc-build/grpc/third_party/protobuf && sudo make install)

notifications:
  email: false

language: cpp

dist: trusty
sudo: required

matrix:
  include:
    - os: linux
      compiler: clang

script:
  - (cd bigtable/api && make -C googleapis OUTPUT=$PWD/googleapis-gens)
  - (cd bigtable/api && cmake . && make)

addons:
  apt:
    packages:
      - vim
      - curl
      - git-core
      - make
      - gcc
      - g++
      - build-essential
      - autoconf
      - automake
      - autoconf-archive
      - libtool
      - pkg-config
      - cmake
      - clang++-3.9

# Cache the grpc directory because building it takes so long ...
cache:
  directories:
    - grpc-build

install:
  # Make clang++-3.9 available as clang++
  - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 100
  - sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.9 100
  # If needed clone the grpc directory
  - test -d grpc-build/grpc/.git || git clone https://github.com/grpc/grpc.git grpc-build/grpc
  # needed or not, update the grpc directory ...
  - (cd grpc-build/grpc && git pull && git submodule update --init)
  # build and install in $HOME/local
  - (cd grpc-build/grpc && make -j 2 && sudo make install)
  - (cd grpc-build/grpc/third_party/protobuf && sudo make install)

notifications:
  email: false

Use clang instead of gcc as the default compiler.
Use clang instead of gcc as the default compiler.

On the Travis image g++ seems to be too old, go with clang and
see if that works.
