summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 3e5ee0d44aa880613f617492da15260e6a04d718 (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
# Travis CI configuration for libseccomp

# https://docs.travis-ci.com/user/trusty-ci-environment
# https://wiki.ubuntu.com/Releases

dist: trusty
sudo: false

notifications:
  email:
    on_success: always
    on_failure: always

language: c
compiler:
  - gcc

addons:
  apt:
    packages:
      - build-essential
      - python
      - python-dev
      - python-pip
      - valgrind
      - clang
      - lcov

# resolve any remaining dependency issues
before_install:
  # ubuntu 14.04 (trusty) has an old version of cython
  - pip install cython
  # see https://github.com/eddyxu/cpp-coveralls
  - pip install cpp-coveralls

# perform the build and fail immediately on error
install:
  - ./autogen.sh
  - ./configure --enable-python
  - make check-build

# run all of the tests independently, fail if any of the tests error
script:
  - make check
  - LIBSECCOMP_TSTCFG_TYPE=live make -C tests check
  # ubuntu 14.04 (trusty) clang has problems with the cython generated code
  - make clean && ./configure && scan-build make
  # limit the code coverage tests to the native/c code
  - make clean && ./configure --enable-code-coverage &&
    LIBSECCOMP_TSTCFG_TYPE=basic make check-code-coverage &&
    LIBSECCOMP_TSTCFG_TYPE=bpf-sim make check-code-coverage

after_success:
  # https://github.com/eddyxu/cpp-coveralls/blob/master/README.md
  - coveralls --gcov-options '\-lp' --exclude tests --exclude tools