• 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            - scons
31
32
33before_install:
34    - export PATH=$HOME/.local/bin:$HOME/protobuf/bin:$PATH
35    - export MAKEFLAGS=-j$(nproc)
36    - $CC --version
37    - $CXX --version
38    - python --version
39    - lsb_release -a
40
41# Seems to be issues with concurrent builds
42#cache:
43#    directories:
44#        - $HOME/protobuf
45
46# Rather then compile protobuf 3 from source, use the binaries now available
47# to speed up build time and reduce surprises until Ubuntu adds protobuf3
48# packages to the repository.
49install:
50    - mkdir -p $HOME/protobuf && pushd $HOME/protobuf
51      && curl -LO 'https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip'
52      && unzip protoc-3.4.0-linux-x86_64.zip
53      && popd
54    - curl -L 'https://github.com/google/protobuf/releases/download/v3.4.0/protobuf-python-3.4.0.tar.gz' | tar xzf -
55      && pushd protobuf-3.4.0/python
56      && python setup.py build && python setup.py install
57      && popd
58
59script:
60    - pushd generator/proto && make && popd
61    - pushd tests && scons CC=$CC CXX=$CXX && popd
62