travis: rewrite config file.
Uses CXXFLAGS -O2 instead of default flags to speed up self checking. Testing is done with the following settings: 1) gcc CXXFLAGS=-O2 2) gcc CXXFLAGS=-O2 SRCDIR=build VERIFY=1 3) gcc CXXFLAGS=-O2 MAKEFLAGS="HAVE_RULES=yes" 4) gcc CXXFLAGS=-O2 SRCDIR=build VERIFY=1 MAKEFLAGS="HAVE_RULES=yes" 5) clang CXXFLAGS=-O2 6) clang CXXFLAGS=-O2 SRCDIR=build VERIFY=1 7) clang CXXFLAGS=-O2 MAKEFLAGS="HAVE_RULES=yes" 8) clang CXXFLAGS=-O2 SRCDIR=build VERIFY=1 MAKEFLAGS="HAVE_RULES=yes" Changes made to before_install: installe libpcre3 Changes made to script: * make and make test are now called seperately * cppcheck also checks "build" folder (created by SRCDIR=build) if existing. * gui is built twice, one time with HAVE_RULES=yes as qmake argument and one time without it. * a script has been added and run which returns false if cppcheck --showtime=top5 does not return 7 lines indicating that something is broken
This commit is contained in:
parent
f6c7be91a9
commit
0cfd60aa34
41
.travis.yml
41
.travis.yml
|
@ -2,30 +2,55 @@ language: cpp
|
|||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
env:
|
||||
global:
|
||||
# unfortunately we need this to stay within 50min timelimit given by travis.
|
||||
# this also turns off the debug/warning cxxflags
|
||||
- CXXFLAGS=-O2
|
||||
matrix:
|
||||
- MAKEFLAGS="HAVE_RULES=yes" SRCDIR=build VERIFY=1
|
||||
- SRCDIR=build VERIFY=1
|
||||
- MAKEFLAGS="HAVE_RULES=yes"
|
||||
-
|
||||
before_install:
|
||||
# install needed deps
|
||||
- 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
|
||||
- sudo apt-get install -qq python-pygments libqt4-core libqt4-gui libqt4-dev qt4-dev-tools qt4-qmake libxml2-utils libpcre3
|
||||
script:
|
||||
- mkdir build
|
||||
- make test SRCDIR=build VERIFY=1 -j 4
|
||||
- ./cppcheck --error-exitcode=1 -Ilib --enable=style --suppress=duplicateBranch cli gui lib -igui/test
|
||||
# compile cppcheck, default build
|
||||
- make -j4
|
||||
- make test -j4
|
||||
- ./cppcheck --error-exitcode=1 -Ilib --enable=style --suppress=duplicateBranch cli gui lib build -igui/test
|
||||
# compile gui
|
||||
- cd gui
|
||||
- qmake
|
||||
- make -j 4
|
||||
- make -j4
|
||||
- git clean -dfx .
|
||||
# can't set this as env flags, so try again with HAVE_RULES=yes
|
||||
- qmake HAVE_RULES=yes
|
||||
- make -j4
|
||||
- cd ../
|
||||
# check htmlreport stuff
|
||||
- ./htmlreport/test_htmlreport.py
|
||||
- cd htmlreport
|
||||
- ./check.sh
|
||||
- cd ../
|
||||
# check if DESTDIR works TODO: actually execute this
|
||||
- mkdir install_test
|
||||
- make DESTDIR=install_test install
|
||||
- make clean
|
||||
- make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes -j 4
|
||||
- sudo make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes install
|
||||
# rm everything
|
||||
- git clean -dfx
|
||||
# check what happens if we want to install it to some other dir,
|
||||
- make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg -j 4
|
||||
- sudo make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg install
|
||||
- sudo mkdir -p /usr/share/cppcheck/cfg
|
||||
- sudo install -D ./cfg/* -t /usr/share/cppcheck/cfg
|
||||
# check if it actually works:
|
||||
- /usr/bin/cppcheck ./cli
|
||||
# check if reduce tool compiles
|
||||
- make reduce -j 4
|
||||
# check if showtime=top5 works
|
||||
- ./tools/test_showtimetop5.sh
|
||||
notifications:
|
||||
irc:
|
||||
channels:
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
if [[ "`./cppcheck --showtime=top5 cli/cmdlineparser.h --quiet | wc -l`" != 7 ]] ; then
|
||||
false
|
||||
fi
|
Loading…
Reference in New Issue