ci.yml 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247
  1. name: CI
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ main ]
  7. permissions:
  8. contents: read
  9. jobs:
  10. # Commented 2024-11-06, lack of workers in github causes CI failures
  11. # arm64_test:
  12. # name: CMake test arm64 (with modern protobuf,grpc and abseil)
  13. # runs-on: actuated-arm64-4cpu-16gb
  14. # steps:
  15. # - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  16. # with:
  17. # submodules: 'recursive'
  18. # - name: setup
  19. # env:
  20. # PROTOBUF_VERSION: '23.3'
  21. # ABSEIL_CPP_VERSION: '20230125.3'
  22. # CXX_STANDARD: '14'
  23. # CC: /usr/bin/gcc-10
  24. # CXX: /usr/bin/g++-10
  25. # run: |
  26. # sudo -E ./ci/setup_gcc10.sh
  27. # sudo -E ./ci/setup_ci_environment.sh
  28. # sudo -E ./ci/setup_cmake.sh
  29. # sudo -E ./ci/setup_googletest.sh
  30. # sudo -E ./ci/install_abseil.sh
  31. # sudo -E ./ci/install_protobuf.sh
  32. cmake_test:
  33. name: CMake test (prometheus, elasticsearch, zipkin)
  34. runs-on: ubuntu-22.04
  35. env:
  36. CXX_STANDARD: '17'
  37. steps:
  38. - name: Harden the runner (Audit all outbound calls)
  39. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  40. with:
  41. egress-policy: audit
  42. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  43. with:
  44. submodules: 'recursive'
  45. - name: setup
  46. run: |
  47. sudo -E ./ci/setup_ci_environment.sh
  48. sudo -E ./ci/setup_cmake.sh
  49. sudo -E ./ci/setup_googletest.sh
  50. - name: run cmake tests
  51. run: |
  52. ./ci/do_ci.sh cmake.test
  53. cmake_fetch_content_test:
  54. name: CMake FetchContent usage with opentelemetry-cpp
  55. runs-on: ubuntu-24.04
  56. env:
  57. CXX_STANDARD: '17'
  58. BUILD_TYPE: 'Debug'
  59. steps:
  60. - name: Harden the runner (Audit all outbound calls)
  61. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  62. with:
  63. egress-policy: audit
  64. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  65. with:
  66. submodules: 'recursive'
  67. - name: setup
  68. run: |
  69. sudo -E ./ci/setup_ci_environment.sh
  70. sudo -E ./ci/setup_cmake.sh
  71. sudo -E ./ci/setup_googletest.sh
  72. - name: Install abseil, protobuf, and grpc with apt
  73. run: |
  74. sudo -E apt-get update
  75. sudo -E apt-get install -y libabsl-dev libprotobuf-dev libgrpc++-dev protobuf-compiler protobuf-compiler-grpc
  76. - name: run fetch content cmake test
  77. run: |
  78. ./ci/do_ci.sh cmake.fetch_content.test
  79. cmake_gcc_maintainer_sync_test:
  80. name: CMake gcc 14 (maintainer mode, sync)
  81. runs-on: ubuntu-24.04
  82. steps:
  83. - name: Harden the runner (Audit all outbound calls)
  84. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  85. with:
  86. egress-policy: audit
  87. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  88. with:
  89. submodules: 'recursive'
  90. - name: setup
  91. env:
  92. CC: /usr/bin/gcc-14
  93. CXX: /usr/bin/g++-14
  94. PROTOBUF_VERSION: 21.12
  95. run: |
  96. sudo apt remove needrestart #refer: https://github.com/actions/runner-images/issues/9937
  97. sudo -E ./ci/setup_ci_environment.sh
  98. sudo -E ./ci/setup_cmake.sh
  99. sudo -E ./ci/setup_googletest.sh
  100. sudo -E ./ci/install_protobuf.sh
  101. - name: setup grpc
  102. run: |
  103. sudo ./ci/setup_grpc.sh
  104. - name: run cmake gcc (maintainer mode, sync)
  105. env:
  106. CC: /usr/bin/gcc-14
  107. CXX: /usr/bin/g++-14
  108. run: |
  109. ./ci/do_ci.sh cmake.maintainer.sync.test
  110. - name: generate test cert
  111. env:
  112. CFSSL_VERSION: 1.6.3
  113. run: |
  114. sudo -E ./tools/setup-cfssl.sh
  115. (cd ./functional/cert; ./generate_cert.sh)
  116. - name: run func test
  117. run: |
  118. (cd ./functional/otlp; ./run_test.sh)
  119. cmake_gcc_maintainer_async_test:
  120. name: CMake gcc 14 (maintainer mode, async)
  121. runs-on: ubuntu-24.04
  122. steps:
  123. - name: Harden the runner (Audit all outbound calls)
  124. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  125. with:
  126. egress-policy: audit
  127. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  128. with:
  129. submodules: 'recursive'
  130. - name: setup
  131. env:
  132. CC: /usr/bin/gcc-14
  133. CXX: /usr/bin/g++-14
  134. PROTOBUF_VERSION: 21.12
  135. run: |
  136. sudo apt remove needrestart #refer: https://github.com/actions/runner-images/issues/9937
  137. sudo -E ./ci/setup_ci_environment.sh
  138. sudo -E ./ci/setup_cmake.sh
  139. sudo -E ./ci/setup_googletest.sh
  140. sudo -E ./ci/install_protobuf.sh
  141. - name: setup grpc
  142. run: |
  143. sudo ./ci/setup_grpc.sh
  144. - name: run cmake gcc (maintainer mode, async)
  145. env:
  146. CC: /usr/bin/gcc-14
  147. CXX: /usr/bin/g++-14
  148. run: |
  149. ./ci/do_ci.sh cmake.maintainer.async.test
  150. - name: generate test cert
  151. env:
  152. CFSSL_VERSION: 1.6.3
  153. run: |
  154. sudo -E ./tools/setup-cfssl.sh
  155. (cd ./functional/cert; ./generate_cert.sh)
  156. - name: run func test
  157. run: |
  158. (cd ./functional/otlp; ./run_test.sh)
  159. cmake_clang_maintainer_sync_test:
  160. name: CMake clang 18 (maintainer mode, sync)
  161. runs-on: ubuntu-24.04
  162. steps:
  163. - name: Harden the runner (Audit all outbound calls)
  164. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  165. with:
  166. egress-policy: audit
  167. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  168. with:
  169. submodules: 'recursive'
  170. - name: setup
  171. env:
  172. CC: /usr/bin/clang-18
  173. CXX: /usr/bin/clang++-18
  174. PROTOBUF_VERSION: 21.12
  175. run: |
  176. sudo apt remove needrestart #refer: https://github.com/actions/runner-images/issues/9937
  177. sudo -E ./ci/setup_ci_environment.sh
  178. sudo -E ./ci/setup_cmake.sh
  179. sudo -E ./ci/setup_googletest.sh
  180. sudo -E ./ci/install_protobuf.sh
  181. - name: setup grpc
  182. run: |
  183. sudo ./ci/setup_grpc.sh
  184. - name: run cmake clang (maintainer mode, sync)
  185. env:
  186. CC: /usr/bin/clang-18
  187. CXX: /usr/bin/clang++-18
  188. run: |
  189. ./ci/do_ci.sh cmake.maintainer.sync.test
  190. - name: generate test cert
  191. env:
  192. CFSSL_VERSION: 1.6.3
  193. run: |
  194. sudo -E ./tools/setup-cfssl.sh
  195. (cd ./functional/cert; ./generate_cert.sh)
  196. - name: run func test
  197. run: |
  198. (cd ./functional/otlp; ./run_test.sh)
  199. cmake_clang_maintainer_async_test:
  200. name: CMake clang 18 (maintainer mode, async)
  201. runs-on: ubuntu-24.04
  202. steps:
  203. - name: Harden the runner (Audit all outbound calls)
  204. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  205. with:
  206. egress-policy: audit
  207. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  208. with:
  209. submodules: 'recursive'
  210. - name: setup
  211. env:
  212. CC: /usr/bin/clang-18
  213. CXX: /usr/bin/clang++-18
  214. PROTOBUF_VERSION: 21.12
  215. run: |
  216. sudo apt remove needrestart #refer: https://github.com/actions/runner-images/issues/9937
  217. sudo -E ./ci/setup_ci_environment.sh
  218. sudo -E ./ci/setup_cmake.sh
  219. sudo -E ./ci/setup_googletest.sh
  220. sudo -E ./ci/install_protobuf.sh
  221. - name: setup grpc
  222. run: |
  223. sudo ./ci/setup_grpc.sh
  224. - name: run cmake clang (maintainer mode, async)
  225. env:
  226. CC: /usr/bin/clang-18
  227. CXX: /usr/bin/clang++-18
  228. run: |
  229. ./ci/do_ci.sh cmake.maintainer.async.test
  230. - name: generate test cert
  231. env:
  232. CFSSL_VERSION: 1.6.3
  233. run: |
  234. sudo -E ./tools/setup-cfssl.sh
  235. (cd ./functional/cert; ./generate_cert.sh)
  236. - name: run func test
  237. run: |
  238. (cd ./functional/otlp; ./run_test.sh)
  239. cmake_clang_maintainer_abiv2_test:
  240. name: CMake clang 18 (maintainer mode, abiv2)
  241. runs-on: ubuntu-24.04
  242. steps:
  243. - name: Harden the runner (Audit all outbound calls)
  244. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  245. with:
  246. egress-policy: audit
  247. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  248. with:
  249. submodules: 'recursive'
  250. - name: setup
  251. env:
  252. CC: /usr/bin/clang-18
  253. CXX: /usr/bin/clang++-18
  254. PROTOBUF_VERSION: 21.12
  255. run: |
  256. sudo apt remove needrestart #refer: https://github.com/actions/runner-images/issues/9937
  257. sudo -E ./ci/setup_ci_environment.sh
  258. sudo -E ./ci/setup_cmake.sh
  259. sudo -E ./ci/setup_googletest.sh
  260. sudo -E ./ci/install_protobuf.sh
  261. - name: setup grpc
  262. run: |
  263. sudo ./ci/setup_grpc.sh
  264. - name: run cmake clang (maintainer mode, abiv2)
  265. env:
  266. CC: /usr/bin/clang-18
  267. CXX: /usr/bin/clang++-18
  268. run: |
  269. ./ci/do_ci.sh cmake.maintainer.abiv2.test
  270. - name: generate test cert
  271. env:
  272. CFSSL_VERSION: 1.6.3
  273. run: |
  274. sudo -E ./tools/setup-cfssl.sh
  275. (cd ./functional/cert; ./generate_cert.sh)
  276. - name: run func test
  277. run: |
  278. (cd ./functional/otlp; ./run_test.sh)
  279. cmake_msvc_maintainer_test:
  280. name: CMake msvc (maintainer mode)
  281. runs-on: windows-latest
  282. steps:
  283. - name: Harden the runner (Audit all outbound calls)
  284. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  285. with:
  286. egress-policy: audit
  287. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  288. with:
  289. submodules: 'recursive'
  290. - name: setup
  291. run: |
  292. ./ci/setup_cmake.ps1
  293. ./ci/setup_windows_ci_environment.ps1
  294. - name: run tests
  295. run: ./ci/do_ci.ps1 cmake.maintainer.test
  296. cmake_msvc_maintainer_test_stl_cxx20:
  297. name: CMake msvc (maintainer mode) with C++20
  298. runs-on: windows-latest
  299. steps:
  300. - name: Harden the runner (Audit all outbound calls)
  301. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  302. with:
  303. egress-policy: audit
  304. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  305. with:
  306. submodules: 'recursive'
  307. - name: setup
  308. run: |
  309. ./ci/setup_cmake.ps1
  310. ./ci/setup_windows_ci_environment.ps1
  311. - name: run tests
  312. env:
  313. CXX_STANDARD: '20'
  314. run: ./ci/do_ci.ps1 cmake.maintainer.cxx20.stl.test
  315. cmake_msvc_maintainer_abiv2_test:
  316. name: CMake msvc (maintainer mode, abiv2)
  317. runs-on: windows-latest
  318. steps:
  319. - name: Harden the runner (Audit all outbound calls)
  320. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  321. with:
  322. egress-policy: audit
  323. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  324. with:
  325. submodules: 'recursive'
  326. - name: setup
  327. run: |
  328. ./ci/setup_cmake.ps1
  329. ./ci/setup_windows_ci_environment.ps1
  330. - name: run tests
  331. env:
  332. CXX_STANDARD: '20'
  333. run: ./ci/do_ci.ps1 cmake.maintainer.abiv2.test
  334. cmake_with_async_export_test:
  335. name: CMake test (without otlp-exporter and with async export)
  336. runs-on: ubuntu-latest
  337. steps:
  338. - name: Harden the runner (Audit all outbound calls)
  339. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  340. with:
  341. egress-policy: audit
  342. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  343. with:
  344. submodules: 'recursive'
  345. - name: setup
  346. env:
  347. CC: /usr/bin/gcc-12
  348. CXX: /usr/bin/g++-12
  349. run: |
  350. sudo -E ./ci/setup_ci_environment.sh
  351. sudo -E ./ci/setup_cmake.sh
  352. sudo -E ./ci/setup_googletest.sh
  353. - name: run cmake tests (without otlp-exporter)
  354. env:
  355. CC: /usr/bin/gcc-12
  356. CXX: /usr/bin/g++-12
  357. run: |
  358. ./ci/do_ci.sh cmake.with_async_export.test
  359. cmake_opentracing_shim_test:
  360. name: CMake test (with opentracing-shim)
  361. runs-on: ubuntu-latest
  362. steps:
  363. - name: Harden the runner (Audit all outbound calls)
  364. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  365. with:
  366. egress-policy: audit
  367. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  368. with:
  369. submodules: 'recursive'
  370. - name: setup
  371. run: |
  372. sudo -E ./ci/setup_ci_environment.sh
  373. sudo -E ./ci/setup_cmake.sh
  374. sudo -E ./ci/setup_googletest.sh
  375. - name: run cmake tests (enable opentracing-shim)
  376. run: ./ci/do_ci.sh cmake.opentracing_shim.test
  377. cmake_test_cxx14_gcc:
  378. name: CMake C++14 test(GCC)
  379. runs-on: ubuntu-22.04
  380. steps:
  381. - name: Harden the runner (Audit all outbound calls)
  382. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  383. with:
  384. egress-policy: audit
  385. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  386. with:
  387. submodules: 'recursive'
  388. - name: setup
  389. run: |
  390. sudo -E ./ci/setup_ci_environment.sh
  391. sudo -E ./ci/setup_cmake.sh
  392. sudo -E ./ci/setup_googletest.sh
  393. - name: run tests (enable stl)
  394. env:
  395. CXX_STANDARD: '14'
  396. run: ./ci/do_ci.sh cmake.c++14.stl.test
  397. cmake_test_cxx17_gcc:
  398. name: CMake C++17 test(GCC)
  399. runs-on: ubuntu-22.04
  400. steps:
  401. - name: Harden the runner (Audit all outbound calls)
  402. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  403. with:
  404. egress-policy: audit
  405. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  406. with:
  407. submodules: 'recursive'
  408. - name: setup
  409. run: |
  410. sudo -E ./ci/setup_ci_environment.sh
  411. sudo -E ./ci/setup_cmake.sh
  412. sudo -E ./ci/setup_googletest.sh
  413. - name: run tests (enable stl)
  414. env:
  415. CXX_STANDARD: '17'
  416. run: ./ci/do_ci.sh cmake.c++17.stl.test
  417. cmake_test_cxx20_gcc:
  418. name: CMake C++20 test(GCC)
  419. runs-on: ubuntu-22.04
  420. steps:
  421. - name: Harden the runner (Audit all outbound calls)
  422. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  423. with:
  424. egress-policy: audit
  425. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  426. with:
  427. submodules: 'recursive'
  428. - name: setup
  429. run: |
  430. sudo -E ./ci/setup_ci_environment.sh
  431. sudo -E ./ci/setup_cmake.sh
  432. sudo -E ./ci/setup_googletest.sh
  433. - name: run tests
  434. env:
  435. CXX_STANDARD: '20'
  436. run: ./ci/do_ci.sh cmake.c++20.test
  437. - name: run tests (enable stl)
  438. env:
  439. CXX_STANDARD: '20'
  440. run: ./ci/do_ci.sh cmake.c++20.stl.test
  441. cmake_test_cxx20_clang:
  442. name: CMake C++20 test(Clang with libc++)
  443. runs-on: ubuntu-22.04
  444. steps:
  445. - name: Harden the runner (Audit all outbound calls)
  446. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  447. with:
  448. egress-policy: audit
  449. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  450. with:
  451. submodules: 'recursive'
  452. - name: setup
  453. env:
  454. CC: /usr/bin/clang
  455. CXX: /usr/bin/clang++
  456. CXXFLAGS: "-stdlib=libc++"
  457. run: |
  458. sudo -E ./ci/setup_ci_environment.sh
  459. sudo -E ./ci/setup_cmake.sh
  460. sudo -E ./ci/setup_googletest.sh
  461. - name: run tests
  462. env:
  463. CC: /usr/bin/clang
  464. CXX: /usr/bin/clang++
  465. CXXFLAGS: "-stdlib=libc++"
  466. CXX_STANDARD: '20'
  467. run: ./ci/do_ci.sh cmake.c++20.test
  468. - name: run tests (enable stl)
  469. env:
  470. CC: /usr/bin/clang
  471. CXX: /usr/bin/clang++
  472. CXXFLAGS: "-stdlib=libc++"
  473. CXX_STANDARD: '20'
  474. run: ./ci/do_ci.sh cmake.c++20.stl.test
  475. cmake_test_cxx23_gcc:
  476. name: CMake C++23 test(GCC)
  477. runs-on: ubuntu-latest
  478. steps:
  479. - name: Harden the runner (Audit all outbound calls)
  480. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  481. with:
  482. egress-policy: audit
  483. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  484. with:
  485. submodules: 'recursive'
  486. - name: setup
  487. run: |
  488. sudo -E ./ci/setup_ci_environment.sh
  489. sudo -E ./ci/setup_cmake.sh
  490. sudo -E ./ci/setup_googletest.sh
  491. - name: run tests
  492. env:
  493. CXX_STANDARD: '23'
  494. run: ./ci/do_ci.sh cmake.c++23.test
  495. - name: run tests (enable stl)
  496. env:
  497. CXX_STANDARD: '23'
  498. run: ./ci/do_ci.sh cmake.c++23.stl.test
  499. cmake_test_cxx23_clang:
  500. name: CMake C++23 test(Clang with libc++)
  501. runs-on: ubuntu-22.04
  502. steps:
  503. - name: Harden the runner (Audit all outbound calls)
  504. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  505. with:
  506. egress-policy: audit
  507. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  508. with:
  509. submodules: 'recursive'
  510. - name: setup
  511. env:
  512. CC: /usr/bin/clang
  513. CXX: /usr/bin/clang++
  514. CXXFLAGS: "-stdlib=libc++"
  515. run: |
  516. sudo -E ./ci/setup_ci_environment.sh
  517. sudo -E ./ci/setup_cmake.sh
  518. sudo -E ./ci/setup_googletest.sh
  519. - name: run tests
  520. env:
  521. CC: /usr/bin/clang
  522. CXX: /usr/bin/clang++
  523. CXXFLAGS: "-stdlib=libc++"
  524. CXX_STANDARD: '23'
  525. run: ./ci/do_ci.sh cmake.c++23.test
  526. - name: run tests (enable stl)
  527. env:
  528. CC: /usr/bin/clang
  529. CXX: /usr/bin/clang++
  530. CXXFLAGS: "-stdlib=libc++"
  531. CXX_STANDARD: '23'
  532. run: ./ci/do_ci.sh cmake.c++23.stl.test
  533. cmake_otprotocol_test:
  534. name: CMake test (with otlp-exporter)
  535. runs-on: ubuntu-22.04
  536. steps:
  537. - name: Harden the runner (Audit all outbound calls)
  538. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  539. with:
  540. egress-policy: audit
  541. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  542. with:
  543. submodules: 'recursive'
  544. - name: setup
  545. run: |
  546. sudo -E ./ci/setup_ci_environment.sh
  547. sudo -E ./ci/setup_cmake.sh
  548. sudo -E ./ci/setup_googletest.sh
  549. - name: run otlp exporter tests
  550. run: |
  551. sudo ./ci/setup_grpc.sh
  552. ./ci/do_ci.sh cmake.exporter.otprotocol.test
  553. - name: generate test cert
  554. env:
  555. CFSSL_VERSION: 1.6.3
  556. run: |
  557. sudo -E ./tools/setup-cfssl.sh
  558. (cd ./functional/cert; ./generate_cert.sh)
  559. - name: run func test
  560. run: |
  561. (cd ./functional/otlp; ./run_test.sh)
  562. cmake_modern_protobuf_grpc_with_abseil_test:
  563. name: CMake test (with modern protobuf,grpc and abseil)
  564. runs-on: ubuntu-latest
  565. steps:
  566. - name: Harden the runner (Audit all outbound calls)
  567. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  568. with:
  569. egress-policy: audit
  570. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  571. with:
  572. submodules: 'recursive'
  573. - name: setup
  574. env:
  575. PROTOBUF_VERSION: '23.3'
  576. ABSEIL_CPP_VERSION: '20230125.3'
  577. CXX_STANDARD: '14'
  578. run: |
  579. sudo -E ./ci/setup_ci_environment.sh
  580. sudo -E ./ci/setup_cmake.sh
  581. sudo -E ./ci/setup_googletest.sh
  582. sudo -E ./ci/install_abseil.sh
  583. sudo -E ./ci/install_protobuf.sh
  584. - name: run otlp exporter tests
  585. env:
  586. CXX_STANDARD: '14'
  587. run: |
  588. sudo -E ./ci/setup_grpc.sh -m -p protobuf -p abseil-cpp
  589. ./ci/do_ci.sh cmake.exporter.otprotocol.test
  590. cmake_do_not_install_test:
  591. name: CMake do not install test (with otlp-exporter)
  592. runs-on: ubuntu-22.04
  593. steps:
  594. - name: Harden the runner (Audit all outbound calls)
  595. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  596. with:
  597. egress-policy: audit
  598. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  599. with:
  600. submodules: 'recursive'
  601. - name: setup
  602. run: |
  603. sudo -E ./ci/setup_ci_environment.sh
  604. sudo -E ./ci/setup_cmake.sh
  605. sudo -E ./ci/setup_googletest.sh
  606. - name: run otlp exporter tests
  607. run: |
  608. sudo ./ci/setup_grpc.sh
  609. ./ci/do_ci.sh cmake.do_not_install.test
  610. cmake_otprotocol_shared_libs_with_static_grpc_test:
  611. name: CMake test (build shared libraries with otlp-exporter and static gRPC)
  612. runs-on: ubuntu-22.04
  613. steps:
  614. - name: Harden the runner (Audit all outbound calls)
  615. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  616. with:
  617. egress-policy: audit
  618. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  619. with:
  620. submodules: 'recursive'
  621. - name: setup
  622. run: |
  623. sudo -E ./ci/setup_ci_environment.sh
  624. sudo -E ./ci/setup_cmake.sh
  625. sudo -E ./ci/setup_googletest.sh
  626. - name: run otlp exporter tests
  627. run: |
  628. sudo ./ci/setup_grpc.sh -T
  629. ./ci/do_ci.sh cmake.exporter.otprotocol.shared_libs.with_static_grpc.test
  630. plugin_test:
  631. name: Plugin -> CMake
  632. runs-on: ubuntu-latest
  633. steps:
  634. - name: Harden the runner (Audit all outbound calls)
  635. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  636. with:
  637. egress-policy: audit
  638. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  639. with:
  640. submodules: 'recursive'
  641. - name: setup
  642. env:
  643. CC: /usr/bin/gcc-12
  644. CXX: /usr/bin/g++-12
  645. run: |
  646. sudo -E ./ci/setup_ci_environment.sh
  647. sudo -E ./ci/setup_cmake.sh
  648. sudo -E ./ci/setup_googletest.sh
  649. - name: run tests
  650. env:
  651. CC: /usr/bin/gcc-12
  652. CXX: /usr/bin/g++-12
  653. run: ./ci/do_ci.sh cmake.test_example_plugin
  654. bazel_test:
  655. name: Bazel
  656. runs-on: ubuntu-latest
  657. steps:
  658. - name: Harden the runner (Audit all outbound calls)
  659. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  660. with:
  661. egress-policy: audit
  662. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  663. with:
  664. submodules: 'recursive'
  665. - name: Mount Bazel Cache
  666. uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
  667. env:
  668. cache-name: bazel_cache
  669. with:
  670. path: /home/runner/.cache/bazel
  671. key: bazel_test
  672. - name: setup
  673. run: |
  674. sudo ./ci/setup_ci_environment.sh
  675. sudo ./ci/setup_cmake.sh
  676. sudo ./ci/install_bazelisk.sh
  677. - name: run tests
  678. run: ./ci/do_ci.sh bazel.test
  679. bazel_no_bzlmod_test:
  680. name: Bazel without bzlmod
  681. runs-on: ubuntu-latest
  682. steps:
  683. - name: Harden the runner (Audit all outbound calls)
  684. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  685. with:
  686. egress-policy: audit
  687. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  688. with:
  689. submodules: 'recursive'
  690. - name: Mount Bazel Cache
  691. uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
  692. env:
  693. cache-name: bazel_cache
  694. with:
  695. path: /home/runner/.cache/bazel
  696. key: bazel_test
  697. - name: setup
  698. run: |
  699. sudo ./ci/setup_ci_environment.sh
  700. sudo ./ci/setup_cmake.sh
  701. sudo ./ci/install_bazelisk.sh
  702. - name: run tests
  703. run: ./ci/do_ci.sh bazel.no_bzlmod.test
  704. bazel_test_async:
  705. name: Bazel with async export
  706. runs-on: ubuntu-latest
  707. steps:
  708. - name: Harden the runner (Audit all outbound calls)
  709. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  710. with:
  711. egress-policy: audit
  712. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  713. with:
  714. submodules: 'recursive'
  715. - name: Mount Bazel Cache
  716. uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
  717. env:
  718. cache-name: bazel_cache
  719. with:
  720. path: /home/runner/.cache/bazel
  721. key: bazel_test
  722. - name: setup
  723. run: |
  724. sudo ./ci/setup_ci_environment.sh
  725. sudo ./ci/setup_cmake.sh
  726. sudo ./ci/install_bazelisk.sh
  727. - name: run tests
  728. run: ./ci/do_ci.sh bazel.with_async_export.test
  729. bazel_valgrind:
  730. name: Bazel valgrind
  731. runs-on: ubuntu-latest
  732. steps:
  733. - name: Harden the runner (Audit all outbound calls)
  734. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  735. with:
  736. egress-policy: audit
  737. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  738. with:
  739. submodules: 'recursive'
  740. - name: Mount Bazel Cache
  741. uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
  742. env:
  743. cache-name: bazel_cache
  744. with:
  745. path: /home/runner/.cache/bazel
  746. key: bazel_valgrind
  747. - name: setup
  748. run: |
  749. sudo ./ci/setup_ci_environment.sh
  750. sudo ./ci/setup_cmake.sh
  751. sudo ./ci/install_bazelisk.sh
  752. - name: run tests
  753. run: ./ci/do_ci.sh bazel.valgrind
  754. bazel_noexcept:
  755. name: Bazel noexcept
  756. runs-on: ubuntu-latest
  757. steps:
  758. - name: Harden the runner (Audit all outbound calls)
  759. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  760. with:
  761. egress-policy: audit
  762. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  763. with:
  764. submodules: 'recursive'
  765. - name: Mount Bazel Cache
  766. uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
  767. env:
  768. cache-name: bazel_cache
  769. with:
  770. path: /home/runner/.cache/bazel
  771. key: bazel_noexcept
  772. - name: setup
  773. run: |
  774. sudo ./ci/setup_ci_environment.sh
  775. sudo ./ci/setup_cmake.sh
  776. sudo ./ci/install_bazelisk.sh
  777. - name: run tests
  778. run: ./ci/do_ci.sh bazel.noexcept
  779. bazel_nortti:
  780. name: Bazel nortti
  781. runs-on: ubuntu-latest
  782. steps:
  783. - name: Harden the runner (Audit all outbound calls)
  784. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  785. with:
  786. egress-policy: audit
  787. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  788. with:
  789. submodules: 'recursive'
  790. - name: Mount Bazel Cache
  791. uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
  792. env:
  793. cache-name: bazel_cache
  794. with:
  795. path: /home/runner/.cache/bazel
  796. key: bazel_nortti
  797. - name: setup
  798. run: |
  799. sudo ./ci/setup_ci_environment.sh
  800. sudo ./ci/setup_cmake.sh
  801. sudo ./ci/install_bazelisk.sh
  802. - name: run tests
  803. run: ./ci/do_ci.sh bazel.nortti
  804. bazel_asan:
  805. name: Bazel asan config
  806. runs-on: ubuntu-latest
  807. steps:
  808. - name: Harden the runner (Audit all outbound calls)
  809. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  810. with:
  811. egress-policy: audit
  812. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  813. with:
  814. submodules: 'recursive'
  815. - name: Mount Bazel Cache
  816. uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
  817. env:
  818. cache-name: bazel_cache
  819. with:
  820. path: /home/runner/.cache/bazel
  821. key: bazel_asan
  822. - name: setup
  823. run: |
  824. sudo ./ci/setup_ci_environment.sh
  825. sudo ./ci/setup_cmake.sh
  826. sudo ./ci/install_bazelisk.sh
  827. - name: run tests
  828. run: ./ci/do_ci.sh bazel.asan
  829. bazel_tsan:
  830. name: Bazel tsan config
  831. runs-on: ubuntu-latest
  832. steps:
  833. - name: Harden the runner (Audit all outbound calls)
  834. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  835. with:
  836. egress-policy: audit
  837. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  838. with:
  839. submodules: 'recursive'
  840. - name: Mount Bazel Cache
  841. uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
  842. env:
  843. cache-name: bazel_cache
  844. with:
  845. path: /home/runner/.cache/bazel
  846. key: bazel_tsan
  847. - name: setup
  848. run: |
  849. sudo ./ci/setup_ci_environment.sh
  850. sudo ./ci/setup_cmake.sh
  851. sudo ./ci/install_bazelisk.sh
  852. - name: run tests
  853. run: ./ci/do_ci.sh bazel.tsan
  854. bazel_osx:
  855. name: Bazel on MacOS
  856. runs-on: macos-latest
  857. steps:
  858. - name: Harden the runner (Audit all outbound calls)
  859. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  860. with:
  861. egress-policy: audit
  862. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  863. with:
  864. submodules: 'recursive'
  865. - name: Mount Bazel Cache
  866. uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
  867. env:
  868. cache-name: bazel_cache
  869. with:
  870. path: /Users/runner/.cache/bazel
  871. key: bazel_osx
  872. - name: run tests
  873. run: ./ci/do_ci.sh bazel.macos.test
  874. benchmark:
  875. name: Benchmark
  876. runs-on: ubuntu-latest
  877. steps:
  878. - name: Harden the runner (Audit all outbound calls)
  879. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  880. with:
  881. egress-policy: audit
  882. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  883. with:
  884. submodules: 'recursive'
  885. - name: Mount Bazel Cache
  886. uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
  887. env:
  888. cache-name: bazel_cache
  889. with:
  890. path: /home/runner/.cache/bazel
  891. key: bazel_benchmark
  892. - name: setup
  893. run: |
  894. sudo ./ci/setup_ci_environment.sh
  895. sudo ./ci/install_bazelisk.sh
  896. - name: run tests
  897. run: |
  898. env BENCHMARK_DIR=/benchmark
  899. ./ci/do_ci.sh benchmark
  900. - name: Upload benchmark results
  901. uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
  902. with:
  903. name: benchmark_reports
  904. path: /home/runner/benchmark
  905. format:
  906. name: Format
  907. runs-on: ubuntu-24.04
  908. steps:
  909. - name: Harden the runner (Audit all outbound calls)
  910. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  911. with:
  912. egress-policy: audit
  913. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  914. - name: setup
  915. run: sudo apt remove needrestart && sudo ./ci/install_format_tools.sh #refer: https://github.com/actions/runner-images/issues/9937
  916. - name: run tests
  917. run: ./ci/do_ci.sh format
  918. copyright:
  919. name: Copyright
  920. runs-on: ubuntu-22.04
  921. steps:
  922. - name: Harden the runner (Audit all outbound calls)
  923. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  924. with:
  925. egress-policy: audit
  926. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  927. - name: check copyright
  928. run: ./tools/check_copyright.sh
  929. windows:
  930. name: CMake -> exporter proto
  931. runs-on: windows-2019
  932. steps:
  933. - name: Harden the runner (Audit all outbound calls)
  934. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  935. with:
  936. egress-policy: audit
  937. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  938. with:
  939. submodules: 'recursive'
  940. - name: setup
  941. run: |
  942. ./ci/setup_cmake.ps1
  943. ./ci/setup_windows_ci_environment.ps1
  944. ./ci/install_windows_protobuf.ps1
  945. - name: run cmake test
  946. run: ./ci/do_ci.ps1 cmake.test
  947. - name: run otprotocol test
  948. run: ./ci/do_ci.ps1 cmake.exporter.otprotocol.test
  949. windows-build-dll:
  950. name: CMake -> exporter proto (Build as DLL)
  951. runs-on: windows-2019
  952. steps:
  953. - name: Harden the runner (Audit all outbound calls)
  954. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  955. with:
  956. egress-policy: audit
  957. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  958. with:
  959. submodules: 'recursive'
  960. - name: setup
  961. run: |
  962. ./ci/setup_cmake.ps1
  963. ./ci/setup_windows_ci_environment.ps1
  964. ./ci/install_windows_protobuf.ps1
  965. - name: run cmake test (DLL build)
  966. run: ./ci/do_ci.ps1 cmake.dll.test
  967. - name: run cmake cxx20 test (DLL build)
  968. run: ./ci/do_ci.ps1 cmake.dll.cxx20.test
  969. - name: run otprotocol test (DLL build)
  970. run: ./ci/do_ci.ps1 cmake.exporter.otprotocol.dll.test
  971. windows_with_async_export:
  972. name: CMake (With async export) -> exporter proto
  973. runs-on: windows-2019
  974. steps:
  975. - name: Harden the runner (Audit all outbound calls)
  976. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  977. with:
  978. egress-policy: audit
  979. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  980. with:
  981. submodules: 'recursive'
  982. - name: setup
  983. run: |
  984. ./ci/setup_cmake.ps1
  985. ./ci/setup_windows_ci_environment.ps1
  986. ./ci/install_windows_protobuf.ps1
  987. - name: run cmake test
  988. run: ./ci/do_ci.ps1 cmake.with_async_export.test
  989. - name: run otprotocol test
  990. run: ./ci/do_ci.ps1 cmake.exporter.otprotocol.with_async_export.test
  991. windows_bazel:
  992. name: Bazel Windows
  993. runs-on: windows-2019
  994. steps:
  995. - name: Harden the runner (Audit all outbound calls)
  996. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  997. with:
  998. egress-policy: audit
  999. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  1000. with:
  1001. submodules: 'recursive'
  1002. - name: setup
  1003. run: |
  1004. ./ci/install_windows_bazelisk.ps1
  1005. - name: run tests
  1006. run: ./ci/do_ci.ps1 bazel.build
  1007. windows_plugin_test:
  1008. name: Plugin -> CMake Windows
  1009. runs-on: windows-2019
  1010. steps:
  1011. - name: Harden the runner (Audit all outbound calls)
  1012. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  1013. with:
  1014. egress-policy: audit
  1015. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  1016. with:
  1017. submodules: 'recursive'
  1018. - name: setup
  1019. run: |
  1020. ./ci/setup_cmake.ps1
  1021. ./ci/setup_windows_ci_environment.ps1
  1022. - name: run tests
  1023. run: ./ci/do_ci.ps1 cmake.test_example_plugin
  1024. code_coverage:
  1025. name: Code coverage
  1026. runs-on: ubuntu-22.04
  1027. steps:
  1028. - name: Harden the runner (Audit all outbound calls)
  1029. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  1030. with:
  1031. egress-policy: audit
  1032. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  1033. with:
  1034. submodules: 'recursive'
  1035. - name: setup
  1036. env:
  1037. CC: /usr/bin/gcc-10
  1038. CXX: /usr/bin/g++-10
  1039. run: |
  1040. sudo -E ./ci/setup_ci_environment.sh
  1041. sudo -E ./ci/setup_cmake.sh
  1042. sudo -E ./ci/setup_googletest.sh
  1043. - name: run tests and generate report
  1044. env:
  1045. CC: /usr/bin/gcc-10
  1046. CXX: /usr/bin/g++-10
  1047. run: ./ci/do_ci.sh code.coverage
  1048. - name: upload report
  1049. uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
  1050. with:
  1051. files: /home/runner/build/coverage.info
  1052. markdown-lint:
  1053. runs-on: ubuntu-latest
  1054. steps:
  1055. - name: Harden the runner (Audit all outbound calls)
  1056. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  1057. with:
  1058. egress-policy: audit
  1059. - name: check out code
  1060. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  1061. - name: install markdownlint-cli
  1062. run: sudo npm install -g [email protected]
  1063. - name: run markdownlint
  1064. run: markdownlint .
  1065. shellcheck:
  1066. runs-on: ubuntu-latest
  1067. steps:
  1068. - name: Harden the runner (Audit all outbound calls)
  1069. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  1070. with:
  1071. egress-policy: audit
  1072. - name: check out code
  1073. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  1074. - name: install shellcheck
  1075. run: sudo apt install --assume-yes shellcheck
  1076. - name: run shellcheck
  1077. run: find . -name \*.sh | xargs shellcheck --severity=error
  1078. misspell:
  1079. runs-on: ubuntu-latest
  1080. steps:
  1081. - name: Harden the runner (Audit all outbound calls)
  1082. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  1083. with:
  1084. egress-policy: audit
  1085. - name: check out code
  1086. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  1087. - name: install misspell
  1088. run: |
  1089. curl -L -o ./install-misspell.sh https://git.io/misspell
  1090. sh ./install-misspell.sh
  1091. - name: run misspell
  1092. run: ./bin/misspell -error .
  1093. docfx_check:
  1094. name: DocFX check
  1095. runs-on: windows-latest
  1096. steps:
  1097. - name: Harden the runner (Audit all outbound calls)
  1098. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  1099. with:
  1100. egress-policy: audit
  1101. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  1102. - name: install docfx
  1103. run: choco install docfx -y --version=2.58.5
  1104. - name: run ./ci/docfx.cmd
  1105. shell: cmd
  1106. run: ./ci/docfx.cmd
  1107. w3c_trace_context_compliance_v1:
  1108. name: W3C Distributed Tracing Validation V1
  1109. runs-on: ubuntu-latest
  1110. steps:
  1111. - name: Harden the runner (Audit all outbound calls)
  1112. uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
  1113. with:
  1114. egress-policy: audit
  1115. - name: Checkout open-telemetry/opentelemetry-cpp
  1116. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  1117. with:
  1118. submodules: 'recursive'
  1119. - name: setup
  1120. env:
  1121. CC: /usr/bin/gcc-12
  1122. CXX: /usr/bin/g++-12
  1123. run: |
  1124. sudo -E ./ci/setup_ci_environment.sh
  1125. sudo -E ./ci/setup_cmake.sh
  1126. sudo -E ./ci/setup_googletest.sh
  1127. - name: run w3c trace-context test server (background)
  1128. env:
  1129. CXX_STANDARD: '14'
  1130. run: |
  1131. ./ci/do_ci.sh cmake.w3c.trace-context.build-server
  1132. cd $HOME/build/ext/test/w3c_tracecontext_http_test_server
  1133. ./w3c_tracecontext_http_test_server &
  1134. - name: Checkout w3c/trace-context repo
  1135. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  1136. with:
  1137. repository: w3c/trace-context
  1138. path: trace-context
  1139. - name: install dependencies
  1140. run: |
  1141. sudo apt update && sudo apt install python3-pip
  1142. sudo pip3 install aiohttp==3.11.18
  1143. - name: run w3c trace-context test suite
  1144. env:
  1145. SPEC_LEVEL: 1
  1146. run:
  1147. |
  1148. python ${GITHUB_WORKSPACE}/trace-context/test/test.py http://localhost:30000/test TraceContextTest AdvancedTest
  1149. curl http://localhost:30000/stop