language: cpp

compiler:
  - gcc

before_script:
  # Add ppa for newest gcc
  - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
  - sudo apt-get update
  # Install new gcc / g++
  - sudo apt-get install gcc-5 g++-5
  # Add new references
  - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90
  - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 90
  # Install latest boost
  - wget https://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz/download
  - tar xf download
  - cd boost_1_58_0
  - ./bootstrap.sh --with-libraries=context
  - sudo ./b2 install

script: 
  - mkdir build
  - cd build
  - cmake ../project_files
  - make
  
notifications:
  email:
    recipients: adastley@gmail.com
    on_success: change
    on_failure: change

language: cpp

compiler:
  - gcc

before_script:
  # Add ppa for newest gcc
  - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
  - sudo apt-get -qq update
  # Install new gcc / g++
  - sudo apt-get -qq install gcc-5 g++-5
  # Add new references
  - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90
  - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 90
  - sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
  - sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
  - sudo update-alternatives --set cc /usr/bin/gcc
  - sudo update-alternatives --set c++ /usr/bin/g++
  - update-alternatives --set gcc "/usr/bin/gcc-5"
  - update-alternatives --set g++ "/usr/bin/g++-5"
  # Install latest boost
  - wget https://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz/download
  - tar xf download
  - cd boost_1_58_0
  - ./bootstrap.sh --with-libraries=context
  - sudo ./b2 install > /dev/null
  # Get back to the root
  - cd ../

script: 
  - mkdir build
  - cd build
  - cmake ../project_files
  - make
  
notifications:
  email:
    recipients: adastley@gmail.com
    on_success: change
    on_failure: change

Return to the root when finished with 'before_script'
CI: Return to the root when finished with 'before_script'

And remove some verbosity
