summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 807234bb809e6dc681e9650a0e2d009f862cafcc (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
dist: xenial
sudo: required

language: c
compiler: gcc
os: linux

env:
  global:
    - NUM_THREADS=4
    # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
    #   via the "travis encrypt" command using the project repo's public key
    - secure: "jDJjgRpAzAUYfnYhE5Y01OZcIiuAvrG/M14VuESjnoOWja/vkFa/Eg2t4ZY/rQXIGkMhCdjXttdQWLgy+00htVtGQmCAM42FnpeCak1Ln4qnIbudThAgRkS77kJLaSNfW+DahKP0RKv/GtNf3p0WwLBBA2ji3h7Mcz1kMz6UhTE="

before_install:
  - test "${TRAVIS_BRANCH}" != 'coverity_scan' -o "${TRAVIS_JOB_NUMBER##*.}" = '1' || exit 0
  - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
  - |
     sudo systemctl stop apt-daily.service &&
     sudo systemctl kill --kill-who=all apt-daily.service &&
     while ! (systemctl list-units --all apt-daily.service | fgrep -q dead) ; do
       sleep 1
     done
  - pip install --user cpp-coveralls
  - sudo apt-get -qq update
  - sudo apt-get install -y build-essential
  - sudo apt-get install -y autoconf
  - sudo apt-get install -y automake
  - sudo apt-get install -y libtool
  - sudo apt-get install -y m4 
  - sudo apt-get install -y lcov
  - sudo apt-get install -y perl
  - sudo apt-get install -y pkg-config
  - sudo apt-get install -y libdrm-dev
  - sudo apt-get install -y autoconf
  - sudo apt-get install -y libegl1-mesa-dev
  - sudo apt-get install -y libgl1-mesa-dev
  - sudo apt-get install -y libwayland-dev
  - sudo apt-get install -y libx11-dev
  - sudo apt-get install -y libxext-dev
  - sudo apt-get install -y libxfixes-dev
  - sudo apt-get install -y intel-gpu-tools
 
install:
  - git clone https://github.com/intel/libva.git
  - (cd libva && ./autogen.sh && ./configure --prefix=/usr && sudo make install)

addons:
  coverity_scan:
    project:
      name: "intel/intel-vaapi-driver"
      description: "Build submitted via Travis CI"
    notification_email: intel-media-security@lists.01.org
    build_command_prepend: "./autogen.sh; ./configure --prefix=/usr"
    build_command:   "make -j4"
    branch_pattern: coverity_scan

script:
  - if [[ "${COVERITY_SCAN_BRANCH}" == 1 ]];
      then
        echo "Don't build on coverty_scan branch.";
        exit 0;
    fi
  - ./autogen.sh
  - ./configure --prefix=/usr
  - make -j4 ; sudo make install
  - make check

after_success:
        - coveralls --exclude lib --exclude tests --gcov-options '\-lp'

notifications:
# Emails are sent to the committer's git-configured email address by default,
# but only if they have access to the repository.  To enable Travis on your
# public project, just go to travis-ci.org and flip the switch on for
# your project.  To configure your git email address, use:
#     git config --global user.email me@example.com
  email:
    on_success: always
    on_failure: always

# Slack notifications
#
  slack: intel-media:p0wZO3fWJ1ouSsF0RNKbOl5G

# IRC notifications disabled by default.
# Uncomment next 5 lines to send notifications to chat.freenode.net#caffe
#   irc:
#     channels:
#       - "chat.freenode.net#intel-media"
#     template:
#       - "%{repository}/%{branch} (%{commit} - %{author}): %{message}"