summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 38432f109a14ae560e194b9e592c62b36cc614d8 (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
67
68
69
70
71
# Travis CI configuration for libseccomp

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

dist: xenial
sudo: false

notifications:
  email:
    on_success: always
    on_failure: always

language: c
compiler:
  - gcc

language: python
python:
  - "nightly"

addons:
  coverity_scan:
    project:
      name: "seccomp/libseccomp"
      description: "Build submitted via Travis CI"
    notification_email: paul@paul-moore.com
    build_command_prepend: "./configure; make clean"
    build_command: "make check-build"
    branch_pattern: coverity-scan
  apt:
    packages:
      - build-essential
      - valgrind
      - clang
      - lcov

env:
  global:
    # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
    #   via the "travis encrypt" command using the project repo's public key
    - secure: "k2MNZTt+rn7K1fEHINFDgwXcW1iQ6sUFTRHf74oRrWEpQKAkug5YG3PdS3nJJHmo3//YUk7IFxdSior+ht+1NtqzQwuGQNjspar/dGb2ohqgaqJSzLu23vs16Rjmgg+D3ZF+kAXyQNnE+XSgGqsV+tpE38oXs202ZGDZJ6R8c+xuwKSG+R9Kcn8wLtxnjyc3z9Lx9dNsitpdU21MGEq/HgdLteKRTKBPklnyJZ2ejAhdqL1djwHA5SE2/3GeMiDn/eZLLLclIMd8wZBGqT1Nb0NW/MvwEcz771cekcHAAAQbgwN4532RoBRic52hHNmFrOTZr/3t4+CvNIzHuDt9XljaUngSVOcu7Y3V/Ct11HtfnZwzkww73a33xAp2wnbXXMM6vCjUeAojR5+sQeL8Lr/eyEpDNvAhfIndp5cTs3dNppRggzkuIDFr1Fz5Ydflns5zL0vIOTJZ5pCeL7Yik+0ggoTnPIcqpwMhvsnMuKCVxe1ilrm/cdGLGXJf2mvmFqc44LjI/m+bogXao7vDXGWjyCRbWwmpKX9trwPdW/lKOtmfzhvU3YSiEG0v8BStLCiMN6SXj+mJkL01EDSonffXbH4QFwhtFDGQjNUcFr0Vt8gFWN1sMr2w30D79kDiowqWAqMYHzHMOqZF1zxyL3as1yqEXjyrPrjFPg2rHqw="

# resolve any remaining dependency issues
before_install:
  # assume the distro 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

# NOTE: the coverity_scan plugin runs between "install" and "script"

# run all of the tests independently, fail if any of the tests error
script:
  - ./configure --enable-python
  - make check-build
  - LIBSECCOMP_TSTCFG_STRESSCNT=5 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 --status-bugs make

after_success:
  # limit the code coverage tests to the 'test-code-coverage' target
  - make clean && ./configure --enable-code-coverage && make test-code-coverage
  # https://github.com/eddyxu/cpp-coveralls/blob/master/README.md
  - coveralls --gcov-options '\-lp'
    --exclude tests --exclude tools --exclude src/arch-syscall-check.c