.travis.yml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. #
  10. # This software is licensed as described in the file COPYING, which
  11. # you should have received as part of this distribution. The terms
  12. # are also available at https://curl.haxx.se/docs/copyright.html.
  13. #
  14. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. # copies of the Software, and permit persons to whom the Software is
  16. # furnished to do so, under the terms of the COPYING file.
  17. #
  18. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. # KIND, either express or implied.
  20. #
  21. ###########################################################################
  22. language: c
  23. sudo: required
  24. cache:
  25. directories:
  26. - $HOME/wolfssl-4.4.0-stable
  27. - $HOME/mesalink-1.0.0
  28. - $HOME/nghttp2-1.39.2
  29. env:
  30. global:
  31. - LD_LIBRARY_PATH=/usr/local/lib
  32. addons:
  33. apt:
  34. config:
  35. retries: true
  36. sources: &common_sources
  37. - ubuntu-toolchain-r-test
  38. packages: &common_packages
  39. - cmake
  40. - gcc-8
  41. - valgrind
  42. - libev-dev
  43. - libc-ares-dev
  44. - g++-8
  45. - libstdc++-8-dev
  46. - stunnel4
  47. - libidn2-0-dev
  48. - gnutls-bin
  49. - python-impacket
  50. matrix:
  51. include:
  52. - os: linux
  53. compiler: gcc
  54. dist: trusty
  55. env:
  56. - T=normal C="--with-gssapi --with-libssh2" CHECKSRC=1
  57. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  58. addons:
  59. apt:
  60. sources:
  61. - *common_sources
  62. packages:
  63. - *common_packages
  64. - krb5-user
  65. - libssh2-1-dev
  66. - os: linux
  67. compiler: gcc
  68. dist: trusty
  69. env:
  70. - T=normal C=--with-libssh
  71. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  72. addons:
  73. apt:
  74. sources:
  75. - *common_sources
  76. packages:
  77. - *common_packages
  78. - libssh-dev
  79. - os: linux
  80. compiler: gcc
  81. dist: trusty
  82. env:
  83. - T=normal C="--enable-ares"
  84. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  85. - os: linux
  86. compiler: gcc
  87. dist: trusty
  88. env:
  89. - T=normal C="--enable-mqtt"
  90. - os: linux
  91. compiler: gcc
  92. dist: bionic
  93. env:
  94. - T=normal C="--disable-verbose" CPPFLAGS="-Wno-variadic-macros" NOTESTS=1
  95. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  96. addons:
  97. apt:
  98. sources:
  99. - *common_sources
  100. packages:
  101. - *common_packages
  102. - libpsl-dev
  103. - libbrotli-dev
  104. - os: linux
  105. compiler: gcc
  106. dist: bionic
  107. before_install:
  108. # Install and use the current stable release of Go
  109. - gimme --list
  110. - eval "$(gimme stable)"
  111. - gimme --list
  112. env:
  113. - T=novalgrind BORINGSSL=yes C="--with-ssl=$HOME/boringssl" LD_LIBRARY_PATH=/home/travis/boringssl/lib:/usr/local/lib
  114. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  115. addons:
  116. apt:
  117. sources:
  118. - ppa:longsleep/golang-backports
  119. - *common_sources
  120. packages:
  121. - *common_packages
  122. - os: linux
  123. compiler: gcc
  124. dist: bionic
  125. before_install:
  126. # Install and use the current stable release of Go
  127. - gimme --list
  128. - eval "$(gimme stable)"
  129. - gimme --list
  130. env:
  131. - T=novalgrind BORINGSSL=yes QUICHE="yes" C="--with-ssl=$HOME/boringssl --with-quiche=$HOME/quiche/target/release --enable-alt-svc" LD_LIBRARY_PATH=/home/travis/boringssl/lib:$HOME/quiche/target/release:/usr/local/lib
  132. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  133. addons:
  134. apt:
  135. sources:
  136. - *common_sources
  137. packages:
  138. - *common_packages
  139. - libpsl-dev
  140. - libbrotli-dev
  141. - os: linux
  142. compiler: gcc
  143. dist: xenial
  144. env:
  145. - T=novalgrind NGTCP2=yes C="--with-ssl=$HOME/ngbuild --with-ngtcp2=$HOME/ngbuild --with-nghttp3=$HOME/ngbuild --enable-alt-svc" NOTESTS=
  146. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  147. addons:
  148. apt:
  149. sources:
  150. - *common_sources
  151. packages:
  152. - *common_packages
  153. - libpsl-dev
  154. - libbrotli-dev
  155. - os: linux
  156. compiler: gcc
  157. dist: xenial
  158. env:
  159. - T=novalgrind NGTCP2=yes GNUTLS=yes C="PKG_CONFIG_PATH=$HOME/ngbuild --without-ssl --with-gnutls=$HOME/ngbuild --with-ngtcp2=$HOME/ngbuild --with-nghttp3=$HOME/ngbuild --enable-alt-svc" NOTESTS=
  160. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  161. addons:
  162. apt:
  163. sources:
  164. - *common_sources
  165. packages:
  166. - *common_packages
  167. - libpsl-dev
  168. - libbrotli-dev
  169. - autogen
  170. - automake
  171. - autopoint
  172. - bison
  173. - gperf
  174. - libgmp-dev
  175. - libopts25-dev
  176. - libp11-kit-dev
  177. - libtasn1-6-dev
  178. - nettle-dev
  179. - os: linux
  180. compiler: gcc
  181. dist: bionic
  182. env:
  183. - T=debug-wolfssl C="--with-wolfssl --without-ssl"
  184. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  185. addons:
  186. apt:
  187. sources:
  188. - *common_sources
  189. packages:
  190. - *common_packages
  191. - libpsl-dev
  192. - libbrotli-dev
  193. - os: linux
  194. compiler: gcc
  195. dist: bionic
  196. env:
  197. - T=debug-mesalink C="--with-mesalink --without-ssl"
  198. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  199. addons:
  200. apt:
  201. sources:
  202. - *common_sources
  203. packages:
  204. - *common_packages
  205. - libpsl-dev
  206. - libbrotli-dev
  207. - os: linux
  208. compiler: clang
  209. dist: xenial
  210. env:
  211. - T=debug
  212. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  213. addons:
  214. apt:
  215. sources:
  216. - *common_sources
  217. - llvm-toolchain-xenial-7
  218. packages:
  219. - *common_packages
  220. - clang-7
  221. - libpsl-dev
  222. - libbrotli-dev
  223. - os: linux
  224. compiler: clang
  225. dist: xenial
  226. env:
  227. - T=debug C="--enable-alt-svc"
  228. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  229. addons:
  230. apt:
  231. sources:
  232. - *common_sources
  233. - llvm-toolchain-xenial-7
  234. packages:
  235. - *common_packages
  236. - clang-7
  237. - libpsl-dev
  238. - libbrotli-dev
  239. - os: linux
  240. compiler: clang
  241. dist: xenial
  242. env:
  243. - T=debug C="--with-mbedtls --without-ssl"
  244. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  245. addons:
  246. apt:
  247. sources:
  248. - *common_sources
  249. - llvm-toolchain-xenial-7
  250. packages:
  251. - *common_packages
  252. - clang-7
  253. - libpsl-dev
  254. - libbrotli-dev
  255. - libmbedtls-dev
  256. - os: linux
  257. compiler: clang
  258. dist: bionic
  259. env:
  260. - T=debug C="--with-gnutls --without-ssl"
  261. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  262. addons:
  263. apt:
  264. sources:
  265. - *common_sources
  266. - llvm-toolchain-bionic-7
  267. packages:
  268. - *common_packages
  269. - clang-7
  270. - libgnutls28-dev
  271. - libpsl-dev
  272. - libbrotli-dev
  273. - os: linux
  274. compiler: clang
  275. dist: bionic
  276. env:
  277. - T=debug C="--with-nss --without-ssl" NOTESTS=1 CPPFLAGS="-isystem /usr/include/nss"
  278. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  279. addons:
  280. apt:
  281. sources:
  282. - *common_sources
  283. - llvm-toolchain-bionic-7
  284. packages:
  285. - *common_packages
  286. - clang-7
  287. - libnss3-dev
  288. - libpsl-dev
  289. - libbrotli-dev
  290. - os: linux
  291. compiler: gcc
  292. dist: trusty
  293. env:
  294. - T=iconv
  295. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  296. - os: linux
  297. compiler: gcc
  298. dist: bionic
  299. env:
  300. - T=cmake
  301. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  302. addons:
  303. apt:
  304. sources:
  305. - *common_sources
  306. packages:
  307. - *common_packages
  308. - libpsl-dev
  309. - libbrotli-dev
  310. - os: linux
  311. compiler: clang
  312. dist: bionic
  313. env:
  314. - T=cmake
  315. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  316. addons:
  317. apt:
  318. sources:
  319. - *common_sources
  320. - llvm-toolchain-bionic-7
  321. packages:
  322. - *common_packages
  323. - clang-7
  324. - libpsl-dev
  325. - libbrotli-dev
  326. - os: linux
  327. compiler: gcc
  328. dist: xenial
  329. env:
  330. - T=torture
  331. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  332. addons:
  333. apt:
  334. sources:
  335. - *common_sources
  336. packages:
  337. - *common_packages
  338. - lcov
  339. - libpsl-dev
  340. - libbrotli-dev
  341. - libssh2-1-dev
  342. - os: linux
  343. compiler: gcc
  344. dist: bionic
  345. env:
  346. - T=distcheck
  347. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  348. addons:
  349. apt:
  350. sources:
  351. - *common_sources
  352. packages:
  353. - *common_packages
  354. - libpsl-dev
  355. - libbrotli-dev
  356. - os: linux
  357. compiler: clang
  358. dist: bionic
  359. env:
  360. - T=fuzzer
  361. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  362. addons:
  363. apt:
  364. sources:
  365. - *common_sources
  366. - llvm-toolchain-bionic-7
  367. packages:
  368. - *common_packages
  369. - clang-7
  370. - libpsl-dev
  371. - libbrotli-dev
  372. - os: linux
  373. compiler: clang
  374. dist: bionic
  375. env:
  376. - T=tidy
  377. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  378. addons:
  379. apt:
  380. sources:
  381. - *common_sources
  382. - llvm-toolchain-bionic-7
  383. packages:
  384. - *common_packages
  385. - clang-7
  386. - clang-tidy-7
  387. - libpsl-dev
  388. - libbrotli-dev
  389. - os: linux
  390. compiler: clang
  391. dist: bionic
  392. env:
  393. - T=scan-build
  394. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  395. addons:
  396. apt:
  397. sources:
  398. - *common_sources
  399. - llvm-toolchain-bionic-7
  400. packages:
  401. - *common_packages
  402. - clang-7
  403. - libpsl-dev
  404. - libbrotli-dev
  405. - os: linux
  406. compiler: clang
  407. dist: xenial
  408. env:
  409. - 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"
  410. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  411. addons:
  412. apt:
  413. sources:
  414. - *common_sources
  415. - llvm-toolchain-xenial-7
  416. packages:
  417. - *common_packages
  418. - clang-7
  419. - libpsl-dev
  420. - libbrotli-dev
  421. - os: linux
  422. arch: arm64
  423. compiler: gcc
  424. dist: bionic
  425. env:
  426. - T=debug C="--enable-alt-svc"
  427. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  428. addons:
  429. apt:
  430. sources:
  431. - *common_sources
  432. packages:
  433. - *common_packages
  434. - libpsl-dev
  435. - libbrotli-dev
  436. - libev-dev
  437. - libssl-dev
  438. - libtool
  439. - pkg-config
  440. - zlib1g-dev
  441. before_install:
  442. - export "${OVERRIDE_CC-blank=}"
  443. - export "${OVERRIDE_CXX-blank=}"
  444. install:
  445. - if [ "$T" = "coverage" ]; then pip2 install --user cpp-coveralls; fi
  446. # before_script and script:
  447. # Travis isn't reliable catching errors in inline script commands (#3730).
  448. # Do not add anything here, instead add to the respective script.
  449. before_script:
  450. - ./scripts/travis/before_script.sh || travis_terminate 1
  451. script:
  452. - ./scripts/travis/script.sh || travis_terminate 1
  453. # whitelist branches to avoid testing feature branches twice (as branch and as pull request)
  454. branches:
  455. only:
  456. - master
  457. - /\/ci$/
  458. notifications:
  459. email: false