language: cpp
compiler:
  - g++

# Setup different environments to test
env:
  - CPP07=0

# Setup repos etc before installation
before_install:
  - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
  - sudo apt-get update -qq

# Install dependencies
install:
  # install g++ 4.6
  - sudo apt-get install -qq g++-4.6;
  - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 50;
  - g++ --version
  
  # install GNU make
  - sudo apt-get install build-essential
  
  - make --version
  - g++ --version

# command to run tests
script:
  - cd build
  - make

language: cpp
compiler:
  - g++
# Setup different environments to test
env:
  - target=lib
  - target=examples

# Setup repos etc before installation
before_install:
  - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
  - sudo apt-get update -qq

# Install dependencies
install:
  # install g++ 4.6
  - sudo apt-get install -qq g++-4.6;
  - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 50;
  - g++ --version
  
  # install GNU make
  - sudo apt-get install build-essential
  - g++ --version

# command to run tests
script:
  - cd build
  - if [ "$target" == "lib"      ]; then make socket-cpp.so; fi;
  - if [ "$target" == "examples" ]; then make examples;      fi;

Make two environments builds in travic-ci
Make two environments builds in travic-ci

Add two environments in travis-ci :-
-  Library shared object
- Examples