azure-pipelines.yml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. variables:
  2. GIT_BRANCH: $(Build.SourceBranch)
  3. jobs:
  4. - job: 'LinuxCoverage'
  5. pool:
  6. vmImage: 'ubuntu-16.04'
  7. container:
  8. image: djarek/boost-beast-ci:latest
  9. options: --privileged
  10. steps:
  11. - bash: |
  12. sudo apt update && sudo apt install -y g++ lcov
  13. displayName: Get dependencies
  14. - bash: |
  15. set -e
  16. export BUILD_DIR=$(pwd)
  17. cd ..
  18. $BUILD_DIR/tools/get-boost.sh $GIT_BRANCH $BUILD_DIR
  19. cd boost-root
  20. export CXX=g++ CC=gcc
  21. ./bootstrap.sh || cat bootstrap.log
  22. displayName: Get Boost
  23. - bash: |
  24. set -e
  25. cd ../boost-root
  26. ./b2 libs/beast/test//run-fat-tests toolset=gcc coverage=on link=static cxxstd=11 -j2
  27. libs/beast/tools/coverage.sh
  28. env:
  29. CODECOV_TOKEN: $(CODECOV_TOKEN)
  30. displayName: Build & Run tests
  31. - job: 'Linux'
  32. pool:
  33. vmImage: 'ubuntu-16.04'
  34. container:
  35. image: djarek/boost-beast-ci:latest
  36. options: --privileged
  37. strategy:
  38. matrix:
  39. GCC 9 C++17 Release:
  40. TOOLSET: gcc
  41. CXX: g++-9
  42. PACKAGES: g++-9
  43. VARIANT: release
  44. B2_FLAGS: <define>BOOST_BEAST_USE_STD_STRING_VIEW
  45. CXXSTD: 17
  46. B2_TARGETS: libs/beast/test//run-fat-tests libs/beast/example
  47. GCC 9 C++11 HEADER_ONLY NO_DEPRECATED:
  48. TOOLSET: gcc
  49. CXX: g++-9
  50. PACKAGES: g++-9
  51. VARIANT: release
  52. B2_FLAGS: <boost.beast.separate-compilation>off <boost.beast.allow-deprecated>off
  53. CXXSTD: 11
  54. B2_TARGETS: libs/beast/test//run-fat-tests
  55. GCC 9 C++11 NO_DEPRECATED NO_TLS:
  56. TOOLSET: gcc
  57. CXX: g++-9
  58. PACKAGES: g++-9
  59. VARIANT: release
  60. B2_FLAGS: <boost.beast.allow-deprecated>off <define>BOOST_NO_CXX11_THREAD_LOCAL
  61. CXXSTD: 11
  62. B2_TARGETS: libs/beast/test//run-fat-tests
  63. GCC 9 C++11 UBASAN:
  64. TOOLSET: gcc
  65. CXX: g++-9
  66. PACKAGES: g++-9
  67. VARIANT: debug
  68. B2_FLAGS: <address-sanitizer>norecover <undefined-sanitizer>norecover
  69. # use GOLD to workaround UBSAN linker issue in gcc 7/8
  70. # https://stackoverflow.com/questions/50024731/ld-unrecognized-option-push-state-no-as-needed
  71. CXX_FLAGS: <cxxflags>"-msse4.2 -funsigned-char -fno-omit-frame-pointer" <linkflags>-fuse-ld=gold
  72. CXXSTD: 11
  73. B2_TARGETS: libs/beast/test//run-fat-tests
  74. GCC 9 C++11 TSAN:
  75. TOOLSET: gcc
  76. CXX: g++-9
  77. PACKAGES: g++-9
  78. VARIANT: release
  79. B2_FLAGS: <thread-sanitizer>norecover
  80. CXX_FLAGS: <cxxflags>"-msse4.2 -funsigned-char -fno-omit-frame-pointer"
  81. CXXSTD: 11
  82. B2_TARGETS: libs/beast/test//run-fat-tests
  83. GCC 8 C++17 Release:
  84. TOOLSET: gcc
  85. CXX: g++-8
  86. PACKAGES: g++-8
  87. VARIANT: release
  88. B2_FLAGS: <define>BOOST_BEAST_USE_STD_STRING_VIEW
  89. CXXSTD: 17
  90. B2_TARGETS: libs/beast/test//run-fat-tests libs/beast/example
  91. GCC 8 C++11 HEADER_ONLY NO_DEPRECATED:
  92. TOOLSET: gcc
  93. CXX: g++-8
  94. PACKAGES: g++-8
  95. VARIANT: release
  96. B2_FLAGS: <boost.beast.separate-compilation>off <boost.beast.allow-deprecated>off
  97. CXXSTD: 11
  98. B2_TARGETS: libs/beast/test//run-fat-tests
  99. GCC 8 C++11 UBASAN:
  100. TOOLSET: gcc
  101. CXX: g++-8
  102. PACKAGES: g++-8
  103. VARIANT: debug
  104. B2_FLAGS: <address-sanitizer>norecover <undefined-sanitizer>norecover
  105. # use GOLD to workaround UBSAN linker issue in gcc 7/8
  106. # https://stackoverflow.com/questions/50024731/ld-unrecognized-option-push-state-no-as-needed
  107. CXX_FLAGS: <cxxflags>"-msse4.2 -funsigned-char -fno-omit-frame-pointer" <linkflags>-fuse-ld=gold
  108. CXXSTD: 11
  109. B2_TARGETS: libs/beast/test//run-fat-tests
  110. GCC 8 C++11 TSAN:
  111. TOOLSET: gcc
  112. CXX: g++-8
  113. PACKAGES: g++-8
  114. VARIANT: release
  115. B2_FLAGS: <thread-sanitizer>norecover
  116. CXX_FLAGS: <cxxflags>"-msse4.2 -funsigned-char -fno-omit-frame-pointer"
  117. CXXSTD: 11
  118. B2_TARGETS: libs/beast/test//run-fat-tests
  119. GCC 7 C++14 Valgrind:
  120. TOOLSET: gcc
  121. CXX: g++-7
  122. PACKAGES: g++-7 valgrind
  123. VARIANT: release
  124. B2_FLAGS: <define>BOOST_BEAST_TEST_STATIC_PRNG_SEED <valgrind>on <testing.launcher>"valgrind --track-origins=yes --error-exitcode=1 --max-stackframe=16000000 --suppressions=libs/beast/tools/valgrind.supp"
  125. CXXSTD: 14
  126. B2_TARGETS: libs/beast/test//run-fat-tests
  127. GCC Default C++11 Release:
  128. TOOLSET: gcc
  129. CXX: g++
  130. PACKAGES: g++
  131. VARIANT: release
  132. CXXSTD: 11
  133. B2_TARGETS: libs/beast/test//run-fat-tests libs/beast/example
  134. Clang 6.0 C++11 Debug:
  135. TOOLSET: clang
  136. CXX: clang++-6.0
  137. PACKAGES: clang-6.0
  138. VARIANT: debug
  139. CXXSTD: 11
  140. B2_TARGETS: libs/beast/test//run-fat-tests libs/beast/example
  141. Clang 7 libc++ C++14 Valgrind:
  142. TOOLSET: clang
  143. CXX: clang++-7
  144. PACKAGES: clang-7 libc++-7-dev libc++abi-7-dev valgrind
  145. VARIANT: release
  146. B2_FLAGS: <valgrind>on <testing.launcher>"valgrind --track-origins=yes --error-exitcode=1 --max-stackframe=16000000 --suppressions=libs/beast/tools/valgrind.supp"
  147. CXXSTD: 14
  148. CXX_FLAGS: <cxxflags>"-stdlib=libc++" <linkflags>"-stdlib=libc++"
  149. B2_TARGETS: libs/beast/test//run-fat-tests
  150. Clang 7 C++11 Debug:
  151. TOOLSET: clang
  152. CXX: clang++-7
  153. PACKAGES: clang-7
  154. VARIANT: debug
  155. CXXSTD: 11
  156. B2_TARGETS: libs/beast/test//run-fat-tests libs/beast/example
  157. Clang 7 C++14 Release:
  158. TOOLSET: clang
  159. CXX: clang++-7
  160. PACKAGES: clang-7
  161. VARIANT: release
  162. CXXSTD: 14
  163. B2_TARGETS: libs/beast/test//run-fat-tests libs/beast/example
  164. Clang Default C++11 Debug:
  165. TOOLSET: clang
  166. CXX: clang++
  167. PACKAGES: clang
  168. VARIANT: debug
  169. CXXSTD: 11
  170. B2_TARGETS: libs/beast/test//run-fat-tests libs/beast/example
  171. Clang 8 libc++ C++14 UBASAN:
  172. TOOLSET: clang
  173. CXX: clang++-8
  174. PACKAGES: clang-8 libc++-8-dev libc++abi-8-dev
  175. VARIANT: release
  176. B2_FLAGS: <address-sanitizer>norecover <undefined-sanitizer>norecover
  177. UBSAN_OPTIONS: print_stacktrace=1
  178. CXXSTD: 14
  179. CXX_FLAGS: <cxxflags>"-stdlib=libc++ -msse4.2 -funsigned-char -fno-omit-frame-pointer" <linkflags>-stdlib=libc++
  180. B2_TARGETS: libs/beast/test//run-fat-tests
  181. Clang 8 libc++ C++14 TSAN:
  182. TOOLSET: clang
  183. CXX: clang++-8
  184. PACKAGES: clang-8 libc++-8-dev libc++abi-8-dev
  185. VARIANT: release
  186. B2_FLAGS: <thread-sanitizer>norecover
  187. CXXSTD: 14
  188. CXX_FLAGS: <cxxflags>"-stdlib=libc++ -msse4.2 -funsigned-char -fno-omit-frame-pointer" <linkflags>-stdlib=libc++
  189. B2_TARGETS: libs/beast/test//run-fat-tests
  190. Clang 9 libc++ C++14 Release HEADER_ONLY NO_DEPRECATED:
  191. TOOLSET: clang
  192. CXX: clang++-9
  193. PACKAGES: clang-9 libc++-9-dev libc++abi-9-dev
  194. VARIANT: release
  195. B2_FLAGS: <boost.beast.separate-compilation>off <boost.beast.allow-deprecated>off
  196. CXXSTD: 14
  197. CXX_FLAGS: <cxxflags>"-stdlib=libc++ -msse4.2 -funsigned-char -fno-omit-frame-pointer" <linkflags>-stdlib=libc++
  198. B2_TARGETS: libs/beast/test//run-fat-tests
  199. Clang 9 libc++ C++17 UBASAN:
  200. TOOLSET: clang
  201. CXX: clang++-9
  202. PACKAGES: clang-9 libc++-9-dev libc++abi-9-dev
  203. VARIANT: release
  204. B2_FLAGS: <address-sanitizer>norecover <undefined-sanitizer>norecover
  205. UBSAN_OPTIONS: print_stacktrace=1
  206. CXXSTD: 17
  207. CXX_FLAGS: <cxxflags>"-stdlib=libc++ -msse4.2 -funsigned-char -fno-omit-frame-pointer" <linkflags>-stdlib=libc++
  208. B2_TARGETS: libs/beast/test//run-fat-tests
  209. Clang 9 libc++ C++17 TSAN:
  210. TOOLSET: clang
  211. CXX: clang++-9
  212. PACKAGES: clang-9 libc++-9-dev libc++abi-9-dev
  213. VARIANT: release
  214. B2_FLAGS: <thread-sanitizer>norecover
  215. CXXSTD: 17
  216. CXX_FLAGS: <cxxflags>"-stdlib=libc++ -msse4.2 -funsigned-char -fno-omit-frame-pointer" <linkflags>-stdlib=libc++
  217. B2_TARGETS: libs/beast/test//run-fat-tests
  218. Clang 9 libc++ C++11 Release HEADER_ONLY NO_DEPRECATED:
  219. TOOLSET: clang
  220. CXX: clang++-9
  221. PACKAGES: clang-9 libc++-9-dev libc++abi-9-dev
  222. VARIANT: release
  223. B2_FLAGS: <boost.beast.separate-compilation>off <boost.beast.allow-deprecated>off
  224. CXXSTD: 11
  225. CXX_FLAGS: <cxxflags>"-stdlib=libc++ -msse4.2 -funsigned-char -fno-omit-frame-pointer" <linkflags>-stdlib=libc++
  226. B2_TARGETS: libs/beast/test//run-fat-tests
  227. steps:
  228. - bash: |
  229. sudo apt update && sudo apt install -y $PACKAGES
  230. displayName: Get dependencies
  231. - bash: |
  232. set -e
  233. export BUILD_DIR=$(pwd)
  234. cd ..
  235. $BUILD_DIR/tools/get-boost.sh $GIT_BRANCH $BUILD_DIR
  236. cd boost-root
  237. ./bootstrap.sh || cat bootstrap.log
  238. cp libs/beast/tools/user-config.jam ~/user-config.jam
  239. echo "using $TOOLSET : : $(which $CXX) : $CXX_FLAGS ;" >> ~/user-config.jam
  240. echo "project : requirements $B2_FLAGS ;" >> ~/user-config.jam
  241. displayName: Get Boost
  242. - bash: |
  243. set -e
  244. cd ../boost-root
  245. echo "B2_FLAGS: $B2_FLAGS"
  246. ./b2 -j2 \
  247. --debug-configuration \
  248. cxxstd=$CXXSTD \
  249. toolset=$TOOLSET \
  250. variant=$VARIANT \
  251. $B2_TARGETS
  252. displayName: Build & Run tests
  253. - job: 'macOS'
  254. pool:
  255. vmImage: 'macOS-10.13'
  256. strategy:
  257. matrix:
  258. Xcode 10.1 C++17 Release:
  259. TOOLSET: clang
  260. VARIANT: release
  261. CXXSTD: 17
  262. XCODE_APP: /Applications/Xcode_10.1.app
  263. Xcode 9.4.1 C++11 Release:
  264. TOOLSET: clang
  265. VARIANT: release
  266. CXXSTD: 11
  267. XCODE_APP: /Applications/Xcode_9.4.1.app
  268. steps:
  269. - bash: |
  270. brew install openssl
  271. displayName: Get OpenSSL
  272. - bash: |
  273. set -e
  274. sudo xcode-select -switch ${XCODE_APP}
  275. which clang++
  276. export BUILD_DIR=$(pwd)
  277. cd ..
  278. $BUILD_DIR/tools/get-boost.sh $GIT_BRANCH $BUILD_DIR
  279. cd boost-root
  280. ./bootstrap.sh || cat bootstrap.log
  281. cp libs/beast/tools/user-config.jam ~/user-config.jam
  282. displayName: Get Boost
  283. - bash: |
  284. set -e
  285. export OPENSSL_ROOT=$(brew --prefix openssl)
  286. cd ../boost-root
  287. ./b2 -j2 \
  288. --debug-configuration \
  289. define=BOOST_COROUTINES_NO_DEPRECATION_WARNING=1 \
  290. cxxstd=$CXXSTD \
  291. libs/beast/test//run-fat-tests \
  292. libs/beast/example \
  293. toolset=$TOOLSET \
  294. variant=$VARIANT
  295. displayName: Build & Run tests
  296. - job: 'Windows'
  297. strategy:
  298. matrix:
  299. # MSVC14.2: # FIXME(djarek): windows-2019 doesn't have vcpkg
  300. MSVC14.2 C++17 x64:
  301. VM_IMAGE: 'windows-2019'
  302. TOOLSET: msvc-14.2
  303. B2_FLAGS: define=BOOST_BEAST_USE_STD_STRING_VIEW
  304. CXXSTD: 17
  305. ADDRMODEL: 64
  306. MSVC14.1 C++17 x64:
  307. VM_IMAGE: 'vs2017-win2016'
  308. TOOLSET: msvc-14.1
  309. B2_FLAGS: define=BOOST_BEAST_USE_STD_STRING_VIEW
  310. CXXSTD: 17
  311. ADDRMODEL: 64
  312. MSVC14.0 C++11 x64:
  313. VM_IMAGE: 'vs2017-win2016'
  314. TOOLSET: msvc-14.0
  315. CXXSTD: 11
  316. ADDRMODEL: 64
  317. pool:
  318. vmImage: $(VM_IMAGE)
  319. steps:
  320. - bash: |
  321. vcpkg install openssl --triplet "x$ADDRMODEL""-windows"
  322. displayName: Get OpenSSL
  323. - bash: |
  324. set -e
  325. export BUILD_DIR=$(pwd)
  326. cd ..
  327. $BUILD_DIR/tools/get-boost.sh $GIT_BRANCH $BUILD_DIR
  328. cd boost-root
  329. ./bootstrap.sh
  330. cp libs/beast/tools/user-config.jam ~/user-config.jam
  331. displayName: Get Boost
  332. - bash: |
  333. set -e
  334. echo "VCPKG_ROOT: $VCPKG_INSTALLATION_ROOT"
  335. export OPENSSL_ROOT="$VCPKG_INSTALLATION_ROOT""/installed/x$ADDRMODEL""-windows"
  336. cd ../boost-root
  337. ./b2 -j2 \
  338. --debug-configuration \
  339. variant=debug \
  340. cxxstd=$CXXSTD \
  341. address-model=$ADDRMODEL \
  342. toolset=$TOOLSET \
  343. $B2_FLAGS \
  344. libs/beast/example
  345. ./b2 -j2 \
  346. --debug-configuration \
  347. variant=debug,release \
  348. cxxstd=$CXXSTD \
  349. address-model=$ADDRMODEL \
  350. toolset=$TOOLSET \
  351. $B2_FLAGS \
  352. --verbose-test \
  353. libs/beast/test//run-fat-tests
  354. displayName: Build & Run tests