mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-08 01:36:54 +08:00
Add travis support for testing with cppcheck
This commit is contained in:
parent
96acf5e833
commit
611692646f
40
.travis.yml
40
.travis.yml
@ -1,22 +1,34 @@
|
||||
language: cpp
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
- gcc
|
||||
before_install:
|
||||
- sudo apt-get install libboost-dev libboost-all-dev
|
||||
- sudo pip install cpp-coveralls
|
||||
script:
|
||||
- cmake -D ENABLE_COVERAGE:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=Debug .
|
||||
- make -j2
|
||||
- make test
|
||||
- mkdir gcov
|
||||
- find CMakeFiles/ -name "*.gc*" -exec mv {} gcov/ \;
|
||||
- $GCOV -d -o gcov gcov/*.gcda
|
||||
- coveralls -n -E ".*\.cpp"
|
||||
- sudo apt-get install libboost-dev libboost-all-dev
|
||||
- sudo pip install cpp-coveralls
|
||||
script:
|
||||
- cmake -D ENABLE_COVERAGE:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=Debug .
|
||||
- make -j2
|
||||
- make test
|
||||
- mkdir gcov
|
||||
- find CMakeFiles/ -name "*.gc*" -exec mv {} gcov/ \;
|
||||
- gcov -d -o gcov gcov/*.gcda
|
||||
- coveralls -n -E ".*\.cpp"
|
||||
after_script:
|
||||
- pushd ..
|
||||
- wget http://sourceforge.net/projects/cppcheck/files/cppcheck/1.64/cppcheck-1.64.tar.bz2
|
||||
- tar -xvf cppcheck-1.64.tar.bz2
|
||||
- cd cppcheck-1.64
|
||||
- make -j2
|
||||
- popd
|
||||
- ../cppcheck-1.64/cppcheck --enable=all --inconclusive -I include --inline-suppr --std=c++11 --platform=unix64 src/main.cpp src/chai*.cpp --template ' - __{severity}__: [{file}:{line}](../blob/TRAVIS_COMMIT/{file}#L{line}) {message} ({id})' 2>output
|
||||
- sed -i "s/TRAVIS_COMMIT/${TRAVIS_COMMIT}/g" output && echo -n '{ "body": " ' > output.json
|
||||
- echo -n `awk '{printf "%s\\\\n", $0;}' output` >> output.json && echo -n '"}' >> output.json
|
||||
- curl -H "Authorization: token ${TOKEN}" --request POST --data @output.json https://api.github.com/repos/ChaiScript/ChaiScript/commits/${TRAVIS_COMMIT}/comments
|
||||
notifications:
|
||||
recipients:
|
||||
- jason@emptycrate.com
|
||||
- jason@emptycrate.com
|
||||
email:
|
||||
on_success: always
|
||||
on_failure: always
|
||||
|
||||
env:
|
||||
global:
|
||||
secure: LCUAKUCRtFp2ak81nVLR+jx0C9+Drwx1OR4VzuvH+HNGWFdUZmAIV3R84euDqFC5cUhYYipaeMbiSOJUHE4MNlL58eQZryED6KSL7k7SgxOLpFSspMvuMjIYZLlBWpBneCR/EMDilu+zXEnASfVUMPuLmtY1GAyfSoZboqFProc=
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user