Add GCC7 jobs to Travis (#1054)
authorAndres Noetzli <andres.noetzli@gmail.com>
Fri, 1 Sep 2017 05:25:27 +0000 (22:25 -0700)
committerGitHub <noreply@github.com>
Fri, 1 Sep 2017 05:25:27 +0000 (22:25 -0700)
This commit adds two jobs (debug, with portfolio, test groups 0 and 1) to Travis.
Both jobs are added using matrix.include, based on the example in the documentation:
https://docs.travis-ci.com/user/languages/cpp/#GCC-on-Linux . This
unfortunately requires some code duplication but there does not seem to be a
way to do it in a much better fashion.

.travis.yml

index 58d7e6ac63f4bae4d80ed88f87c2261c8896588c..9726786d2b789d7f79265d6669c44e91c75f7d4c 100644 (file)
@@ -39,12 +39,16 @@ addons:
   - ant-optional
   - cxxtest
   - libreadline-dev
+before_install:
+ - eval "${MATRIX_EVAL}"
 before_script:
  - export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
  - export PATH=$PATH:$JAVA_HOME/bin
  - export JAVA_CPPFLAGS=-I$JAVA_HOME/include
  - ./autogen.sh
 script:
+ - ${CC} --version
+ - ${CXX} --version
  - |
    echo "travis_fold:start:load_script"
    normal="$(echo -e '\033[0m')" red="$normal$(echo -e '\033[01;31m')" green="$normal$(echo -e '\033[01;32m')"
@@ -105,8 +109,32 @@ script:
  - echo; echo "${green}EVERYTHING SEEMED TO PASS!${normal}"
 matrix:
   fast_finish: true
-  # Rule for running Coverity Scan.
   include:
+    # Test with GCC7
+    # Note: TRAVIS_CVC4_JAVA_API_TEST is only active for TEST_GROUP=0 because
+    # test groups only apply to regression tests (no need to repeat the Java
+    # tests for both groups).
+    - addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+          packages:
+            - *common_deps
+            - g++-7
+      env:
+        - MATRIX_EVAL='CC=gcc-7 && CXX=g++-7'
+        - TRAVIS_CVC4=yes TRAVIS_CVC4_CHECK_PORTFOLIO=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_JAVA_API_TEST=yes TRAVIS_CVC4_CONFIG='debug --enable-language-bindings=java,c --with-lfsc --with-portfolio --enable-gpl' TEST_GROUP=0
+    - addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+          packages:
+            - *common_deps
+            - g++-7
+      env:
+        - MATRIX_EVAL='CC=gcc-7 && CXX=g++-7'
+        - TRAVIS_CVC4=yes TRAVIS_CVC4_CHECK_PORTFOLIO=yes TRAVIS_WITH_LFSC=yes TRAVIS_CVC4_CONFIG='debug --enable-language-bindings=java,c --with-lfsc --with-portfolio --enable-gpl' TEST_GROUP=1
+    # Rule for running Coverity Scan.
     - os: linux
       compiler: gcc
       env:
@@ -128,6 +156,7 @@ matrix:
           branch_pattern: coverity_scan
       after_failure:
         - cat /home/travis/build/CVC4/CVC4/cov-int/build-log.txt
+
 notifications:
   email:
     on_success: change