travis: Only add the sonarcloud addon for that build
[strongswan.git] / .travis.yml
1 language: c
2
3 sudo: required
4 dist: trusty
5
6 compiler:
7   - gcc
8   - clang
9
10 before_install:
11   - travis_retry ./scripts/test.sh deps
12   - travis_retry ./scripts/test.sh pydeps
13
14 before_script:
15   - sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 || true
16
17 script:
18   - ./scripts/test.sh
19
20 after_success:
21   if [ "$TEST" == "coverage" ]; then
22     bash <(curl -s https://codecov.io/bash);
23   fi
24
25 after_failure:
26   - cat config.log
27
28 env:
29   global:
30     - TESTS_REDUCED_KEYLENGTHS=yes
31     - LEAK_DETECTIVE=no
32     - MONOLITHIC=no
33   matrix:
34     - TEST=default
35     - TEST=default MONOLITHIC=yes
36     - TEST=default LEAK_DETECTIVE=yes
37     - TEST=botan
38     - TEST=botan LEAK_DETECTIVE=yes
39     - TEST=openssl
40     - TEST=openssl LEAK_DETECTIVE=yes
41     - TEST=gcrypt
42     - TEST=gcrypt LEAK_DETECTIVE=yes
43     # we can't test Vstr as negative int args are not properly passed to CBs
44     - TEST=printf-builtin
45     - TEST=printf-builtin LEAK_DETECTIVE=yes
46     - TEST=all
47     - TEST=all MONOLITHIC=yes
48     - TEST=all LEAK_DETECTIVE=yes
49
50 matrix:
51   include:
52     - compiler: gcc
53       env: TEST=dist
54     - compiler: gcc
55       env: TEST=apidoc
56     - compiler: gcc
57       env: TEST=coverage
58     - compiler: gcc
59       env: TEST=sonarcloud
60       git:
61         depth: false
62       addons:
63         sonarcloud:
64           organization: "strongswan"
65     - compiler: gcc
66       env: TEST=win64 MONOLITHIC=yes
67     # this does not work on 14.04 due to a missing @4 decoration for
68     # TryAcquireSRWLockExclusive in MinGW 3.1.0
69     - compiler: gcc
70       env: TEST=win32 MONOLITHIC=yes
71       dist: precise
72     - compiler: clang
73       env: TEST=fuzzing MONOLITHIC=yes
74     - compiler: clang
75       os: osx
76       env: TEST=osx