6b8db516867dd18a3fd50dbe95dacc61bcfc91a1
[apps/agl-service-can-low-level.git] / .travis.yml
1 # Travis CI has no ability to handle 3 langauges (c, c++, python)
2 # and it overrides $CC/$CXX if language is set to c/c++ (only one, not both).
3 #
4 # Set language to python since at least the result of that is something useful.
5 language: python
6
7 python:
8     - "2.7"
9     - "3.4"
10
11 # Manage the C/C++ compiler manually
12 env:
13     - CC=gcc     CXX=g++
14     - CC=gcc-4.8 CXX=g++-4.8
15     - CC=gcc-4.9 CXX=g++-4.9
16     - CC=gcc-5   CXX=g++-5
17     - CC=clang   CXX=clang++
18
19 addons:
20     apt:
21         sources:
22             - ubuntu-toolchain-r-test
23         packages:
24             - gcc-4.8
25             - g++-4.8
26             - gcc-4.9
27             - g++-4.9
28             - gcc-5
29             - g++-5
30
31
32 before_install:
33     - export PATH=$HOME/.local/bin:$HOME/protobuf/bin:$PATH
34     - export MAKEFLAGS=-j$(grep processor /proc/cpuinfo | wc -l)
35     - $CC --version
36     - $CXX --version
37     - python --version
38     - lsb_release -a
39
40 # Seems to be issues with concurrent builds
41 #cache:
42 #    directories:
43 #        - $HOME/protobuf
44
45 install:
46     - pip install protobuf
47     - test \! -d $HOME/protobuf
48       && curl -L https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.bz2 | tar xjf -
49       && pushd protobuf-2.6.1
50       && ./configure --prefix=$HOME/protobuf && make && make install
51       && popd
52       || true # True if test is false as the cache exists
53
54 script:
55     - pushd generator/proto && make && popd
56     - pushd tests && python2 $(which scons) CC=$CC CXX=$CXX && popd