# This is used by Travis CI site in
# order to build the code online.

language: cpp

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - gcc-6
      - g++-6

script:
  - cd samples
  - sed -i 's/g++/g++-6/' makefile

  # Execute the default recipe
  - make

  # Test the parser with a TSP instance
  - ./test ../instances/tsp-25-843.xml > /dev/null
  # Test the parser with a Constraint Optimisation instance
  - ./test ../instances/obj.xml > /dev/null
  # Test the parser with an instance with all the kinds of constraints:
  # This fails as the parser's sample solver doesn't support every constraint
  - eval ! ./test ../instances/example.xml > /dev/null

  # Execute the library recipes
  - make lib
  - make testlib

  # Perform the three tests again for the 'testlib' executable
  - ./testlib ../instances/tsp-25-843.xml > /dev/null
  - ./testlib ../instances/obj.xml > /dev/null
  - eval ! ./testlib ../instances/example.xml > /dev/null

  - make clean

# This is used by Travis CI site in
# order to build the code online.

language: cpp

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - gcc-6
      - g++-6

script:
  - CXX=g++-6
  - cd samples

  # Execute the default recipe
  - make

  # Test the parser with a TSP instance
  - ./test ../instances/tsp-25-843.xml > /dev/null
  # Test the parser with a Constraint Optimisation instance
  - ./test ../instances/obj.xml > /dev/null
  # Test the parser with an instance with all the kinds of constraints:
  # This fails as the parser's sample solver doesn't support every constraint
  - eval ! ./test ../instances/example.xml > /dev/null

  # Execute the library recipes
  - make lib
  - make testlib

  # Perform the three tests again for the 'testlib' executable
  - ./testlib ../instances/tsp-25-843.xml > /dev/null
  - ./testlib ../instances/obj.xml > /dev/null
  - eval ! ./testlib ../instances/example.xml > /dev/null

  - make clean

Define compiler's version via a standard variable
Define compiler's version via a standard variable
