summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: b56d69436f3fad98ff5a2339a4b678e1bd09831c (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
sudo: required
dist: trusty
cache: ccache

language:
  - c++
# - objective-c

os:
  - linux
  - osx

compiler:
  - gcc
  - clang

env:
  - |
    ANALYZE=false
    DOC=false

matrix:
  include:
    os: linux
    compiler: clang
    env: ANALYZE=true DOC=true

branches:
  only:
  - master
  - branch-1.3
  - /^feature-.*/
  - /^fix-.*/
  - /^issue-.*/
  - /^str-.*/

before_script:
  - |
    if [ $TRAVIS_OS_NAME == linux ]; then
       sudo apt-get update -q
       sudo apt-get install -y libxinerama-dev libxcursor-dev libasound2-dev
       sudo apt-get install -y doxygen
    elif [ $TRAVIS_OS_NAME == osx ]; then
      brew install ccache # need to install on OSX
      export PATH="/usr/local/opt/ccache/libexec:$PATH"
      brew install doxygen
    fi

script:
  - |
   if [ $ANALYZE = "false" ]; then
     autoconf
     ./configure
     make
     mkdir cmake-build
     cd cmake-build
     cmake -G "Unix Makefiles" ..
     make
   else
     mkdir scan-build
     cd scan-build
     scan-build cmake -G "Unix Makefiles" ..
     scan-build -v make
   fi

after_success:
  - |
    if [ $DOC = "true" ]; then
      doxygen --version
      cd documentation
      make html
      cd -
    fi

# explicit email notifications don't play well with forks: don't use them
# default: committer and author get notifications
# we're now using defaults for everything, hence settings are commented
# out, left only for documentation purposes...

#notifications:
#  email:
#    on_success: change # default: change, may be: never
#    on_failure: always # default: always