• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
5language: python
6
7python:
8    - "2.7"
9    - "3.4"
10
11# Manage the C/C++ compiler manually
12env:
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
19addons:
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
32before_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
45install:
46    - curl -L https://github.com/google/protobuf/releases/download/v3.0.0-beta-1/protobuf-python-3.0.0-alpha-4.tar.gz | tar xzf -
47      && pushd protobuf-3.0.0-alpha-4
48      && ./configure --prefix=$HOME/protobuf && make && make install
49      && pushd python && python setup.py build && python setup.py install && popd
50      && popd
51
52script:
53    - pushd generator/proto && make && popd
54    - pushd tests && python2 $(which scons) CC=$CC CXX=$CXX && popd
55