Added clang-5 and gcc-7 Travis build configurations.
authorDan Fandrich <dan@coneharvesters.com>
Tue, 28 Aug 2018 14:52:53 +0000 (16:52 +0200)
committerDan Fandrich <dan@coneharvesters.com>
Tue, 28 Aug 2018 15:42:12 +0000 (17:42 +0200)
.travis.yml

index 2d2b8c6..610d335 100644 (file)
@@ -11,6 +11,7 @@ addons:
     - autopoint
 
 env:
+  # More configurations are configured in the matrix section
   matrix:
     - CONFIG=normal
     - CONFIG=c90
@@ -18,12 +19,39 @@ env:
   global:
     - MAKEFLAGS='-j 2'
 
+matrix:
+  include:
+  - os: linux
+    addons:
+      apt:
+        sources:
+          - llvm-toolchain-trusty-5.0
+        packages:
+          - autopoint
+          - clang-5.0
+    compiler: clang
+    env:
+      - CONFIG=clang5
+  - os: linux
+    addons:
+      apt:
+        sources:
+          - ubuntu-toolchain-r-test
+        packages:
+          - autopoint
+          - g++-7
+    compiler: gcc
+    env:
+      - CONFIG=gcc7
+
 script:
   # Ensure brew gettext is in the PATH so autopoint is found on OS X
   - PATH="$PATH:/usr/local/opt/gettext/bin" autoreconf -sivf
   - if [ "$CONFIG" = "normal" ] ; then CFLAGS='-Wall -Wextra -O3'; fi
   - if [ "$CONFIG" = "c90" ] ; then CFLAGS='-std=iso9899:1990 -D_XOPEN_SOURCE=500 -Wall -Wextra -O3'; fi
   - if [ "$CONFIG" = "stackprotect" ] ; then CFLAGS='-g -O0 -fstack-protector-all'; fi
+  - if [ "$CONFIG" = "clang5" ] ; then CFLAGS='-Wall -Wextra -O3'; export CC=clang-5.0; fi
+  - if [ "$CONFIG" = "gcc7" ] ; then CFLAGS='-Wall -Wextra -O3'; export export CC=gcc-7; fi
   - ./configure --prefix="${HOME}" CFLAGS="$CFLAGS" || { tail -300 config.log; false; }
   - make
   - make check