diff --git a/.travis.yml b/.travis.yml index 345020e..a9f7013 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,27 @@ -sudo: require -language: generic -compiler: gcc dist: trusty - -before_install: - # C++17 - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update -qq - -install: - # C++17 - - sudo apt-get install -qq g++-6 - - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90 - -script: +sudo: required +language: + - cpp +compiler: + - gcc +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-6 + - g++-6 + - cmake +script: + # Link gcc-6 and g++-6 to their standard commands + - ln -s /usr/bin/gcc-6 /usr/local/bin/gcc + - ln -s /usr/bin/g++-6 /usr/local/bin/g++ + # Export CC and CXX to tell cmake which compiler to use + - export CC=/usr/bin/gcc-6 + - export CXX=/usr/bin/g++-6 + # Check versions of gcc, g++ and cmake + - gcc -v && g++ -v && cmake --version + # Run your build commands next - cmake -D CMAKE_C_COMPILER=gcc-6 -D CMAKE_CXX_COMPILER=g++-6 CMakeLists.txt - make - ./Introspector-generator \ No newline at end of file