.travis.yml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  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. before_install:
  300. # Install and use the current stable release of Go (for boringssl)
  301. - gimme --list
  302. - eval "$(gimme stable)"
  303. - gimme --list
  304. env:
  305. - T=cmake BORINGSSL=yes QUICHE=yes C="-DUSE_QUICHE=1 -DOPENSSL_ROOT_DIR=$HOME/boringssl"
  306. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  307. - PKG_CONFIG_PATH="$HOME/quiche/target/release"
  308. addons:
  309. apt:
  310. sources:
  311. - *common_sources
  312. packages:
  313. - *common_packages
  314. - libpsl-dev
  315. - libbrotli-dev
  316. - os: linux
  317. compiler: clang
  318. dist: bionic
  319. env:
  320. - T=cmake NGTCP2=yes C="-DUSE_NGTCP2=ON"
  321. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  322. - PKG_CONFIG_PATH="$HOME/ngbuild/lib/pkgconfig"
  323. addons:
  324. apt:
  325. sources:
  326. - *common_sources
  327. - llvm-toolchain-bionic-7
  328. packages:
  329. - *common_packages
  330. - clang-7
  331. - libpsl-dev
  332. - libbrotli-dev
  333. - os: linux
  334. compiler: gcc
  335. dist: xenial
  336. env:
  337. - T=torture
  338. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  339. addons:
  340. apt:
  341. sources:
  342. - *common_sources
  343. packages:
  344. - *common_packages
  345. - lcov
  346. - libpsl-dev
  347. - libbrotli-dev
  348. - libssh2-1-dev
  349. - os: linux
  350. compiler: gcc
  351. dist: bionic
  352. env:
  353. - T=distcheck
  354. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  355. addons:
  356. apt:
  357. sources:
  358. - *common_sources
  359. packages:
  360. - *common_packages
  361. - libpsl-dev
  362. - libbrotli-dev
  363. - os: linux
  364. compiler: clang
  365. dist: bionic
  366. env:
  367. - T=fuzzer
  368. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  369. addons:
  370. apt:
  371. sources:
  372. - *common_sources
  373. - llvm-toolchain-bionic-7
  374. packages:
  375. - *common_packages
  376. - clang-7
  377. - libpsl-dev
  378. - libbrotli-dev
  379. - os: linux
  380. compiler: clang
  381. dist: bionic
  382. env:
  383. - T=tidy
  384. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  385. addons:
  386. apt:
  387. sources:
  388. - *common_sources
  389. - llvm-toolchain-bionic-7
  390. packages:
  391. - *common_packages
  392. - clang-7
  393. - clang-tidy-7
  394. - libpsl-dev
  395. - libbrotli-dev
  396. - os: linux
  397. compiler: clang
  398. dist: bionic
  399. env:
  400. - T=scan-build
  401. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  402. addons:
  403. apt:
  404. sources:
  405. - *common_sources
  406. - llvm-toolchain-bionic-7
  407. packages:
  408. - *common_packages
  409. - clang-7
  410. - libpsl-dev
  411. - libbrotli-dev
  412. - os: linux
  413. compiler: clang
  414. dist: xenial
  415. env:
  416. - 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"
  417. - OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
  418. addons:
  419. apt:
  420. sources:
  421. - *common_sources
  422. - llvm-toolchain-xenial-7
  423. packages:
  424. - *common_packages
  425. - clang-7
  426. - libpsl-dev
  427. - libbrotli-dev
  428. - os: linux
  429. arch: arm64
  430. compiler: gcc
  431. dist: bionic
  432. env:
  433. - T=debug C="--enable-alt-svc"
  434. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  435. addons:
  436. apt:
  437. sources:
  438. - *common_sources
  439. packages:
  440. - *common_packages
  441. - libpsl-dev
  442. - libbrotli-dev
  443. - libev-dev
  444. - libssl-dev
  445. - libtool
  446. - pkg-config
  447. - zlib1g-dev
  448. before_install:
  449. - export "${OVERRIDE_CC-blank=}"
  450. - export "${OVERRIDE_CXX-blank=}"
  451. install:
  452. - if [ "$T" = "coverage" ]; then pip2 install --user cpp-coveralls; fi
  453. # before_script and script:
  454. # Travis isn't reliable catching errors in inline script commands (#3730).
  455. # Do not add anything here, instead add to the respective script.
  456. before_script:
  457. - ./scripts/travis/before_script.sh || travis_terminate 1
  458. script:
  459. - ./scripts/travis/script.sh || travis_terminate 1
  460. # whitelist branches to avoid testing feature branches twice (as branch and as pull request)
  461. branches:
  462. only:
  463. - master
  464. - /\/ci$/
  465. notifications:
  466. email: false