summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 9ce8ee44101e09931bf868ddfbf76239f9e78d89 (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
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
###########################################################################
language: c
sudo: required

env:
  global:
  - LD_LIBRARY_PATH=/usr/local/lib

addons:
  apt: &common_apt
    config:
      retries: true
    packages: &common_packages
    - cmake
    - valgrind
    - libev-dev
    - libc-ares-dev
    - g++-8
    - libstdc++-8-dev
    - stunnel4
    - libidn2-dev
    - gnutls-bin
    - libgnutls28-dev
    - python-impacket
    - ninja-build
    - pax
    - ncompress

jobs:
  include:
  - env:
    - T=normal C="" CHECKSRC=1
    - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  - env:
    - T=normal C="--disable-verbose" CPPFLAGS="-Wno-variadic-macros" NOTESTS=1
    - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  - env:
    - T=debug
    - &clang OVERRIDE_CC="CC=clang-9" OVERRIDE_CXX="CXX=clang++-9"
    compiler: clang
    addons:
      apt:
        <<: *common_apt
        packages:
        - &clang_packages [*common_packages, clang-9]
  - env:
    - T=debug C="--enable-hsts --disable-alt-svc"
    - *clang
    compiler: clang
    addons:
      apt:
        <<: *common_apt
        packages:
        - *clang_packages
  - env:
    - T=debug C="--with-gnutls --without-ssl"
    - *clang
    compiler: clang
    addons:
      apt:
        <<: *common_apt
        packages:
        - *clang_packages
  - env:
    - T=iconv
    - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  - env:
    - T=torture
    - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
    addons:
      apt:
        <<: *common_apt
        packages:
        - *common_packages
        - lcov
  - env:
    - T=distcheck
    - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
    addons:
      apt:
        <<: *common_apt
        packages:
        - *common_packages
  - env:
    - T=scan-build
    - *clang
    compiler: clang
    addons:
      apt:
        <<: *common_apt
        packages:
        - *clang_packages
  - env:
    - T=debug CFLAGS="-fsanitize=address,undefined,signed-integer-overflow -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g" LDFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer" LIBS="-ldl -lubsan" TFLAGS=-n
    - *clang
    compiler: clang
    addons:
      apt:
        <<: *common_apt
        packages:
        - *clang_packages

before_install:
- export "${OVERRIDE_CC-blank=}"
- export "${OVERRIDE_CXX-blank=}"

install:
- if [ "$T" = "coverage" ]; then pip2 install --user cpp-coveralls; fi

# before_script and script:
# Travis isn't reliable catching errors in inline script commands (#3730).
# Do not add anything here, instead add to the respective script.
before_script:
- ./scripts/travis/before_script.sh || travis_terminate 1
script:
- ./scripts/travis/script.sh || travis_terminate 1

# select branches to avoid testing feature branches twice (as branch and as pull request)
branches:
  only:
  - master
  - /\/ci$/

notifications:
  email: false