dist: trusty
sudo: required
language: cpp
cache: ccache
matrix:
  fast_finish: true
  include:

    - name: "Astyle"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-4.8
      before_install:
        - ./install_astyle.sh
      script:
        - ./astyle.sh

    - name: "GCC 4.8"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-4.8
            - libnuma-dev
      env:
         - MATRIX_EVAL="CC=gcc-4.8 && CXX=g++-4.8 && JEMALLOC_CC=gcc-4.8 && JEMALLOC_CXX=g++-4.8"
      install:
      script:
        - CXX=$JEMALLOC_CXX CC=$JEMALLOC_CC LDFLAGS="-lrt -Wl,--no-as-needed" ./build_jemalloc.sh
        - ./autogen.sh
        - LDFLAGS="-lrt -Wl,--no-as-needed" ./configure
        - make all
        - make checkprogs
      before_install:
        - eval "${MATRIX_EVAL}"

    - name: "GCC 8.0"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-8
            - libnuma-dev
      env:
         - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8 && JEMALLOC_CC=gcc-8 && JEMALLOC_CXX=g++-8"
      install:
      script:
        - CXX=$JEMALLOC_CXX CC=$JEMALLOC_CC LDFLAGS="-lrt -Wl,--no-as-needed" ./build_jemalloc.sh
        - ./autogen.sh
        - LDFLAGS="-lrt -Wl,--no-as-needed" ./configure
        - make all
        - make checkprogs
      before_install:
        - eval "${MATRIX_EVAL}"

    - name: "Clang 7"
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-trusty-7
          packages:
            - g++-4.8
            - clang-7
            - libnuma-dev
      env:
        - MATRIX_EVAL="CC=clang-7 && CXX=clang++-7 && JEMALLOC_CC=gcc-4.8 && JEMALLOC_CXX=g++-4.8"
      install:
      script:
        - CXX=$JEMALLOC_CXX CC=$JEMALLOC_CC LDFLAGS="-lrt -Wl,--no-as-needed" ./build_jemalloc.sh
        - ./autogen.sh
        - LDFLAGS="-lrt -Wl,--no-as-needed" ./configure
        - make all
      before_install:
        - eval "${MATRIX_EVAL}"
