First try at auto-submitting Travis builds to Coverity
[supertux.git] / .travis.yml
1 # Travis-CI configuration file for SuperTuxKart
2 #
3 # Configuration manual:
4 # http://docs.travis-ci.com/user/build-configuration/
5 #
6 # Heavily borrowed from SuperTuxKart's travis.yml.
7 #
8 # SuperTuxKart's travis.yml file can be found here:
9 # https://github.com/supertuxkart/stk-code/blob/master/.travis.yml
10 # License: https://github.com/supertuxkart/stk-code/blob/master/COPYING
11 #
12
13 language: cpp
14
15 compiler:
16  - gcc
17  - clang
18
19 matrix:
20  fast_finish: true
21
22 env:
23  - CMAKE_VERSION=3.1.2 SDL2_VERSION=2.0.3 SDL2IMAGE_VERSION=2.0.0
24  - secure: "E3/UuL338/FVeKbWVBH8RWznD3ntT8BZxX9TDTCwoZFTPluI53Bk0G3MdDBFihFYLeTMfNxxrT2n+EnQtf9a6SrUIo1xFYWV3yKNHwFiS0LKn0IvhofPoRsg+Y190Hgq8djFSEU1Gk4pYATSfRYnAAbVxuL51CumGVBgBkplB0A="
25  
26 before_install:
27  - sudo apt-get update -qq
28  - sudo apt-get install build-essential libogg-dev libvorbis-dev libphysfs-dev libglew-dev libopenal-dev libboost-all-dev
29
30  # Current gcc that supports C++ 11 features
31  - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
32  - sudo apt-get update -qq
33  - if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi
34  - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
35
36  # CMake
37  - wget http://www.cmake.org/files/v3.1/cmake-$CMAKE_VERSION.tar.gz -O - | tar xz
38  - (cd cmake-$CMAKE_VERSION && cmake . && make -j5 && sudo make install)
39
40  # SDL dependencies
41  - wget http://libsdl.org/release/SDL2-$SDL2_VERSION.tar.gz -O - | tar xz
42  - (cd SDL2-$SDL2_VERSION && ./configure --prefix=/usr && make -j5 && sudo make install)
43  - wget http://www.libsdl.org/projects/SDL_image/release/SDL2_image-$SDL2IMAGE_VERSION.tar.gz -O - | tar xz
44  - (cd SDL2_image-$SDL2IMAGE_VERSION && ./configure --prefix=/usr && make -j5 && sudo make install)
45
46 script:
47  # First a debug build:
48 - mkdir build-debug
49 - cd build-debug
50 - cmake .. -DCMAKE_BUILD_TYPE=Debug
51 - make VERBOSE=1 -j $(nproc)
52 # Then a release build:
53 - cd ..
54 - mkdir build-release
55 - cd build-release
56 - cmake .. -DCMAKE_BUILD_TYPE=Release
57 - make VERBOSE=1 -j $(nproc)
58
59 addons:
60   coverity_scan:
61     project:
62       name: "SuperTuxTeam/supertux"
63       description: "Build submitted via Travis CI"
64     notification_email: supertux-commit@lists.lethargik.org
65     build_command_prepend: "cmake . && make clean"
66     build_command:   "make -j 4"
67     branch_pattern: master
68
69 notifications:
70   email:
71     - supertux-commit@lists.lethargik.org