From 9c59600b9fa39699c754ca94ead28732d36ba87c Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 27 Dec 2016 15:23:58 -0700 Subject: [PATCH 1/5] Add OSX to OS matrix --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index f3db01df..3f815249 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,9 @@ language: cpp + +os: + - linux + - osx + compiler: - gcc env: From 2431362e542a42b101425cd21fd3f3e43596027b Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 27 Dec 2016 15:50:53 -0700 Subject: [PATCH 2/5] Simplify OS types for travis --- .travis.yml | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3f815249..fec0442b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,33 @@ language: cpp -os: - - linux - - osx - -compiler: - - gcc -env: - matrix: - - GCC_VER="4.9" - - GCC_VER="5" +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.9 + - g++-5 + +matrix: + include: + - os: linux + sudo: required + env: GCC_VER="4.9" + compiler: gcc + - os: linux + sudo: required + env: + - GCC_VER="5" + - CPPCHECK=1 + - COVERAGE=1 + - FUZZY_CMD="-D RUN_FUZZY_TESTS:BOOL=TRUE" + compiler: gcc + - os: osx + compiler: clang + + +env: global: - secure: eiaR6pXiiEpyB8+LLQ1NvZdl0Yylru1BLy9lMoHl+IpUNGGQGywmW/2WAn77rFfmR1OPA2qWQLfgPwgK0HxUA9HHlot9tre5QhiN2Lw8NOT8tCZ6tTm2+QntDBjBGJyal/knRvQkn/6qs6GxlXRerz4ArnnuPL1vESt3zwB0YtU= # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created @@ -18,17 +35,12 @@ env: before_install: - export CXX="g++-$GCC_VER" CC="gcc-$GCC_VER" GCOV="gcov-$GCC_VER" - - if [ "$GCC_VER" = "5" ]; then export COVERAGE=1 CPPCHECK=1; fi - - if [ ${COVERAGE} = 1 ]; then export FUZZY_CMD="-D RUN_FUZZY_TESTS:BOOL=TRUE"; fi - - sudo pip install cpp-coveralls - - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - - sudo apt-get update - - sudo apt-get install -qq g++-$GCC_VER + - pip install --user cpp-coveralls script: - - if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then cmake -D ENABLE_COVERAGE:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=Debug $FUZZY_CMD . ; fi - - if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then make -j2 ; fi - - make test + - cmake -D ENABLE_COVERAGE:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=Debug $FUZZY_CMD . + - cmake --build . -- -j2 + - ctest - if [ ${COVERAGE} = 1 ]; then bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -x $GCOV -a "-s `pwd`" ; fi after_script: From 037335a0eaec65a9b977f3e0140a9e6ef977b0f7 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 27 Dec 2016 16:02:55 -0700 Subject: [PATCH 3/5] Don't require sudu on linux for travis.yml --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index fec0442b..797d91dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,11 +12,11 @@ addons: matrix: include: - os: linux - sudo: required + sudo: false env: GCC_VER="4.9" compiler: gcc - os: linux - sudo: required + sudo: false env: - GCC_VER="5" - CPPCHECK=1 @@ -34,7 +34,7 @@ env: - secure: "LfolGjP8tWm3yAwthfu3yp8Zn40aueFae580UUR34gusG87cyglq2tQDtxdy+63gWEeNfArbv9n5rZv+bDW3ggHyPjuCKKc1PlZAy07lfXUXf1uz+SFhNvNoYTn3mQG3VZ08o116p4Le2p8yqu4bylJ8wckEq7PrTwvSGVQWTWM=" before_install: - - export CXX="g++-$GCC_VER" CC="gcc-$GCC_VER" GCOV="gcov-$GCC_VER" + - if [ "${GCC_VER}" != "" ]; then export CXX="g++-$GCC_VER" CC="gcc-$GCC_VER" GCOV="gcov-$GCC_VER" ; fi - pip install --user cpp-coveralls script: From 89f373d21c3c09c97db9a8341f3c32a724043421 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 27 Dec 2016 16:10:08 -0700 Subject: [PATCH 4/5] Clean up ENV and addons --- .travis.yml | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 797d91dd..58edb5f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,14 @@ addons: packages: - g++-4.9 - g++-5 + coverity_scan: + project: + name: "ChaiScript/ChaiScript" + description: "Build submitted via Travis CI" + notification_email: jason@emptycrate.com + build_command_prepend: "cmake -D ENABLE_COVERAGE:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=Debug . " + build_command: "cmake --build . -- -j2" + branch_pattern: coverity_scan matrix: include: @@ -17,11 +25,7 @@ matrix: compiler: gcc - os: linux sudo: false - env: - - GCC_VER="5" - - CPPCHECK=1 - - COVERAGE=1 - - FUZZY_CMD="-D RUN_FUZZY_TESTS:BOOL=TRUE" + env: GCC_VER="5" compiler: gcc - os: osx compiler: clang @@ -35,6 +39,7 @@ env: before_install: - if [ "${GCC_VER}" != "" ]; then export CXX="g++-$GCC_VER" CC="gcc-$GCC_VER" GCOV="gcov-$GCC_VER" ; fi + - if [ "${GCC_VER}" == "5" ]; then export CPPCHECK=1 COVERAGE=1 FUZZY_CMD="-D RUN_FUZZY_TESTS:BOOL=TRUE" ; fi - pip install --user cpp-coveralls script: @@ -59,15 +64,3 @@ notifications: on_success: change # options: [always|never|change] default: always on_failure: always # options: [always|never|change] default: always on_start: false # default: false - -addons: - coverity_scan: - project: - name: "ChaiScript/ChaiScript" - description: "Build submitted via Travis CI" - notification_email: jason@emptycrate.com - build_command_prepend: "cmake -D ENABLE_COVERAGE:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=Debug . " - build_command: "cmake --build . -- -j2" - branch_pattern: coverity_scan - - From 7a588ed5cf54bc3890497111c99bab128dbf4178 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 27 Dec 2016 17:56:10 -0700 Subject: [PATCH 5/5] Disable cppcheck runs --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58edb5f1..5aee8f05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,8 +48,8 @@ script: - ctest - if [ ${COVERAGE} = 1 ]; then bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -x $GCOV -a "-s `pwd`" ; fi -after_script: - - if [ ${CPPCHECK} = 1 ]; then contrib/codeanalysis/runcppcheck.sh ; fi +#after_script: +# - if [ ${CPPCHECK} = 1 ]; then contrib/codeanalysis/runcppcheck.sh ; fi notifications: