Travis: test different gcc versions
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 30 Sep 2016 09:49:29 +0000 (12:49 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 30 Sep 2016 10:35:04 +0000 (13:35 +0300)
.travis.yml

index 30e8f2a1480d6b602412ceb2bdfb699ba9d7d081..2a2ce18dd5ed7d96713f6c2d59c5e3a4ece5e30b 100644 (file)
@@ -2,36 +2,43 @@
 sudo: required
 dist: trusty
 
-addons:
-    apt:
-        sources:
-            - llvm-toolchain-precise-3.8
-            - ubuntu-toolchain-r-test
-        packages:
-            - clang-3.8
-            - g++-5
-            - gcc-5
-            - libegl1-mesa-dev
-            - libgles2-mesa-dev
-            - libwayland-dev
-            - libx11-xcb-dev
-            - libx11-dev
-            - libgbm-dev
-
-install:
-    - if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
-    - if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.8" CC="clang-3.8"; fi
-
 # Enable C++ support
 language: cpp
 
-# Compiler selection
-compiler:
-  - gcc
-  - clang
+# Need MYCC and MYCXX as travis overwrites CC and CXX
+
+matrix:
+  include:
+    - compiler: gcc
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test']
+          packages: ['g++-4.8', 'libegl1-mesa-dev', 'libgles2-mesa-dev', 'libwayland-dev',  'libx11-xcb-dev',  'libx11-dev',  'libgbm-dev']
+      env: MYCC=gcc-4.8 MYCXX=g++-4.8
+
+    - compiler: gcc
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test']
+          packages: ['g++-4.9', 'libegl1-mesa-dev', 'libgles2-mesa-dev', 'libwayland-dev',  'libx11-xcb-dev',  'libx11-dev',  'libgbm-dev']
+      env: MYCC=gcc-4.9 MYCXX=g++-4.9
+
+    - compiler: gcc
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test']
+          packages: ['g++-5', 'libegl1-mesa-dev', 'libgles2-mesa-dev', 'libwayland-dev',  'libx11-xcb-dev',  'libx11-dev',  'libgbm-dev']
+      env: MYCC=gcc-5 MYCXX=g++-5
+
+    - compiler: clang
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.8']
+          packages: ['clang-3.8', 'libegl1-mesa-dev', 'libgles2-mesa-dev', 'libwayland-dev',  'libx11-xcb-dev',  'libx11-dev',  'libgbm-dev']
+      env: MYCC=clang-3.8 MYCXX=clang++-3.8
 
 # Build steps
 script:
   - mkdir build
   - cd build
-  - cmake -DKMSXX_ENABLE_KMSCUBE=1 -DKMSXX_ENABLE_PYTHON=1 .. && make
+  - CC=$MYCC CXX=$MYCXX cmake -DKMSXX_ENABLE_KMSCUBE=1 -DKMSXX_ENABLE_PYTHON=1 .. && make