Using variables for version numbers in travis.yml
[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 env:
20  - CMAKE_VERSION=3.0.1
21  - SDL2_VERSION=2.0.3
22  - SDL2IMAGE_VERSION=2.0.0
23  
24 before_install:
25  - sudo apt-get update -qq
26  - sudo apt-get install build-essential libogg-dev libvorbis-dev libphysfs-dev libglew-dev libopenal-dev libboost-all-dev
27
28  # Current gcc that supports C++ 11 features
29  - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
30  - sudo apt-get update -qq
31  - if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi
32  - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
33
34  # CMake
35  - wget http://www.cmake.org/files/v3.0/cmake-$CMAKE_VERSION.tar.gz -O - | tar xz
36  - (cd cmake-$CMAKE_VERSION && cmake . && make -j5 && sudo make install)
37
38  # SDL dependencies
39  - wget http://libsdl.org/release/SDL2-$SDL2_VERSION.tar.gz -O - | tar xz
40  - (cd SDL2-$SDL2_VERSION && ./configure --prefix=/usr && make -j5 && sudo make install)
41  - wget http://www.libsdl.org/projects/SDL_image/release/SDL2_image-$SDL2IMAGE_VERSION.tar.gz -O - | tar xz
42  - (cd SDL2_image-$SDL2IMAGE_VERSION && ./configure --prefix=/usr && make -j5 && sudo make install)
43
44 script:
45  # First a debug build:
46 - mkdir build-debug
47 - cd build-debug
48 - cmake .. -DCMAKE_BUILD_TYPE=Debug -DCHECK_ASSETS=off
49 - make VERBOSE=1 -j5
50 # Then a release build:
51 - cd ..
52 - mkdir build-release
53 - cd build-release
54 - cmake .. -DCMAKE_BUILD_TYPE=Release -DCHECK_ASSETS=off
55 - make VERBOSE=1 -j5
56
57 notifications:
58   email:
59     - supertux-commit@lists.lethargik.org