.travis.yml 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. language: c
  2. sudo: false
  3. cache:
  4. directories:
  5. - $HOME/third-party
  6. osx_image: xcode8
  7. addons:
  8. apt:
  9. packages:
  10. - cmake
  11. - openssl
  12. - libssl-dev
  13. sources:
  14. - kubuntu-backports
  15. before_install:
  16. - cmake --version
  17. install:
  18. - if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
  19. PATH=~/.local/bin:${PATH};
  20. pip install --user --upgrade pip;
  21. pip install --user cpp-coveralls;
  22. fi
  23. before_script:
  24. # Check some settings of the build server
  25. - uname -a
  26. - pwd
  27. # Generate the build scripts with CMake
  28. - mkdir output
  29. - gcc test/cgi_test.c -o output/cgi_test.cgi
  30. - cd output
  31. - cmake --version
  32. - cmake
  33. -G "Unix Makefiles"
  34. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
  35. -DBUILD_SHARED_LIBS=${BUILD_SHARED}
  36. "-DCIVETWEB_THIRD_PARTY_DIR=${HOME}/third-party"
  37. -DCIVETWEB_ENABLE_THIRD_PARTY_OUTPUT=YES
  38. -DCIVETWEB_ENABLE_SSL=${ENABLE_SSL}
  39. -DCIVETWEB_DISABLE_CGI=${NO_CGI}
  40. -DCIVETWEB_SERVE_NO_FILES=${NO_FILES}
  41. -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=${ENABLE_SSL_DYNAMIC_LOADING}
  42. -DCIVETWEB_ENABLE_WEBSOCKETS=${ENABLE_WEBSOCKETS}
  43. -DCIVETWEB_ENABLE_CXX=${ENABLE_CXX}
  44. -DCIVETWEB_ENABLE_IPV6=${ENABLE_IPV6}
  45. -DCIVETWEB_ENABLE_LUA=${ENABLE_LUA}
  46. -DCIVETWEB_ENABLE_LUA_SHARED=${ENABLE_LUA_SHARED}
  47. -DCIVETWEB_ENABLE_DUKTAPE=${ENABLE_DUKTAPE}
  48. -DCIVETWEB_DISABLE_CACHING=${NO_CACHING}
  49. -DCIVETWEB_C_STANDARD=${C_STANDARD}
  50. -DCIVETWEB_CXX_STANDARD=${CXX_STANDARD}
  51. ..
  52. - ls -la
  53. script:
  54. - if [ "${MACOSX_PACKAGE}" == "1" ]; then
  55. cd "${TRAVIS_BUILD_DIR}";
  56. make -f Makefile.osx package;
  57. else
  58. CTEST_OUTPUT_ON_FAILURE=1 make all test;
  59. fi
  60. # Coveralls options: https://github.com/eddyxu/cpp-coveralls/blob/master/README.md
  61. after_success:
  62. - if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
  63. coveralls --include src --exclude src/main.c --exclude src/third_party --include include --gcov-options '\-lp' --root .. --build-root .;
  64. fi
  65. ###################################
  66. matrix:
  67. fast_finish: false
  68. allow_failures:
  69. # Allow OSX to fail until #364 is solved
  70. - os: osx
  71. include:
  72. -
  73. os: linux
  74. compiler: clang
  75. env:
  76. N=ClangLinuxMinimal
  77. BUILD_TYPE=Coverage
  78. ENABLE_SSL_DYNAMIC_LOADING=YES
  79. ENABLE_CXX=NO
  80. ENABLE_LUA_SHARED=NO
  81. C_STANDARD=auto
  82. CXX_STANDARD=auto
  83. FEATURES=0
  84. BUILD_SHARED=NO
  85. NO_FILES=YES
  86. ENABLE_SSL=NO
  87. NO_CGI=YES
  88. ENABLE_IPV6=NO
  89. ENABLE_WEBSOCKETS=NO
  90. ENABLE_LUA=NO
  91. ENABLE_DUKTAPE=NO
  92. NO_CACHING=NO
  93. -
  94. os: linux
  95. compiler: gcc
  96. env:
  97. N=GCCLinuxMinimal
  98. BUILD_TYPE=Coverage
  99. ENABLE_SSL_DYNAMIC_LOADING=YES
  100. ENABLE_CXX=NO
  101. ENABLE_LUA_SHARED=NO
  102. C_STANDARD=auto
  103. CXX_STANDARD=auto
  104. FEATURES=0
  105. BUILD_SHARED=NO
  106. NO_FILES=YES
  107. ENABLE_SSL=NO
  108. NO_CGI=YES
  109. ENABLE_IPV6=NO
  110. ENABLE_WEBSOCKETS=NO
  111. ENABLE_LUA=NO
  112. ENABLE_DUKTAPE=NO
  113. NO_CACHING=NO
  114. -
  115. os: osx
  116. compiler: clang
  117. env:
  118. N=ClangOSXMinimal
  119. BUILD_TYPE=Coverage
  120. ENABLE_SSL_DYNAMIC_LOADING=YES
  121. ENABLE_CXX=NO
  122. ENABLE_LUA_SHARED=NO
  123. C_STANDARD=auto
  124. CXX_STANDARD=auto
  125. FEATURES=0
  126. BUILD_SHARED=NO
  127. NO_FILES=YES
  128. ENABLE_SSL=NO
  129. NO_CGI=YES
  130. ENABLE_IPV6=NO
  131. ENABLE_WEBSOCKETS=NO
  132. ENABLE_LUA=NO
  133. ENABLE_DUKTAPE=NO
  134. NO_CACHING=NO
  135. -
  136. os: linux
  137. compiler: clang
  138. env:
  139. N=ClangLinuxMinNoCache
  140. BUILD_TYPE=Coverage
  141. ENABLE_SSL_DYNAMIC_LOADING=YES
  142. ENABLE_CXX=NO
  143. ENABLE_LUA_SHARED=NO
  144. C_STANDARD=auto
  145. CXX_STANDARD=auto
  146. FEATURES=0
  147. BUILD_SHARED=NO
  148. NO_FILES=YES
  149. ENABLE_SSL=NO
  150. NO_CGI=YES
  151. ENABLE_IPV6=NO
  152. ENABLE_WEBSOCKETS=NO
  153. ENABLE_LUA=NO
  154. ENABLE_DUKTAPE=NO
  155. NO_CACHING=YES
  156. -
  157. os: linux
  158. compiler: clang
  159. env:
  160. N=ClangLinuxMax
  161. BUILD_TYPE=Coverage
  162. ENABLE_SSL_DYNAMIC_LOADING=YES
  163. ENABLE_CXX=NO
  164. ENABLE_LUA_SHARED=NO
  165. C_STANDARD=auto
  166. CXX_STANDARD=auto
  167. FEATURES=31
  168. BUILD_SHARED=NO
  169. NO_FILES=NO
  170. ENABLE_SSL=YES
  171. NO_CGI=NO
  172. ENABLE_IPV6=YES
  173. ENABLE_WEBSOCKETS=YES
  174. ENABLE_LUA=NO
  175. ENABLE_DUKTAPE=NO
  176. NO_CACHING=YES
  177. -
  178. os: linux
  179. compiler: gcc
  180. env:
  181. N=GCCLinuxMax
  182. BUILD_TYPE=Coverage
  183. ENABLE_SSL_DYNAMIC_LOADING=YES
  184. ENABLE_CXX=NO
  185. ENABLE_LUA_SHARED=NO
  186. C_STANDARD=auto
  187. CXX_STANDARD=auto
  188. FEATURES=31
  189. BUILD_SHARED=NO
  190. NO_FILES=NO
  191. ENABLE_SSL=YES
  192. NO_CGI=NO
  193. ENABLE_IPV6=YES
  194. ENABLE_WEBSOCKETS=YES
  195. ENABLE_LUA=NO
  196. ENABLE_DUKTAPE=NO
  197. NO_CACHING=YES
  198. -
  199. os: osx
  200. compiler: clang
  201. env:
  202. N=ClangOSXMax
  203. BUILD_TYPE=Coverage
  204. ENABLE_SSL_DYNAMIC_LOADING=YES
  205. ENABLE_CXX=NO
  206. ENABLE_LUA_SHARED=NO
  207. C_STANDARD=auto
  208. CXX_STANDARD=auto
  209. FEATURES=31
  210. BUILD_SHARED=NO
  211. NO_FILES=NO
  212. ENABLE_SSL=YES
  213. NO_CGI=NO
  214. ENABLE_IPV6=YES
  215. ENABLE_WEBSOCKETS=YES
  216. ENABLE_LUA=NO
  217. ENABLE_DUKTAPE=NO
  218. NO_CACHING=YES
  219. -
  220. os: linux
  221. compiler: clang
  222. env:
  223. N=ClangLinuxDefault
  224. BUILD_TYPE=Coverage
  225. ENABLE_SSL_DYNAMIC_LOADING=YES
  226. ENABLE_CXX=NO
  227. ENABLE_LUA_SHARED=NO
  228. C_STANDARD=auto
  229. CXX_STANDARD=auto
  230. FEATURES=7
  231. BUILD_SHARED=NO
  232. NO_FILES=NO
  233. ENABLE_SSL=YES
  234. NO_CGI=NO
  235. ENABLE_IPV6=NO
  236. ENABLE_WEBSOCKETS=NO
  237. ENABLE_LUA=NO
  238. ENABLE_DUKTAPE=NO
  239. NO_CACHING=NO
  240. -
  241. os: linux
  242. compiler: gcc
  243. env:
  244. N=GCCLinuxDefault
  245. BUILD_TYPE=Coverage
  246. ENABLE_SSL_DYNAMIC_LOADING=YES
  247. ENABLE_CXX=NO
  248. ENABLE_LUA_SHARED=NO
  249. C_STANDARD=auto
  250. CXX_STANDARD=auto
  251. FEATURES=7
  252. BUILD_SHARED=NO
  253. NO_FILES=NO
  254. ENABLE_SSL=YES
  255. NO_CGI=NO
  256. ENABLE_IPV6=NO
  257. ENABLE_WEBSOCKETS=NO
  258. ENABLE_LUA=NO
  259. ENABLE_DUKTAPE=NO
  260. NO_CACHING=NO
  261. -
  262. os: osx
  263. compiler: clang
  264. env:
  265. N=ClangOSXDefault
  266. BUILD_TYPE=Coverage
  267. ENABLE_SSL_DYNAMIC_LOADING=YES
  268. ENABLE_CXX=NO
  269. ENABLE_LUA_SHARED=NO
  270. C_STANDARD=auto
  271. CXX_STANDARD=auto
  272. FEATURES=7
  273. BUILD_SHARED=NO
  274. NO_FILES=NO
  275. ENABLE_SSL=YES
  276. NO_CGI=NO
  277. ENABLE_IPV6=NO
  278. ENABLE_WEBSOCKETS=NO
  279. ENABLE_LUA=NO
  280. ENABLE_DUKTAPE=NO
  281. NO_CACHING=NO
  282. -
  283. os: linux
  284. compiler: clang
  285. env:
  286. N=ClangLinuxDefaultShared
  287. BUILD_TYPE=Coverage
  288. ENABLE_SSL_DYNAMIC_LOADING=YES
  289. ENABLE_CXX=NO
  290. ENABLE_LUA_SHARED=NO
  291. C_STANDARD=auto
  292. CXX_STANDARD=auto
  293. FEATURES=7
  294. BUILD_SHARED=YES
  295. NO_FILES=NO
  296. ENABLE_SSL=YES
  297. NO_CGI=NO
  298. ENABLE_IPV6=NO
  299. ENABLE_WEBSOCKETS=NO
  300. ENABLE_LUA=NO
  301. ENABLE_DUKTAPE=NO
  302. NO_CACHING=NO
  303. -
  304. os: linux
  305. compiler: gcc
  306. env:
  307. N=GCCLinuxDefaultShared
  308. BUILD_TYPE=Coverage
  309. ENABLE_SSL_DYNAMIC_LOADING=YES
  310. ENABLE_CXX=NO
  311. ENABLE_LUA_SHARED=NO
  312. C_STANDARD=auto
  313. CXX_STANDARD=auto
  314. FEATURES=7
  315. BUILD_SHARED=YES
  316. NO_FILES=NO
  317. ENABLE_SSL=YES
  318. NO_CGI=NO
  319. ENABLE_IPV6=NO
  320. ENABLE_WEBSOCKETS=NO
  321. ENABLE_LUA=NO
  322. ENABLE_DUKTAPE=NO
  323. NO_CACHING=NO
  324. -
  325. os: osx
  326. compiler: clang
  327. env:
  328. N=ClangOSXDefaultShared
  329. BUILD_TYPE=Coverage
  330. ENABLE_SSL_DYNAMIC_LOADING=YES
  331. ENABLE_CXX=NO
  332. ENABLE_LUA_SHARED=NO
  333. C_STANDARD=auto
  334. CXX_STANDARD=auto
  335. FEATURES=7
  336. BUILD_SHARED=YES
  337. NO_FILES=NO
  338. ENABLE_SSL=YES
  339. NO_CGI=NO
  340. ENABLE_IPV6=NO
  341. ENABLE_WEBSOCKETS=NO
  342. ENABLE_LUA=NO
  343. ENABLE_DUKTAPE=NO
  344. NO_CACHING=NO
  345. -
  346. os: osx
  347. compiler: clang
  348. env:
  349. N=OSX_Package
  350. BUILD_TYPE=Coverage
  351. ENABLE_SSL_DYNAMIC_LOADING=YES
  352. ENABLE_CXX=NO
  353. ENABLE_LUA_SHARED=NO
  354. C_STANDARD=auto
  355. CXX_STANDARD=auto
  356. FEATURES=31
  357. BUILD_SHARED=NO
  358. NO_FILES=NO
  359. ENABLE_SSL=YES
  360. NO_CGI=NO
  361. ENABLE_IPV6=YES
  362. ENABLE_WEBSOCKETS=YES
  363. ENABLE_LUA=NO
  364. ENABLE_DUKTAPE=NO
  365. NO_CACHING=NO
  366. MACOSX_PACKAGE=1
  367. #### Now all define combinations, but only for Linux clang
  368. ##### Generated with Lua:
  369. #
  370. # function YN(i,b)
  371. # if (math.mod(i, b) >= (b/2)) then
  372. # return "YES"
  373. # end
  374. # return "NO"
  375. # end
  376. # for i=0,31 do
  377. # if true then -- (i~=0) and (i~=7) and (i~=31) then
  378. # print(" -")
  379. # print(" os: osx")
  380. # print(" compiler: clang")
  381. # print(" env:")
  382. # print(" N=Combination" .. tostring(i))
  383. # print(" BUILD_TYPE=Coverage")
  384. # print(" ENABLE_SSL_DYNAMIC_LOADING=YES")
  385. # print(" ENABLE_CXX=NO")
  386. # print(" C_STANDARD=auto")
  387. # print(" CXX_STANDARD=auto")
  388. # print(" ENABLE_LUA_SHARED=NO")
  389. # print(" FEATURES=" .. tostring(i))
  390. # print(" BUILD_SHARED=NO")
  391. # print(" NO_FILES=" .. YN(i, 1))
  392. # print(" ENABLE_SSL=" .. YN(i, 2))
  393. # print(" NO_CGI=" .. YN(i, 4))
  394. # print(" ENABLE_IPV6=" .. YN(i, 8))
  395. # print(" ENABLE_WEBSOCKETS=" .. YN(i, 16))
  396. # print(" ENABLE_LUA=" .. YN(i, 32))
  397. # print(" ENABLE_DUKTAPE=" .. YN(i, 64))
  398. # print(" NO_CACHING=NO")
  399. # print("")
  400. # end
  401. # end
  402. #