-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
42 lines (37 loc) · 1.16 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
language: cpp
compiler:
- gcc
- clang
cache: apt
# Forces gcc 4.8 for c++11 support
env:
global:
- GCC_VERSION="4.8"
before_install:
# Add gcc 4.8
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo add-apt-repository -y ppa:ubuntu-sdk-team/ppa
- sudo add-apt-repository -y ppa:kalakris/cmake
- sudo apt-get update -qq
- sudo apt-get install -qq cppcheck
- sudo apt-get install -qq liblua5.1-0-dev libboost-all-dev
- sudo apt-get install -qq qtbase5-dev
- sudo apt-get install -qq cmake
# Clang is not system wide. This is a work around.
- $CC --version
- which $CC
- export CC=`which $CC`
install:
- if [ "$CXX" = "g++" ]; then sudo apt-get install -qq "g++-${GCC_VERSION}"; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
- if [ "$CXX" = "clang++" ]; then sudo apt-get install -qq "libstdc++-${GCC_VERSION}-dev"; fi
script:
- cmake -DCMAKE_CXX_COMPILER=$(which $CXX) .
- make -j2
after_script: cppcheck --verbose --enable=all --quiet `git ls-files src/\*.cpp`
notifications:
email:
recipients:
on_success: change
on_failure: always