.travis.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  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.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. os: linux
  24. dist: bionic
  25. cache:
  26. directories:
  27. - $HOME/wolfssl-4.4.0-stable
  28. - $HOME/mesalink-1.0.0
  29. - $HOME/nghttp2-1.39.2
  30. env:
  31. global:
  32. - LD_LIBRARY_PATH=/usr/local/lib
  33. addons:
  34. apt: &common_apt
  35. config:
  36. retries: true
  37. packages: &common_packages
  38. - cmake
  39. - valgrind
  40. - libev-dev
  41. - libc-ares-dev
  42. - g++-8
  43. - stunnel4
  44. - libidn2-dev
  45. - gnutls-bin
  46. - python-impacket
  47. - ninja-build
  48. jobs:
  49. include:
  50. - env:
  51. - T=normal C="--with-gssapi --with-libssh2" CHECKSRC=1
  52. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  53. addons:
  54. apt:
  55. <<: *common_apt
  56. packages:
  57. - *common_packages
  58. - krb5-user
  59. - libssh2-1-dev
  60. - libbrotli-dev
  61. - libzstd-dev
  62. - env:
  63. - T=normal C=--with-libssh
  64. # Avoid bionic, its pre-release libssh version triggers deprecation warnings.
  65. dist: focal
  66. addons:
  67. apt:
  68. <<: *common_apt
  69. packages:
  70. - cmake
  71. - valgrind
  72. - libev-dev
  73. - libc-ares-dev
  74. - g++-8
  75. - stunnel4
  76. - libidn2-dev
  77. - gnutls-bin
  78. # The above list is common_packages minus impacket.
  79. - libssh-dev
  80. - ninja-build
  81. - env:
  82. - T=normal C="--enable-ares"
  83. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  84. - env:
  85. - T=normal C="--disable-proxy"
  86. - env:
  87. - T=normal C="--disable-verbose" CPPFLAGS="-Wno-variadic-macros" NOTESTS=1
  88. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  89. addons:
  90. apt:
  91. <<: *common_apt
  92. packages:
  93. - *common_packages
  94. - libpsl-dev
  95. - libbrotli-dev
  96. - libzstd-dev
  97. - env:
  98. - T=novalgrind BORINGSSL=yes C="--with-ssl=$HOME/boringssl" LD_LIBRARY_PATH=/home/travis/boringssl/lib:/usr/local/lib
  99. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  100. before_install:
  101. - eval "$(gimme stable)"; gimme --list # Install latest Go (for boringssl)
  102. - env:
  103. - T=novalgrind QUICHE="yes" C="--with-ssl=$HOME/quiche/deps/boringssl/src --with-quiche=$HOME/quiche/target/release" LD_LIBRARY_PATH=$HOME/quiche/target/release:/usr/local/lib
  104. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  105. addons:
  106. apt:
  107. <<: *common_apt
  108. packages:
  109. - *common_packages
  110. - libpsl-dev
  111. - libbrotli-dev
  112. - libzstd-dev
  113. - env:
  114. - T=debug HYPER="yes" C="--with-hyper=$HOME/hyper" LD_LIBRARY_PATH=$HOME/hyper/target/debug:/usr/local/lib TFLAGS="1 to 29"
  115. addons:
  116. apt:
  117. <<: *common_apt
  118. packages:
  119. - *common_packages
  120. - libpsl-dev
  121. - libbrotli-dev
  122. - libzstd-dev
  123. - env:
  124. - T=novalgrind LIBRESSL=yes C="--with-ssl=$HOME/libressl" LD_LIBRARY_PATH=/home/travis/libressl/lib:/usr/local/lib
  125. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  126. - env:
  127. - T=novalgrind NGTCP2=yes C="--with-ssl=$HOME/ngbuild --with-ngtcp2=$HOME/ngbuild --with-nghttp3=$HOME/ngbuild" NOTESTS=
  128. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  129. addons:
  130. apt:
  131. <<: *common_apt
  132. packages:
  133. - *common_packages
  134. - libpsl-dev
  135. - libbrotli-dev
  136. - libzstd-dev
  137. - env:
  138. - 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" NOTESTS=
  139. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  140. addons:
  141. apt:
  142. <<: *common_apt
  143. packages:
  144. - *common_packages
  145. - libpsl-dev
  146. - libbrotli-dev
  147. - libzstd-dev
  148. - autogen
  149. - automake
  150. - autopoint
  151. - bison
  152. - gperf
  153. - libgmp-dev
  154. - libopts25-dev
  155. - libp11-kit-dev
  156. - libtasn1-6-dev
  157. - nettle-dev
  158. - env:
  159. - T=debug-wolfssl C="--with-wolfssl --without-ssl"
  160. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  161. addons:
  162. apt:
  163. <<: *common_apt
  164. packages:
  165. - *common_packages
  166. - libpsl-dev
  167. - libbrotli-dev
  168. - libzstd-dev
  169. - env:
  170. - T=debug OPENSSL3="yes" C="--with-ssl=$HOME/openssl3" LD_LIBRARY_PATH=/home/travis/openssl3/lib:/usr/local/lib TFLAGS="https ftps"
  171. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  172. addons:
  173. apt:
  174. <<: *common_apt
  175. packages:
  176. - *common_packages
  177. - libpsl-dev
  178. - libbrotli-dev
  179. - libzstd-dev
  180. - env:
  181. - T=debug-mesalink C="--with-mesalink --without-ssl" MESALINK=yes
  182. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  183. addons:
  184. apt:
  185. <<: *common_apt
  186. packages:
  187. - *common_packages
  188. - libpsl-dev
  189. - libbrotli-dev
  190. - libzstd-dev
  191. - env:
  192. - T=debug
  193. - &clang OVERRIDE_CC="CC=clang-9" OVERRIDE_CXX="CXX=clang++-9"
  194. compiler: clang
  195. addons:
  196. apt:
  197. <<: *common_apt
  198. packages:
  199. - &clang_packages [*common_packages, clang-9]
  200. - libpsl-dev
  201. - libbrotli-dev
  202. - libzstd-dev
  203. - env:
  204. - T=debug C="--enable-hsts --disable-alt-svc"
  205. - *clang
  206. compiler: clang
  207. addons:
  208. apt:
  209. <<: *common_apt
  210. packages:
  211. - *clang_packages
  212. - libpsl-dev
  213. - libbrotli-dev
  214. - libzstd-dev
  215. - env:
  216. - T=debug C="--with-mbedtls --without-ssl"
  217. - *clang
  218. compiler: clang
  219. addons:
  220. apt:
  221. <<: *common_apt
  222. packages:
  223. - *clang_packages
  224. - libpsl-dev
  225. - libbrotli-dev
  226. - libzstd-dev
  227. - libmbedtls-dev
  228. - env:
  229. - T=debug C="--with-gnutls --without-ssl"
  230. - *clang
  231. compiler: clang
  232. addons:
  233. apt:
  234. <<: *common_apt
  235. packages:
  236. - *clang_packages
  237. - libgnutls28-dev
  238. - libpsl-dev
  239. - libbrotli-dev
  240. - libzstd-dev
  241. - env:
  242. - T=debug C="--with-nss --without-ssl" NOTESTS=1 CPPFLAGS="-isystem /usr/include/nss"
  243. - *clang
  244. compiler: clang
  245. addons:
  246. apt:
  247. <<: *common_apt
  248. packages:
  249. - *clang_packages
  250. - libnss3-dev
  251. - libpsl-dev
  252. - libbrotli-dev
  253. - libzstd-dev
  254. - env:
  255. - T=iconv
  256. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  257. - env:
  258. - T=cmake BORINGSSL=yes QUICHE=yes C="-GNinja -DUSE_QUICHE=1 -DOPENSSL_ROOT_DIR=$HOME/boringssl -DCURL_BROTLI=1 -DCURL_ZSTD=1"
  259. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  260. - PKG_CONFIG_PATH="$HOME/quiche/target/release"
  261. before_install:
  262. - eval "$(gimme stable)"; gimme --list # Install latest Go (for boringssl)
  263. addons:
  264. apt:
  265. <<: *common_apt
  266. packages:
  267. - *common_packages
  268. - libpsl-dev
  269. - libbrotli-dev
  270. - libzstd-dev
  271. - env:
  272. - T=cmake NGTCP2=yes C="-GNinja -DUSE_NGTCP2=ON -DCURL_BROTLI=1 -DCURL_ZSTD=1"
  273. - *clang
  274. - PKG_CONFIG_PATH="$HOME/ngbuild/lib/pkgconfig"
  275. compiler: clang
  276. addons:
  277. apt:
  278. <<: *common_apt
  279. packages:
  280. - *clang_packages
  281. - libpsl-dev
  282. - libbrotli-dev
  283. - libzstd-dev
  284. - env:
  285. - T=torture
  286. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  287. addons:
  288. apt:
  289. <<: *common_apt
  290. packages:
  291. - *common_packages
  292. - lcov
  293. - libpsl-dev
  294. - libbrotli-dev
  295. - libzstd-dev
  296. - libssh2-1-dev
  297. - env:
  298. - T=distcheck
  299. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  300. addons:
  301. apt:
  302. <<: *common_apt
  303. packages:
  304. - *common_packages
  305. - libpsl-dev
  306. - libbrotli-dev
  307. - libzstd-dev
  308. - env:
  309. - T=fuzzer
  310. - *clang
  311. compiler: clang
  312. addons:
  313. apt:
  314. <<: *common_apt
  315. packages:
  316. - *clang_packages
  317. - libpsl-dev
  318. - libbrotli-dev
  319. - libzstd-dev
  320. - env:
  321. - T=tidy
  322. - *clang
  323. compiler: clang
  324. addons:
  325. apt:
  326. <<: *common_apt
  327. packages:
  328. - *clang_packages
  329. - clang-tidy-9
  330. - libpsl-dev
  331. - libbrotli-dev
  332. - libzstd-dev
  333. - env:
  334. - T=scan-build
  335. - *clang
  336. compiler: clang
  337. addons:
  338. apt:
  339. <<: *common_apt
  340. packages:
  341. - *clang_packages
  342. - libpsl-dev
  343. - libbrotli-dev
  344. - libzstd-dev
  345. - env:
  346. - 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
  347. - *clang
  348. compiler: clang
  349. addons:
  350. apt:
  351. <<: *common_apt
  352. packages:
  353. - *clang_packages
  354. - libpsl-dev
  355. - libbrotli-dev
  356. - libzstd-dev
  357. - env:
  358. - T=debug C="" TFLAGS=-n
  359. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  360. arch: arm64
  361. addons:
  362. apt:
  363. <<: *common_apt
  364. packages:
  365. - *common_packages
  366. - libpsl-dev
  367. - libbrotli-dev
  368. - libzstd-dev
  369. - libev-dev
  370. - libssl-dev
  371. - libtool
  372. - pkg-config
  373. - zlib1g-dev
  374. - env:
  375. - T=debug C="" TFLAGS=-n
  376. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  377. arch: ppc64le
  378. addons:
  379. apt:
  380. <<: *common_apt
  381. packages:
  382. - *common_packages
  383. - libpsl-dev
  384. - libbrotli-dev
  385. - libzstd-dev
  386. - libev-dev
  387. - libssl-dev
  388. - libtool
  389. - pkg-config
  390. - zlib1g-dev
  391. - env:
  392. - T=debug C="" TFLAGS=-n
  393. - OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
  394. arch: s390x
  395. addons:
  396. apt:
  397. <<: *common_apt
  398. packages:
  399. - *common_packages
  400. - libpsl-dev
  401. - libbrotli-dev
  402. - libzstd-dev
  403. - libev-dev
  404. - libssl-dev
  405. - libtool
  406. - pkg-config
  407. - zlib1g-dev
  408. before_install:
  409. - export "${OVERRIDE_CC-blank=}"
  410. - export "${OVERRIDE_CXX-blank=}"
  411. install:
  412. - if [ "$T" = "coverage" ]; then pip2 install --user cpp-coveralls; fi
  413. # before_script and script:
  414. # Travis isn't reliable catching errors in inline script commands (#3730).
  415. # Do not add anything here, instead add to the respective script.
  416. before_script:
  417. - ./scripts/travis/before_script.sh || travis_terminate 1
  418. script:
  419. - ./scripts/travis/script.sh || travis_terminate 1
  420. # select branches to avoid testing feature branches twice (as branch and as pull request)
  421. branches:
  422. only:
  423. - master
  424. - /\/ci$/
  425. notifications:
  426. email: false