aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 406420d3a2598e174ea3b11d2d4f400ea22c7ca6 (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
language: c

matrix:
  include:
    - os: osx
      compiler: clang

    - os: linux
      compiler: gcc
      dist: bionic
      addons:
        apt:
          packages:
            - libpcap-dev
            - autogen

    - os: linux
      compiler: clang
      dist: bionic
      addons:
        apt:
          packages:
            - libpcap-dev
            - autogen

    - os: linux
      compiler: gcc
      dist: bionic
      arch: arm64
      addons:
        apt:
          packages:
            - libpcap-dev
            - autogen

    - os: linux
      compiler: clang
      dist: bionic
      arch: arm64
      addons:
        apt:
          packages:
            - libpcap-dev
            - autogen

# Targets below have been disabled as we have no way
# to debug on tsuch platforms at the moment
#    - os: linux
#      compiler: gcc
#      dist: bionic
#      arch: s390x
#      addons:
#        apt:
#          packages:
#            - libpcap-dev
#            - autogen
#
#    - os: linux
#      compiler: clang
#      dist: bionic
#      arch: s390x
#      addons:
#        apt:
#          packages:
#            - libpcap-dev
#            - autogen

    - os: linux
      compiler: gcc-8
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-8
            - libpcap-dev
            - autogen
      env:
        - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"

    - os: linux
      compiler: gcc-9
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-9
            - libpcap-dev
            - autogen
      env:
        - MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"

    - os: linux
      compiler: clang-8
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-trusty-8
          packages:
            - clang-8
            - libpcap-dev
            - autogen
      env:
        - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"

    - os: linux
      compiler: clang-7
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-trusty-7
          packages:
            - clang-7
            - libpcap-dev
            - autogen
      env:
        - MATRIX_EVAL="CC=clang-7 && CXX=clang++-7"

    - name: fuzza
      env: CXXFLAGS="-g -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize=fuzzer-no-link" CFLAGS="-g -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize=fuzzer-no-link" LDFLAGS="-g -fsanitize=address" QA_FUZZ=asan CC=clang-7 && CXX=clang++-7 ASAN_SYMBOLIZER_PATH=/usr/local/clang-7.0.0/bin/llvm-symbolizer
      os: linux
      compiler: clang-7
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-trusty-7
          packages:
            - clang-7
            - libpcap-dev
            - autogen
    - name: fuzzm
      env: CXXFLAGS="-g -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=memory -fsanitize=fuzzer-no-link" CFLAGS="-g -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=memory -fsanitize=fuzzer-no-link" LDFLAGS="-g -fsanitize=memory" QA_FUZZ=msan CC=clang-7 && CXX=clang++-7 MSAN_SYMBOLIZER_PATH=/usr/local/clang-7.0.0/bin/llvm-symbolizer
      os: linux
      compiler: clang-7
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-trusty-7
          packages:
            - clang-7
            - libpcap-dev
            - autogen
    - name: fuzzu
      env: CXXFLAGS="-g -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=undefined -fsanitize=fuzzer-no-link" CFLAGS="-g -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=undefined -fno-sanitize-recover=undefined,integer -fsanitize=fuzzer-no-link" LDFLAGS="-g -fsanitize=undefined" QA_FUZZ=ubsan CC=clang-7 && CXX=clang++-7
      os: linux
      compiler: clang-7
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-trusty-7
          packages:
            - clang-7
            - libpcap-dev
            - autogen


  before_install:
  - eval "${MATRIX_EVAL}"

before_script:
  - ./autogen.sh
#  - lcov --directory . --zerocounters

script:
  - if [ -n "$QA_FUZZ" ]; then ./configure --enable-fuzztargets ; else ./configure ; fi
  - make

#after_script:
  - cd tests
  - ./do.sh

#after_success:
#- cd ${TRAVIS_BUILD_DIR}
#- lcov --directory . --capture --output-file coverage.info # capture coverage info
#- lcov --remove coverage.info 'tests/*' 'packages/*' 'm4/*' 'doc/*' --output-file coverage.info
#- lcov --list coverage.info # debug before upload
#- coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info # uploads to coveralls

notifications:
  email:
    recipients:
      - packager@ntop.org
    on_success: never
    on_failure: always