Merge pull request #269 from matthiaskrgr/travis

travis: remove hack to terminate clang kernel jobs early, instead avoid it properly.
This commit is contained in:
Daniel Marjamäki 2014-03-17 13:53:07 +01:00
commit fe94d9b4d5
1 changed files with 12 additions and 5 deletions

View File

@ -1,30 +1,37 @@
language: cpp language: cpp
compiler: compiler:
- gcc - gcc
- clang - clang
env: env:
global: global:
# unfortunately we need this to stay within 50min timelimit given by travis. # unfortunately we need this to stay within 50min timelimit given by travis.
# this also turns off the debug/warning cxxflags # this also turns off the debug/warning cxxflags
- CXXFLAGS="-O2 -Wunreachable-code" - CXXFLAGS="-O2 -Wunreachable-code"
matrix: matrix:
# special CXXFLAGS for maximum speed, overrides global CXXFLAGS CHECK_KERNEL is the var that controlls if we check and clone the kernel in that travis job # special CXXFLAGS for maximum speed, overrides global CXXFLAGS, CHECK_KERNEL is the var that controlls if we download and check the kernel in that travis job
- CXXFLAGS="-O3 -march=native -mtune=native" SRCDIR=build CHECK_KERNEL=yes - CXXFLAGS="-O3 -march=native -mtune=native" SRCDIR=build CHECK_KERNEL=yes
- MAKEFLAGS="HAVE_RULES=yes" SRCDIR=build VERIFY=1 - MAKEFLAGS="HAVE_RULES=yes" SRCDIR=build VERIFY=1
- SRCDIR=build VERIFY=1 - SRCDIR=build VERIFY=1
- -
# do notify immediately about it when a sub-job of a build fails.
matrix: matrix:
# do notify immediately about it when a job of a build fails.
fast_finish: true fast_finish: true
# exclude kernel checking with clang binary, not needed
exclude:
- compiler: clang
env: CXXFLAGS="-O3 -march=native -mtune=native" SRCDIR=build CHECK_KERNEL=yes
before_install: before_install:
# install needed deps # install needed deps
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -qq python-pygments libqt4-core libqt4-gui libqt4-dev qt4-dev-tools qt4-qmake libxml2-utils libpcre3 gdb - sudo apt-get install -qq python-pygments libqt4-core libqt4-gui libqt4-dev qt4-dev-tools qt4-qmake libxml2-utils libpcre3 gdb
script: script:
# download 3.14-rc6 kernel, compile cppcheck, run cppcheck on the kernel to look for crashes in cppcheck. if this is done, terminate build to prevent it from timing out # download 3.14-rc6 kernel, compile cppcheck, run cppcheck on the kernel to look for crashes in cppcheck. if this is done, terminate build to prevent it from timing out
- if [[ "$CHECK_KERNEL" == "yes" ]] && [[ "$CC" == "gcc" ]]; then wget https://www.kernel.org/pub/linux/kernel/v3.x/testing/linux-3.14-rc6.tar.xz; mkdir kernel; tar -xJf linux-3.14-rc6.tar.xz -C kernel & make -j 4 & wait; touch /tmp/kernel.cppcheck; ./cppcheck kernel --max-configs=1 -j 2 |& tee /tmp/kernel.cppcheck; ! grep "process crashed with signal 11" /tmp/kernel.cppcheck; exit; fi - if [[ "$CHECK_KERNEL" == "yes" ]] && [[ "$CC" == "gcc" ]]; then wget https://www.kernel.org/pub/linux/kernel/v3.x/testing/linux-3.14-rc6.tar.xz; mkdir kernel; tar -xJf linux-3.14-rc6.tar.xz -C kernel & make -j 4 & wait; touch /tmp/kernel.cppcheck; ./cppcheck kernel --max-configs=1 -j 2 |& tee /tmp/kernel.cppcheck; ! grep "process crashed with signal 11" /tmp/kernel.cppcheck; exit; fi
# if compiler is clang, exit the build to save travis some resources
- if [[ "$CHECK_KERNEL" == "yes" ]] && [[ "$CC" == "clang" ]]; then exit; fi
# compile cppcheck, default build # compile cppcheck, default build
- make -j4 - make -j4
- make test -j4 - make test -j4
@ -71,6 +78,7 @@ script:
- ./dmake - ./dmake
# now, if dmake modified the makefile, return false! # now, if dmake modified the makefile, return false!
- git diff --exit-code - git diff --exit-code
notifications: notifications:
irc: irc:
channels: channels:
@ -79,4 +87,3 @@ notifications:
- "[%{commit} : %{author}] %{message}" - "[%{commit} : %{author}] %{message}"
- "%{build_url}" - "%{build_url}"
skip_join: true skip_join: true