# Use new trusty images, should yield newer compilers and packages
# Taken from https://github.com/genbattle/dkm
sudo: required
dist: trusty
language: cpp

matrix:
  include:
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-4.9
      env: COMPILER=g++-4.9
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-5
      env: COMPILER=g++-5
    - compiler: clang
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.6
          packages:
            - clang-3.6
      env: COMPILER=clang++-3.6
    - compiler: clang
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.7
          packages:
            - clang-3.7
      env: COMPILER=clang++-3.7

before_install:
  - sudo apt-get update -qq

install:
  - sudo apt-get install -y scons liblz4-dev

script:
  - scons

after_script:
  - lz4_stream_test

# Use new trusty images, should yield newer compilers and packages
# Taken from https://github.com/genbattle/dkm
sudo: required
dist: trusty
language: cpp

matrix:
  include:
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-4.9
      env: COMPILER=g++-4.9
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-5
      env: COMPILER=g++-5
    - compiler: clang
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.6
          packages:
            - clang-3.6
      env: COMPILER=clang++-3.6
    - compiler: clang
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.7
          packages:
            - clang-3.7
      env: COMPILER=clang++-3.7

before_install:
  - sudo apt-get update -qq

install:
  - sudo apt-get install -y scons
  - cd /tmp && git clone https://github.com/lz4/lz4.git && cd lz4 && make && sudo PREFIX=/usr make install

script:
  - scons

after_script:
  - lz4_stream_test

Install LZ4 library from source
Install LZ4 library from source

The LZ4 version shipped with ubuntu 14.04 is too old for this library,
so install it from the latests sources.
