File: ci.yml

package info (click to toggle)
opentelemetry-cpp 1.23.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,368 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 38; python: 31
file content (1161 lines) | stat: -rw-r--r-- 36,826 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
name: CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

permissions:
  contents: read

jobs:

# Commented 2024-11-06, lack of workers in github causes CI failures
#  arm64_test:
#    name: CMake test arm64 (with modern protobuf,grpc and abseil)
#    runs-on: actuated-arm64-4cpu-16gb
#    steps:
#    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
#      with:
#        submodules: 'recursive'
#    - name: setup
#      env:
#        CXX_STANDARD: '14'
#        CC: /usr/bin/gcc-10
#        CXX: /usr/bin/g++-10
#      run: |
#        sudo -E ./ci/setup_gcc10.sh
#        sudo -E ./ci/setup_ci_environment.sh
#    - name: install dependencies
#      run: |
#        sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release

  cmake_test:
    name: CMake test (prometheus, elasticsearch, zipkin)
    runs-on: ubuntu-22.04
    env:
      CXX_STANDARD: '17'
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
        sudo -E apt-get install -y zlib1g-dev libcurl4-openssl-dev nlohmann-json3-dev
    - name: run cmake tests
      run: |
        ./ci/do_ci.sh cmake.test

  cmake_fetch_content_test:
    name: CMake FetchContent usage with opentelemetry-cpp
    runs-on: ubuntu-24.04
    env:
      CXX_STANDARD: '17'
      CMAKE_VERSION: '3.16.0'
      BUILD_TYPE: 'Debug'
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit
    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
        sudo -E ./ci/setup_cmake.sh
    - name: install dependencies
      run: |
        sudo -E apt-get update
        sudo -E apt-get install -y zlib1g-dev
    - name: run fetch content cmake test
      run: |
        ./ci/do_ci.sh cmake.fetch_content.test

  cmake_gcc_maintainer_sync_test:
    name: CMake gcc 14 (maintainer mode, sync)
    runs-on: ubuntu-24.04
    env:
      CC: /usr/bin/gcc-14
      CXX: /usr/bin/g++-14
      CXX_STANDARD: '14'
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit
    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: install dependencies
      run: |
        sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release
    - name: run cmake gcc (maintainer mode, sync)
      run: |
        ./ci/do_ci.sh cmake.maintainer.sync.test
    - name: generate test cert
      env:
        CFSSL_VERSION: 1.6.3
      run: |
        sudo -E ./tools/setup-cfssl.sh
        (cd ./functional/cert; ./generate_cert.sh)
    - name: run func test
      run: |
        (cd ./functional/otlp; ./run_test.sh)

  cmake_gcc_maintainer_async_test:
    name: CMake gcc 14 (maintainer mode, async)
    runs-on: ubuntu-24.04
    env:
      CC: /usr/bin/gcc-14
      CXX: /usr/bin/g++-14
      CXX_STANDARD: '14'
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit
    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: install dependencies
      run: |
        sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release
    - name: run cmake gcc (maintainer mode, async)
      run: |
        ./ci/do_ci.sh cmake.maintainer.async.test
    - name: generate test cert
      env:
        CFSSL_VERSION: 1.6.3
      run: |
        sudo -E ./tools/setup-cfssl.sh
        (cd ./functional/cert; ./generate_cert.sh)
    - name: run func test
      run: |
        (cd ./functional/otlp; ./run_test.sh)

  cmake_clang_maintainer_sync_test:
    name: CMake clang 18 (maintainer mode, sync)
    runs-on: ubuntu-24.04
    env:
      CC: /usr/bin/clang-18
      CXX: /usr/bin/clang++-18
      CXX_STANDARD: '14'
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit
    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: install dependencies
      run: |
        sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release
    - name: run cmake clang (maintainer mode, sync)
      run: |
        ./ci/do_ci.sh cmake.maintainer.sync.test
    - name: generate test cert
      env:
        CFSSL_VERSION: 1.6.3
      run: |
        sudo -E ./tools/setup-cfssl.sh
        (cd ./functional/cert; ./generate_cert.sh)
    - name: run func test
      run: |
        (cd ./functional/otlp; ./run_test.sh)

  cmake_clang_maintainer_async_test:
    name: CMake clang 18 (maintainer mode, async)
    runs-on: ubuntu-24.04
    env:
      CC: /usr/bin/clang-18
      CXX: /usr/bin/clang++-18
      CXX_STANDARD: '14'
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit
    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: install dependencies
      run: |
        sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release
    - name: run cmake clang (maintainer mode, async)
      run: |
        ./ci/do_ci.sh cmake.maintainer.async.test
    - name: generate test cert
      env:
        CFSSL_VERSION: 1.6.3
      run: |
        sudo -E ./tools/setup-cfssl.sh
        (cd ./functional/cert; ./generate_cert.sh)
    - name: run func test
      run: |
        (cd ./functional/otlp; ./run_test.sh)

  cmake_clang_maintainer_abiv2_test:
    name: CMake clang 18 (maintainer mode, abiv2)
    runs-on: ubuntu-24.04
    env:
      CC: /usr/bin/clang-18
      CXX: /usr/bin/clang++-18
      CXX_STANDARD: '14'
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit
    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: install dependencies
      run: |
        sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release
    - name: run cmake clang (maintainer mode, abiv2)
      run: |
        ./ci/do_ci.sh cmake.maintainer.abiv2.test
    - name: generate test cert
      env:
        CFSSL_VERSION: 1.6.3
      run: |
        sudo -E ./tools/setup-cfssl.sh
        (cd ./functional/cert; ./generate_cert.sh)
    - name: run func test
      run: |
        (cd ./functional/otlp; ./run_test.sh)

  cmake_msvc_maintainer_test:
    name: CMake msvc (maintainer mode)
    runs-on: windows-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        ./ci/setup_windows_ci_environment.ps1
    - name: run tests
      run: ./ci/do_ci.ps1 cmake.maintainer.test

  cmake_msvc_maintainer_test_stl_cxx20:
    name: CMake msvc (maintainer mode) with C++20
    runs-on: windows-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        ./ci/setup_windows_ci_environment.ps1
    - name: run tests
      env:
        CXX_STANDARD: '20'
      run: ./ci/do_ci.ps1 cmake.maintainer.cxx20.stl.test

  cmake_msvc_maintainer_abiv2_test:
    name: CMake msvc (maintainer mode, abiv2)
    runs-on: windows-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        ./ci/setup_windows_ci_environment.ps1
    - name: run tests
      env:
        CXX_STANDARD: '20'
      run: ./ci/do_ci.ps1 cmake.maintainer.abiv2.test

  cmake_with_async_export_test:
    name: CMake test (without otlp-exporter and with async export)
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      env:
        CC: /usr/bin/gcc-12
        CXX: /usr/bin/g++-12
      run: |
        sudo -E ./ci/setup_ci_environment.sh
        sudo -E apt-get install -y zlib1g-dev libcurl4-openssl-dev
    - name: run cmake tests (without otlp-exporter)
      env:
        CC: /usr/bin/gcc-12
        CXX: /usr/bin/g++-12
      run: |
        ./ci/do_ci.sh cmake.with_async_export.test

  cmake_opentracing_shim_test:
    name: CMake test (with opentracing-shim)
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: run cmake tests (enable opentracing-shim)
      run: ./ci/do_ci.sh cmake.opentracing_shim.test

  cmake_test_cxx14_gcc:
    name: CMake C++14 test(GCC)
    runs-on: ubuntu-22.04
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: run tests (enable stl)
      env:
        CXX_STANDARD: '14'
      run: ./ci/do_ci.sh cmake.c++14.stl.test

  cmake_test_cxx17_gcc:
    name: CMake C++17 test(GCC)
    runs-on: ubuntu-22.04
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: run tests (enable stl)
      env:
        CXX_STANDARD: '17'
      run: ./ci/do_ci.sh cmake.c++17.stl.test

  cmake_test_cxx20_gcc:
    name: CMake C++20 test(GCC)
    runs-on: ubuntu-22.04
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: run tests
      env:
        CXX_STANDARD: '20'
      run: ./ci/do_ci.sh cmake.c++20.test
    - name: run tests (enable stl)
      env:
        CXX_STANDARD: '20'
      run: ./ci/do_ci.sh cmake.c++20.stl.test

  cmake_test_cxx20_clang:
    name: CMake C++20 test(Clang with libc++)
    runs-on: ubuntu-22.04
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      env:
        CC: /usr/bin/clang
        CXX: /usr/bin/clang++
        CXXFLAGS: "-stdlib=libc++"
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: run tests
      env:
        CC: /usr/bin/clang
        CXX: /usr/bin/clang++
        CXXFLAGS: "-stdlib=libc++"
        CXX_STANDARD: '20'
      run: ./ci/do_ci.sh cmake.c++20.test
    - name: run tests (enable stl)
      env:
        CC: /usr/bin/clang
        CXX: /usr/bin/clang++
        CXXFLAGS: "-stdlib=libc++"
        CXX_STANDARD: '20'
      run: ./ci/do_ci.sh cmake.c++20.stl.test

  cmake_test_cxx23_gcc:
    name: CMake C++23 test(GCC)
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: run tests
      env:
        CXX_STANDARD: '23'
      run: ./ci/do_ci.sh cmake.c++23.test
    - name: run tests (enable stl)
      env:
        CXX_STANDARD: '23'
      run: ./ci/do_ci.sh cmake.c++23.stl.test

  cmake_test_cxx23_clang:
    name: CMake C++23 test(Clang with libc++)
    runs-on: ubuntu-22.04
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      env:
        CC: /usr/bin/clang
        CXX: /usr/bin/clang++
        CXXFLAGS: "-stdlib=libc++"
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: run tests
      env:
        CC: /usr/bin/clang
        CXX: /usr/bin/clang++
        CXXFLAGS: "-stdlib=libc++"
        CXX_STANDARD: '23'
      run: ./ci/do_ci.sh cmake.c++23.test
    - name: run tests (enable stl)
      env:
        CC: /usr/bin/clang
        CXX: /usr/bin/clang++
        CXXFLAGS: "-stdlib=libc++"
        CXX_STANDARD: '23'
      run: ./ci/do_ci.sh cmake.c++23.stl.test

  cmake_otprotocol_test:
    name: CMake test (with otlp-exporter)
    runs-on: ubuntu-22.04
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: install dependencies
      run: |
        sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release
    - name: run otlp exporter tests
      run: |
        ./ci/do_ci.sh cmake.exporter.otprotocol.test
    - name: generate test cert
      env:
        CFSSL_VERSION: 1.6.3
      run: |
        sudo -E ./tools/setup-cfssl.sh
        (cd ./functional/cert; ./generate_cert.sh)
    - name: run func test
      run: |
        (cd ./functional/otlp; ./run_test.sh)

  cmake_modern_protobuf_grpc_with_abseil_test:
    name: CMake test (with modern protobuf,grpc and abseil)
    runs-on: ubuntu-latest
    env:
      CXX_STANDARD: '14'
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit
    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: install dependencies
      run: |
        sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file install/cmake/third_party_stable
    - name: run otlp exporter tests
      run: |
        ./ci/do_ci.sh cmake.exporter.otprotocol.test

  cmake_do_not_install_test:
    name: CMake do not install test (with otlp-exporter)
    runs-on: ubuntu-22.04
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: install dependencies
      run: |
        sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release
    - name: run otlp exporter tests
      run: |
        ./ci/do_ci.sh cmake.do_not_install.test

  cmake_otprotocol_shared_libs_with_static_grpc_test:
    name: CMake test (build shared libraries with otlp-exporter and static gRPC)
    runs-on: ubuntu-22.04
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: install dependencies
      run: |
        sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release
    - name: run otlp exporter tests
      run: |
        ./ci/do_ci.sh cmake.exporter.otprotocol.shared_libs.with_static_grpc.test

  plugin_test:
    name: Plugin -> CMake
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      env:
        CC: /usr/bin/gcc-12
        CXX: /usr/bin/g++-12
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: run tests
      env:
        CC: /usr/bin/gcc-12
        CXX: /usr/bin/g++-12
      run: ./ci/do_ci.sh cmake.test_example_plugin

  bazel_test:
    name: Bazel
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: Mount Bazel Cache
      uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
      env:
        cache-name: bazel_cache
      with:
        path: /home/runner/.cache/bazel
        key: bazel_test
    - name: setup
      run: |
        sudo ./ci/setup_ci_environment.sh
        sudo ./ci/install_bazelisk.sh
    - name: run tests
      run: ./ci/do_ci.sh bazel.test

  bazel_no_bzlmod_test:
    name: Bazel without bzlmod
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: Mount Bazel Cache
      uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
      env:
        cache-name: bazel_cache
      with:
        path: /home/runner/.cache/bazel
        key: bazel_test
    - name: setup
      run: |
        sudo ./ci/setup_ci_environment.sh
        sudo ./ci/install_bazelisk.sh
    - name: run tests
      run: ./ci/do_ci.sh bazel.no_bzlmod.test

  bazel_test_async:
    name: Bazel with async export
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: Mount Bazel Cache
      uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
      env:
        cache-name: bazel_cache
      with:
        path: /home/runner/.cache/bazel
        key: bazel_test
    - name: setup
      run: |
        sudo ./ci/setup_ci_environment.sh
        sudo ./ci/install_bazelisk.sh
    - name: run tests
      run: ./ci/do_ci.sh bazel.with_async_export.test

  bazel_valgrind:
    name: Bazel valgrind
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: Mount Bazel Cache
      uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
      env:
        cache-name: bazel_cache
      with:
        path: /home/runner/.cache/bazel
        key: bazel_valgrind
    - name: setup
      run: |
        sudo ./ci/setup_ci_environment.sh
        sudo ./ci/install_bazelisk.sh
    - name: run tests
      run: ./ci/do_ci.sh bazel.valgrind

  bazel_noexcept:
    name: Bazel noexcept
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: Mount Bazel Cache
      uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
      env:
        cache-name: bazel_cache
      with:
        path: /home/runner/.cache/bazel
        key: bazel_noexcept
    - name: setup
      run: |
        sudo ./ci/setup_ci_environment.sh
        sudo ./ci/install_bazelisk.sh
    - name: run tests
      run: ./ci/do_ci.sh bazel.noexcept

  bazel_nortti:
    name: Bazel nortti
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: Mount Bazel Cache
      uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
      env:
        cache-name: bazel_cache
      with:
        path: /home/runner/.cache/bazel
        key: bazel_nortti
    - name: setup
      run: |
        sudo ./ci/setup_ci_environment.sh
        sudo ./ci/install_bazelisk.sh
    - name: run tests
      run: ./ci/do_ci.sh bazel.nortti

  bazel_asan:
    name: Bazel asan config
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: Mount Bazel Cache
      uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
      env:
        cache-name: bazel_cache
      with:
        path: /home/runner/.cache/bazel
        key: bazel_asan
    - name: setup
      run: |
        sudo ./ci/setup_ci_environment.sh
        sudo ./ci/install_bazelisk.sh
    - name: run tests
      run: ./ci/do_ci.sh bazel.asan

  bazel_tsan:
    name: Bazel tsan config
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: Mount Bazel Cache
      uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
      env:
        cache-name: bazel_cache
      with:
        path: /home/runner/.cache/bazel
        key: bazel_tsan
    - name: setup
      run: |
        sudo ./ci/setup_ci_environment.sh
        sudo ./ci/install_bazelisk.sh
    - name: run tests
      run: ./ci/do_ci.sh bazel.tsan

  bazel_osx:
    name: Bazel on MacOS
    runs-on: macos-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: Mount Bazel Cache
      uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
      env:
        cache-name: bazel_cache
      with:
        path: /Users/runner/.cache/bazel
        key: bazel_osx
    - name: run tests
      run: ./ci/do_ci.sh bazel.macos.test

  benchmark:
    name: Benchmark
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: Mount Bazel Cache
      uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
      env:
        cache-name: bazel_cache
      with:
        path: /home/runner/.cache/bazel
        key: bazel_benchmark
    - name: setup
      run: |
        sudo ./ci/setup_ci_environment.sh
        sudo ./ci/install_bazelisk.sh
    - name: run tests
      run: |
        env BENCHMARK_DIR=/benchmark
        ./ci/do_ci.sh benchmark
    - name: Upload benchmark results
      uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
      with:
        name: benchmark_reports
        path: /home/runner/benchmark

  format:
    name: Format
    runs-on: ubuntu-24.04
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
    - name: setup
      run: sudo ./ci/install_format_tools.sh
    - name: run tests
      run: ./ci/do_ci.sh format

  copyright:
    name: Copyright
    runs-on: ubuntu-22.04
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
    - name: check copyright
      run: ./tools/check_copyright.sh

  windows:
    name: CMake -> exporter proto
    runs-on: windows-2022
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        ./ci/setup_windows_ci_environment.ps1
        ./ci/install_windows_protobuf.ps1
    - name: run cmake test
      run: ./ci/do_ci.ps1 cmake.test
    - name: run otprotocol test
      run: ./ci/do_ci.ps1 cmake.exporter.otprotocol.test

  windows-build-dll:
    name: CMake -> exporter proto (Build as DLL)
    runs-on: windows-2022
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        ./ci/setup_windows_ci_environment.ps1
        ./ci/install_windows_protobuf.ps1
    - name: run cmake test (DLL build)
      run: ./ci/do_ci.ps1 cmake.dll.test
    - name: run cmake cxx20 test (DLL build)
      run: ./ci/do_ci.ps1 cmake.dll.cxx20.test
    - name: run otprotocol test (DLL build)
      run: ./ci/do_ci.ps1 cmake.exporter.otprotocol.dll.test

  windows_with_async_export:
    name: CMake (With async export) -> exporter proto
    runs-on: windows-2022
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        ./ci/setup_windows_ci_environment.ps1
        ./ci/install_windows_protobuf.ps1
    - name: run cmake test
      run: ./ci/do_ci.ps1 cmake.with_async_export.test
    - name: run otprotocol test
      run: ./ci/do_ci.ps1 cmake.exporter.otprotocol.with_async_export.test

  windows_bazel:
    name: Bazel Windows
    runs-on: windows-2022
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        ./ci/install_windows_bazelisk.ps1
    - name: run tests
      run: ./ci/do_ci.ps1 bazel.build

  windows_plugin_test:
    name: Plugin -> CMake Windows
    runs-on: windows-2022
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      run: |
        ./ci/setup_windows_ci_environment.ps1
    - name: run tests
      run: ./ci/do_ci.ps1 cmake.test_example_plugin

  code_coverage:
    name: Code coverage
    runs-on: ubuntu-22.04
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        submodules: 'recursive'
    - name: setup
      env:
        CC: /usr/bin/gcc-10
        CXX: /usr/bin/g++-10
      run: |
        sudo -E ./ci/setup_ci_environment.sh
    - name: run tests and generate report
      env:
        CC: /usr/bin/gcc-10
        CXX: /usr/bin/g++-10
      run: ./ci/do_ci.sh code.coverage
    - name: upload report
      uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
      with:
        files: /home/runner/build/coverage.info

  markdown-lint:
    runs-on: ubuntu-latest

    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - name: check out code
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

    - name: install markdownlint-cli
      run: sudo npm install -g markdownlint-cli@0.44.0

    - name: run markdownlint
      run: markdownlint .

  shellcheck:
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - name: check out code
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
    - name: install shellcheck
      run: sudo apt install --assume-yes shellcheck
    - name: run shellcheck
      run: find . -name \*.sh | xargs shellcheck --severity=error

  misspell:
    runs-on: ubuntu-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - name: check out code
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
    - name: install misspell
      run: |
        curl -L -o ./install-misspell.sh https://git.io/misspell
        sh ./install-misspell.sh
    - name: run misspell
      run: ./bin/misspell -error .

  docfx_check:
    name: DocFX check
    runs-on: windows-latest
    steps:
    - name: Harden the runner (Audit all outbound calls)
      uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
      with:
        egress-policy: audit

    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
    - name: install docfx
      run: choco install docfx -y --version=2.58.5
    - name: run ./ci/docfx.cmd
      shell: cmd
      run: ./ci/docfx.cmd

  w3c_trace_context_compliance_v1:
    name: W3C Distributed Tracing Validation V1
    runs-on: ubuntu-latest
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
        with:
          egress-policy: audit

      - name: Checkout open-telemetry/opentelemetry-cpp
        uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
        with:
          submodules: 'recursive'
      - name: setup
        env:
          CC: /usr/bin/gcc-12
          CXX: /usr/bin/g++-12
        run: |
          sudo -E ./ci/setup_ci_environment.sh
          sudo -E apt-get install -y zlib1g-dev libcurl4-openssl-dev
      - name: run w3c trace-context test server (background)
        env:
          CXX_STANDARD: '14'
        run: |
          ./ci/do_ci.sh cmake.w3c.trace-context.build-server
          cd $HOME/build/ext/test/w3c_tracecontext_http_test_server
          ./w3c_tracecontext_http_test_server &
      - name: Checkout w3c/trace-context repo
        uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
        with:
          repository: w3c/trace-context
          path: trace-context
      - name: install dependencies
        run: |
          sudo apt update && sudo apt install python3-pip
          sudo pip3 install aiohttp==3.11.18
      - name: run w3c trace-context test suite
        env:
          SPEC_LEVEL: 1
        run:
          |
          python ${GITHUB_WORKSPACE}/trace-context/test/test.py http://localhost:30000/test TraceContextTest AdvancedTest
          curl http://localhost:30000/stop