aboutsummaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: 48c84b785ac9bda5c040d4591b20a6793567a7d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Use travis docker infrastructure
sudo: false
language: cpp

env:
    global:
        - PREFIX=$HOME/prefix

compiler:
    - gcc
    - clang

# Install a recent gcc and gcov,
# it will not be necessary once travis worker is based on ubuntu > 12.04.
# Install SWIG for bindings generation
# Install valgrind for memcheck tests
addons:
    apt:
        sources:
            - ubuntu-toolchain-r-test
        packages:
            - swig
            - valgrind
            - g++-4.8

install:
    - pip install --user cpp-coveralls; export PATH=$HOME/.local/bin:$PATH
    - wget --directory-prefix $PREFIX/include
              https://raw.github.com/philsquared/Catch/master/single_include/catch.hpp

before_script:
    - if [ "$CC" = "gcc" ]; then export CC=gcc-4.8 CXX=g++-4.8; fi

# how to build
script:
  - ( mkdir build_debug && cd build_debug &&
        cmake -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON .. &&
        make -j &&
        CTEST_OUTPUT_ON_FAILURE=1 make ExperimentalTest ExperimentalMemCheck )
  - ( mkdir build && cd build &&
        cmake -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=../install .. &&
        make -j &&
        CTEST_OUTPUT_ON_FAILURE=1 make test &&
        make install)
  - ( cd skeleton-subsystem &&
        cmake -DCMAKE_INSTALL_PREFIX=../install . &&
        make &&
        make install )

after_success:
    # Push coverage info on coveralls.io.
    # Ignore generated files, samples and tests
    - coveralls
          --exclude "build_debug/bindings/python"
          --exclude "build_debug/CMakeFiles"
          --exclude "build"
          --exclude "skeleton-subsystem"
          --exclude "test/test-subsystem"
          --exclude "bindings/c/Test.cpp"
          --exclude "test/tokenizer"
          --gcov /usr/bin/gcov-4.8
          --gcov-options '\--long-file-names --preserve-paths'

notifications:
  irc:
    - "chat.freenode.net#parameter-framework"