-
Notifications
You must be signed in to change notification settings - Fork 4
1060 lines (956 loc) · 34.3 KB
/
ci.yml
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
#
# Copyright (c) 2023 Christian Mazakas
# Copyright (c) 2023 Alan de Freitas
# Copyright (c) 2021-2023 Sam Darwin
# Copyright (c) 2020-2021 Peter Dimov
# Copyright (c) 2021 Andrey Semashev
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# Official repository: https://github.com/CPPAlliance/http_io/
#
name: CI
on:
pull_request:
push:
branches:
- master
- develop
- bugfix/**
- feature/**
- fix/**
- pr/**
concurrency:
group: ${{format('{0}:{1}', github.repository, github.ref)}}
cancel-in-progress: true
env:
GIT_FETCH_JOBS: 8
NET_RETRY_COUNT: 5
DEFAULT_BUILD_VARIANT: debug,release
UBSAN_OPTIONS: "print_stacktrace=1"
ASAN_OPTIONS: "detect_invalid_pointer_pairs=2"
jobs:
runner-selection:
name: Runner Selection
runs-on: ${{ github.repository_owner == 'boostorg' && fromJSON('[ "self-hosted", "linux", "x64", "ubuntu-latest-aws" ]') || 'ubuntu-latest' }}
outputs:
labelmatrix: ${{ steps.aws_hosted_runners.outputs.labelmatrix }}
steps:
- name: AWS Hosted Runners
id: aws_hosted_runners
uses: cppalliance/aws-hosted-runners@v1.0.0
build:
needs: [ runner-selection ]
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
# Windows compilers
#
- compiler: "msvc"
version: "14.34"
cxxstd: "17,20"
latest-cxxstd: "20"
runs-on: "windows-2022"
b2-toolset: "msvc-14.3"
generator: "Visual Studio 17 2022"
is-latest: true
name: "MSVC 14.34: C++17-20"
build-type: "Release"
build-cmake: true
- compiler: "msvc"
version: "14.34"
cxxstd: "17,20"
latest-cxxstd: "20"
runs-on: "windows-2022"
b2-toolset: "msvc-14.3"
generator: "Visual Studio 17 2022"
is-latest: true
name: "MSVC 14.34: C++17-20 (x86)"
x86: true
build-type: "Release"
- compiler: "msvc"
version: "14.34"
cxxstd: "17,20"
latest-cxxstd: "20"
runs-on: "windows-2022"
b2-toolset: "msvc-14.3"
generator: "Visual Studio 17 2022"
is-latest: true
name: "MSVC 14.34: C++17-20 (shared)"
shared: true
build-type: "Release"
build-cmake: true
- compiler: "msvc"
version: "14.29"
cxxstd: "14,17"
latest-cxxstd: "17"
runs-on: "windows-2019"
b2-toolset: "msvc-14.2"
generator: "Visual Studio 16 2019"
is-earliest: true
name: "MSVC 14.29: C++14-17"
build-type: "Release"
- compiler: "clang-cl"
version: "*"
cxx: "clang++-cl"
cc: "clang-cl"
runs-on: "windows-2022"
b2-toolset: "clang-win"
generator-toolset: "ClangCL"
is-latest: true
is-earliest: true
name: "Windows-Clang"
build-type: "Release"
build-cmake: true
- compiler: "mingw"
version: "*"
cxx: "g++"
cc: "gcc"
runs-on: "windows-2022"
b2-toolset: "gcc"
generator: "MinGW Makefiles"
is-latest: true
is-earliest: true
name: "MinGW"
build-type: "Release"
build-cmake: true
- compiler: "mingw"
version: "*"
cxx: "g++"
cc: "gcc"
runs-on: "windows-2022"
b2-toolset: "gcc"
generator: "MinGW Makefiles"
is-latest: true
is-earliest: true
name: "MinGW (shared)"
shared: true
build-type: "Release"
build-cmake: true
# OSX compilers
#
- compiler: "apple-clang"
version: "*"
cxx: "clang++"
cc: "clang"
runs-on: "macos-14"
b2-toolset: "clang"
is-latest: true
is-earliest: true
name: "Apple-Clang (macOS 14)"
build-type: "Release"
build-cmake: true
- compiler: "apple-clang"
version: "*"
cxx: "clang++"
cc: "clang"
runs-on: "macos-14"
b2-toolset: "clang"
is-latest: true
name: "Apple-Clang (macOS 14, ubsan)"
build-type: "RelWithDebInfo"
ubsan: true
- compiler: "apple-clang"
version: "*"
cxx: "clang++"
cc: "clang"
runs-on: "macos-14"
b2-toolset: "clang"
is-latest: true
name: "Apple-Clang (macOS 14, asan)"
build-type: "RelWithDebInfo"
asan: true
# Linux compilers
#
- compiler: "gcc"
version: "13"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "g++-13"
cc: "gcc-13"
runs-on: "ubuntu-latest"
container: "ubuntu:23.04"
b2-toolset: "gcc"
is-latest: true
name: "GCC 13: C++17-20"
build-type: "Release"
install: "cmake zlib1g-dev"
build-cmake: true
- compiler: "gcc"
version: "13"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "g++-13"
cc: "gcc-13"
runs-on: "ubuntu-latest"
container: "ubuntu:23.04"
b2-toolset: "gcc"
is-latest: true
name: "GCC 13: C++17-20 (x86)"
x86: true
build-type: "Release"
install: "cmake gcc-13-multilib g++-13-multilib zlib1g-dev zlib1g-dev:i386 libssl-dev:i386"
- compiler: "gcc"
version: "13"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "g++-13"
cc: "gcc-13"
runs-on: "ubuntu-latest"
container: "ubuntu:23.04"
b2-toolset: "gcc"
is-latest: true
name: "GCC 13: C++17-20 (coverage)"
coverage: true
build-type: "Debug"
cxxflags: "--coverage -fprofile-arcs -ftest-coverage"
ccflags: "--coverage -fprofile-arcs -ftest-coverage"
install: "cmake lcov zlib1g-dev wget unzip"
- compiler: "gcc"
version: "13"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "g++-13"
cc: "gcc-13"
runs-on: "ubuntu-latest"
container: "ubuntu:23.04"
b2-toolset: "gcc"
is-latest: true
name: "GCC 13: C++17-20 (shared)"
shared: true
build-type: "Release"
install: "cmake zlib1g-dev"
build-cmake: true
- compiler: "gcc"
version: "13"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "g++-13"
cc: "gcc-13"
runs-on: "ubuntu-latest"
container: "ubuntu:23.04"
b2-toolset: "gcc"
is-latest: true
name: "GCC 13: C++17-20 (shared, x86)"
shared: true
x86: true
build-type: "Release"
install: "cmake gcc-13-multilib g++-13-multilib zlib1g-dev zlib1g-dev:i386 libssl-dev:i386"
build-cmake: true
- compiler: "gcc"
version: "13"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "g++-13"
cc: "gcc-13"
runs-on: "ubuntu-latest"
container: "ubuntu:23.04"
b2-toolset: "gcc"
is-latest: true
name: "GCC 13: C++17-20 (asan)"
asan: true
build-type: "RelWithDebInfo"
install: "cmake zlib1g-dev"
- compiler: "gcc"
version: "13"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "g++-13"
cc: "gcc-13"
runs-on: "ubuntu-latest"
container: "ubuntu:23.04"
b2-toolset: "gcc"
is-latest: true
name: "GCC 13: C++17-20 (asan, x86)"
asan: true
x86: true
build-type: "RelWithDebInfo"
install: "cmake gcc-13-multilib g++-13-multilib zlib1g-dev zlib1g-dev:i386 libssl-dev:i386"
- compiler: "gcc"
version: "13"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "g++-13"
cc: "gcc-13"
runs-on: "ubuntu-latest"
container: "ubuntu:23.04"
b2-toolset: "gcc"
is-latest: true
name: "GCC 13: C++17-20 (ubsan)"
ubsan: true
build-type: "RelWithDebInfo"
install: "cmake zlib1g-dev"
- compiler: "gcc"
version: "13"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "g++-13"
cc: "gcc-13"
runs-on: "ubuntu-latest"
container: "ubuntu:23.04"
b2-toolset: "gcc"
is-latest: true
name: "GCC 13: C++17-20 (ubsan, x86)"
ubsan: true
x86: true
build-type: "RelWithDebInfo"
install: "cmake gcc-13-multilib g++-13-multilib zlib1g-dev zlib1g-dev:i386 libssl-dev:i386"
- compiler: "gcc"
version: "12"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "g++-12"
cc: "gcc-12"
runs-on: "ubuntu-latest"
container: "ubuntu:22.04"
b2-toolset: "gcc"
name: "GCC 12: C++17-20"
build-type: "Release"
- compiler: "gcc"
version: "11"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "g++-11"
cc: "gcc-11"
runs-on: "ubuntu-latest"
container: "ubuntu:22.04"
b2-toolset: "gcc"
name: "GCC 11: C++17-20"
build-type: "Release"
- compiler: "gcc"
version: "10"
cxxstd: "14,17"
latest-cxxstd: "17"
cxx: "g++-10"
cc: "gcc-10"
runs-on: "ubuntu-latest"
container: "ubuntu:20.04"
b2-toolset: "gcc"
name: "GCC 10: C++14-17"
build-type: "Release"
- compiler: "gcc"
version: "9"
cxxstd: "14,17"
latest-cxxstd: "17"
cxx: "g++-9"
cc: "gcc-9"
runs-on: "ubuntu-latest"
container: "ubuntu:20.04"
b2-toolset: "gcc"
name: "GCC 9: C++14-17"
build-type: "Release"
- compiler: "gcc"
version: "8"
cxxstd: "14,17"
latest-cxxstd: "17"
cxx: "g++-8"
cc: "gcc-8"
runs-on: "ubuntu-latest"
container: "ubuntu:20.04"
b2-toolset: "gcc"
name: "GCC 8: C++14-17"
build-type: "Release"
- compiler: "gcc"
version: "7"
cxxstd: "14,17"
latest-cxxstd: "17"
cxx: "g++-7"
cc: "gcc-7"
runs-on: "ubuntu-latest"
container: "ubuntu:20.04"
b2-toolset: "gcc"
name: "GCC 7: C++14-17"
build-type: "Release"
- compiler: "gcc"
version: "6"
cxxstd: "11,14"
latest-cxxstd: "14"
cxx: "g++-6"
cc: "gcc-6"
runs-on: "ubuntu-latest"
container: "ubuntu:18.04"
b2-toolset: "gcc"
name: "GCC 6: C++11-14"
build-type: "Release"
- compiler: "gcc"
version: "5"
cxxstd: "11"
latest-cxxstd: "11"
cxx: "g++-5"
cc: "gcc-5"
runs-on: "ubuntu-latest"
container: "ubuntu:18.04"
b2-toolset: "gcc"
is-earliest: true
name: "GCC 5: C++11"
build-type: "Release"
- compiler: "clang"
version: "17"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "clang++-17"
cc: "clang-17"
runs-on: "ubuntu-latest"
container: "ubuntu:23.10"
b2-toolset: "clang"
is-latest: true
name: "Clang 17: C++17-20"
build-type: "Release"
install: "zlib1g-dev cmake"
build-cmake: true
- compiler: "clang"
version: "17"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "clang++-17"
cc: "clang-17"
runs-on: "ubuntu-latest"
container: "ubuntu:23.10"
b2-toolset: "clang"
is-latest: true
name: "Clang 17: C++17-20 (x86)"
x86: true
build-type: "Release"
install: "cmake gcc-multilib g++-multilib zlib1g-dev zlib1g-dev:i386 libssl-dev:i386"
- compiler: "clang"
version: "17"
cxxstd: "20"
latest-cxxstd: "20"
cxx: "clang++-17"
cc: "clang-17"
runs-on: "ubuntu-latest"
container: "ubuntu:23.10"
b2-toolset: "clang"
is-latest: true
name: "Clang 17: C++20 (time-trace)"
time-trace: true
build-type: "Release"
cxxflags: "-ftime-trace"
ccflags: "-ftime-trace"
install: "cmake zlib1g-dev wget unzip"
- compiler: "clang"
version: "17"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "clang++-17"
cc: "clang-17"
runs-on: "ubuntu-latest"
container: "ubuntu:23.10"
b2-toolset: "clang"
is-latest: true
name: "Clang 17: C++17-20 (asan)"
asan: true
build-type: "RelWithDebInfo"
install: "cmake zlib1g-dev"
- compiler: "clang"
version: "17"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "clang++-17"
cc: "clang-17"
runs-on: "ubuntu-latest"
container: "ubuntu:23.10"
b2-toolset: "clang"
is-latest: true
name: "Clang 17: C++17-20 (asan, x86)"
asan: true
x86: true
build-type: "RelWithDebInfo"
install: "cmake gcc-multilib g++-multilib zlib1g-dev zlib1g-dev:i386 libssl-dev:i386"
- compiler: "clang"
version: "17"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "clang++-17"
cc: "clang-17"
runs-on: "ubuntu-latest"
container: "ubuntu:23.10"
b2-toolset: "clang"
is-latest: true
name: "Clang 17: C++17-20 (ubsan)"
ubsan: true
build-type: "RelWithDebInfo"
install: "cmake zlib1g-dev"
- compiler: "clang"
version: "17"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "clang++-17"
cc: "clang-17"
runs-on: "ubuntu-latest"
container: "ubuntu:23.10"
b2-toolset: "clang"
is-latest: true
name: "Clang 17: C++17-20 (ubsan, x86)"
ubsan: true
x86: true
build-type: "RelWithDebInfo"
install: "cmake gcc-multilib g++-multilib zlib1g-dev zlib1g-dev:i386 libssl-dev:i386"
- compiler: "clang"
version: "16"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "clang++-16"
cc: "clang-16"
runs-on: "ubuntu-latest"
container: "ubuntu:23.04"
install: "cmake"
b2-toolset: "clang"
name: "Clang 16: C++17-20"
build-type: "Release"
- compiler: "clang"
version: "15"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "clang++-15"
cc: "clang-15"
runs-on: "ubuntu-latest"
container: "ubuntu:22.04"
b2-toolset: "clang"
name: "Clang 15: C++17-20"
build-type: "Release"
- compiler: "clang"
version: "14"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "clang++-14"
cc: "clang-14"
runs-on: "ubuntu-latest"
container: "ubuntu:22.04"
b2-toolset: "clang"
name: "Clang 14: C++17-20"
build-type: "Release"
- compiler: "clang"
version: "13"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "clang++-13"
cc: "clang-13"
runs-on: "ubuntu-latest"
container: "ubuntu:22.04"
b2-toolset: "clang"
name: "Clang 13: C++17-20"
build-type: "Release"
- compiler: "clang"
version: "12"
cxxstd: "17,20"
latest-cxxstd: "20"
cxx: "clang++-12"
cc: "clang-12"
runs-on: "ubuntu-latest"
container: "ubuntu:22.04"
b2-toolset: "clang"
name: "Clang 12: C++17-20"
build-type: "Release"
- compiler: "clang"
version: "11"
cxxstd: "14,17"
latest-cxxstd: "17"
cxx: "clang++-11"
cc: "clang-11"
runs-on: "ubuntu-latest"
container: "ubuntu:22.04"
b2-toolset: "clang"
name: "Clang 11: C++14-17"
build-type: "Release"
- compiler: "clang"
version: "10"
cxxstd: "14,17"
latest-cxxstd: "17"
cxx: "clang++-10"
cc: "clang-10"
runs-on: "ubuntu-latest"
container: "ubuntu:20.04"
b2-toolset: "clang"
name: "Clang 10: C++14-17"
build-type: "Release"
- compiler: "clang"
version: "9"
cxxstd: "14,17"
latest-cxxstd: "17"
cxx: "clang++-9"
cc: "clang-9"
runs-on: "ubuntu-latest"
container: "ubuntu:20.04"
b2-toolset: "clang"
name: "Clang 9: C++14-17"
build-type: "Release"
- compiler: "clang"
version: "8"
cxxstd: "14,17"
latest-cxxstd: "17"
cxx: "clang++-8"
cc: "clang-8"
runs-on: "ubuntu-latest"
container: "ubuntu:20.04"
b2-toolset: "clang"
name: "Clang 8: C++14-17"
build-type: "Release"
- compiler: "clang"
version: "7"
cxxstd: "14,17"
latest-cxxstd: "17"
cxx: "clang++-7"
cc: "clang-7"
runs-on: "ubuntu-latest"
container: "ubuntu:20.04"
b2-toolset: "clang"
name: "Clang 7: C++14-17"
build-type: "Release"
- compiler: "clang"
version: "6"
cxxstd: "14,17"
latest-cxxstd: "17"
cxx: "clang++-6.0"
cc: "clang-6.0"
runs-on: "ubuntu-latest"
container: "ubuntu:20.04"
b2-toolset: "clang"
name: "Clang 6: C++14-17"
build-type: "Release"
- compiler: "clang"
version: "5"
cxxstd: "11,14"
latest-cxxstd: "14"
cxx: "clang++-5.0"
cc: "clang-5.0"
runs-on: "ubuntu-latest"
container: "ubuntu:18.04"
b2-toolset: "clang"
name: "Clang 5: C++11-14"
build-type: "Release"
- compiler: "clang"
version: "4"
cxxstd: "11,14"
latest-cxxstd: "14"
cxx: "clang++-4.0"
cc: "clang-4.0"
runs-on: "ubuntu-latest"
container: "ubuntu:18.04"
b2-toolset: "clang"
name: "Clang 4: C++11-14"
build-type: "Release"
- compiler: "clang"
version: "^3.8"
cxxstd: "11"
latest-cxxstd: "11"
cxx: "clang++-3.8"
cc: "clang-3.8"
runs-on: "ubuntu-latest"
container: "ubuntu:16.04"
b2-toolset: "clang"
is-earliest: true
name: "Clang ^3.8: C++11"
build-type: "Release"
name: ${{ matrix.name }}
runs-on: ${{ fromJSON(needs.runner-selection.outputs.labelmatrix)[matrix.runs-on] }}
container:
image: ${{ matrix.container }}
options: --privileged
timeout-minutes: 120
steps:
- name: Enable Node 16
run: |
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
- name: ASLR Fix
if: ${{ startsWith(matrix.runs-on, 'ubuntu' )}}
run: sysctl vm.mmap_rnd_bits=28
- name: Clone Boost.Http.Io
uses: actions/checkout@v3
with:
path: http-io-root
- name: Clone Boost.Http.Proto
uses: actions/checkout@v3
with:
repository: cppalliance/http_proto
path: http-proto-root
ref: develop
- name: Clone Boost.Buffers
uses: actions/checkout@v3
with:
path: buffers-root
repository: cppalliance/buffers
ref: develop
- name: Setup C++
uses: alandefreitas/cpp-actions/setup-cpp@v1.8.0
id: setup-cpp
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}
check-latest: ${{ matrix.compiler != 'clang' || matrix.version != '^3.8' }}
trace-commands: true
- name: Install packages
uses: alandefreitas/cpp-actions/package-install@v1.8.0
id: package-install
with:
apt-get-add-architecture: 'i386'
apt-get: >-
${{ matrix.install }}
libssl-dev
build-essential
- name: Clone Boost
uses: alandefreitas/cpp-actions/boost-clone@v1.8.0
id: boost-clone
with:
branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }}
boost-dir: boost-source
scan-modules-dir: http-io-root
scan-modules-ignore: http_io
- name: Install packages (Windows)
uses: alandefreitas/cpp-actions/package-install@v1.8.0
if: ${{ startsWith(matrix.runs-on, 'windows') }}
id: package-install-windows
with:
vcpkg: "zlib,openssl"
vcpkg-dir: vcpkg-root
vcpkg-triplet: ${{ matrix.x86 && 'x86-windows' || 'x64-windows' }}
- name: Patch user-config.jam (Windows)
id: patch-user-config
shell: bash
if: ${{ startsWith(matrix.runs-on, 'windows') }}
run: |
set -xe
home=$(pwd)
triplet=${{ matrix.x86 && 'x86-windows' || 'x64-windows' }}
addrmdl=${{ matrix.x86 && '32' || '64' }}
ls -lah "${home}/vcpkg-root/installed/${triplet}/include"
ls -lah "${home}/vcpkg-root/installed/${triplet}/lib"
touch user-config.jam
echo "using zlib : : <include>\"${home}/vcpkg-root/installed/${triplet}/include\" <search>\"${home}/vcpkg-root/installed/${triplet}/lib\" <name>zlib : <address-model>${addrmdl} ;" | sed 's/\/d\//D:\//g' > user-config.jam
echo "using openssl : : <include>\"${home}/vcpkg-root/installed/${triplet}/include\" <search>\"${home}/vcpkg-root/installed/${triplet}/lib\" <ssl-name>libssl <crypto-name>libcrypto : <address-model>${addrmdl} ;" | sed 's/\/d\//D:\//g' >> user-config.jam
cat user-config.jam
toolchain=$(echo "$GITHUB_WORKSPACE/vcpkg-root/scripts/buildsystems/vcpkg.cmake" | sed 's/\/d\//D:\//g' )
echo "toolchain=${toolchain}" >> $GITHUB_OUTPUT
- name: Patch Boost
id: patch
shell: bash
run: |
set -xe
pwd
ls
ls -lah boost-source
# Identify boost module being tested
module=${GITHUB_REPOSITORY#*/}
echo "module=$module" >> $GITHUB_OUTPUT
# Identify GitHub workspace root
workspace_root=$(echo "$GITHUB_WORKSPACE" | sed 's/\\/\//g')
echo -E "workspace_root=$workspace_root" >> $GITHUB_OUTPUT
# Remove module from boost-source
rm -r "boost-source/libs/$module" || true
# Copy cached boost-source to an isolated boost-root
cp -r boost-source boost-root
# Set boost-root output
cd boost-root
boost_root="$(pwd)"
boost_root=$(echo "$boost_root" | sed 's/\\/\//g')
echo -E "boost_root=$boost_root" >> $GITHUB_OUTPUT
# Patch boost-root with workspace module
cp -r "$workspace_root"/http-io-root "libs/$module"
cp -r "$workspace_root"/buffers-root libs/buffers
cp -r "$workspace_root"/http-proto-root libs/http_proto
python3 tools/boostdep/depinst/depinst.py buffers
python3 tools/boostdep/depinst/depinst.py http_proto
- name: Boost B2 Workflow
uses: alandefreitas/cpp-actions/b2-workflow@v1.7.0
if: ${{ !matrix.coverage && !matrix.time-trace }}
with:
source-dir: boost-root
modules: http_io
toolset: ${{ matrix.b2-toolset }}
build-variant: ${{ matrix.build-type }}
cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx || '' }}
cxxstd: ${{ matrix.cxxstd }}
address-model: ${{ (matrix.x86 && '32') || '64' }}
asan: ${{ matrix.asan }}
ubsan: ${{ matrix.ubsan }}
shared: ${{ matrix.shared }}
rtti: ${{ (matrix.is-latest && 'on,off') || 'on' }}
cxxflags: ${{ (matrix.asan && '-fsanitize=pointer-subtract') || '' }}
user-config: ${{ (startsWith(matrix.runs-on, 'windows') && format('{0}/user-config.jam', steps.patch.outputs.workspace_root)) || '' }}
stop-on-error: true
- name: Boost CMake Workflow
uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.0
if: ${{ matrix.coverage || matrix.time-trace || matrix.build-cmake || matrix.is-earliest }}
with:
source-dir: boost-root
build-dir: __build_cmake_test__
generator: ${{ matrix.generator }}
generator-toolset: ${{ matrix.generator-toolset }}
build-type: ${{ matrix.build-type }}
run-tests: true
install-prefix: .local
cxxstd: ${{ matrix.latest-cxxstd }}
cc: ${{ steps.setup-cpp.outputs.cc || matrix.cc }}
ccflags: ${{ matrix.ccflags }}
cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx }}
cxxflags: ${{ matrix.cxxflags }}
shared: ${{ matrix.shared }}
cmake-version: '>=3.15'
extra-args: |
-D Boost_VERBOSE=ON
-D BOOST_INCLUDE_LIBRARIES="${{ steps.patch.outputs.module }}"
-D BOOST_HTTP_IO_BUILD_TESTS=ON
export-compile-commands: ${{ matrix.time-trace }}
package: false
package-artifact: false
ref-source-dir: boost-root/libs/http_io
toolchain: ${{ (startsWith(matrix.runs-on, 'windows') && steps.patch-user-config.outputs.toolchain) || '' }}
- name: Set Path
if: startsWith(matrix.runs-on, 'windows') && matrix.shared
run: echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
- name: Set LD_LIBRARY_PATH
if: startsWith(matrix.runs-on, 'ubuntu') && matrix.shared
run: |
echo "LD_LIBRARY_PATH=$GITHUB_WORKSPACE/.local/lib:$LD_LIBRARY_PATH" >> "$GITHUB_ENV"
- name: Find Package Integration Workflow
uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.0
if: ${{ matrix.build-cmake || matrix.is-earliest }}
with:
source-dir: boost-root/libs/${{ steps.patch.outputs.module }}/test/cmake_test
build-dir: __build_cmake_install_test__
generator: ${{ matrix.generator }}
generator-toolset: ${{ matrix.generator-toolset }}
build-type: ${{ matrix.build-type }}
cxxstd: ${{ matrix.latest-cxxstd }}
cc: ${{ steps.setup-cpp.outputs.cc || matrix.cc }}
ccflags: ${{ matrix.ccflags }}
cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx }}
cxxflags: ${{ matrix.cxxflags }}
shared: ${{ matrix.shared }}
install: false
cmake-version: '>=3.15'
extra-args: |
-D BOOST_CI_INSTALL_TEST=ON
-D CMAKE_PREFIX_PATH=${{ steps.patch.outputs.workspace_root }}/.local
ref-source-dir: boost-root/libs/http_io
trace-commands: true
toolchain: ${{ (startsWith(matrix.runs-on, 'windows') && steps.patch-user-config.outputs.toolchain) || '' }}
- name: Subdirectory Integration Workflow
uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.0
if: ${{ matrix.build-cmake || matrix.is-earliest }}
with:
source-dir: boost-root/libs/${{ steps.patch.outputs.module }}/test/cmake_test
build-dir: __build_cmake_subdir_test__
generator: ${{ matrix.generator }}
generator-toolset: ${{ matrix.generator-toolset }}
build-type: ${{ matrix.build-type }}
cxxstd: ${{ matrix.latest-cxxstd }}
cc: ${{ steps.setup-cpp.outputs.cc || matrix.cc }}
ccflags: ${{ matrix.ccflags }}
cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx }}
cxxflags: ${{ matrix.cxxflags }}
shared: ${{ matrix.shared }}
install: false
cmake-version: '>=3.15'
extra-args: -D BOOST_CI_INSTALL_TEST=OFF
ref-source-dir: boost-root/libs/http_io/test/cmake_test
toolchain: ${{ (startsWith(matrix.runs-on, 'windows') && steps.patch-user-config.outputs.toolchain) || '' }}
- name: Root Project CMake Workflow
uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.0
if: ${{ matrix.build-cmake || matrix.is-earliest }}
with:
source-dir: boost-root/libs/${{ steps.patch.outputs.module }}
build-dir: __build_root_test__
generator: ${{ matrix.generator }}
generator-toolset: ${{ matrix.generator-toolset }}
build-type: ${{ matrix.build-type }}
run-tests: false
install: false
cxxstd: ${{ matrix.latest-cxxstd }}
cc: ${{ steps.setup-cpp.outputs.cc || matrix.cc }}
ccflags: ${{ matrix.ccflags }}
cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx }}
cxxflags: ${{ matrix.cxxflags }}
shared: ${{ matrix.shared }}
extra-args: -D Boost_VERBOSE=ON -D BUILD_TESTING=ON -D BOOST_SRC_DIR="../boost-root"
cmake-version: '>=3.15'
package: false
package-artifact: false
ref-source-dir: boost-root
toolchain: ${{ (startsWith(matrix.runs-on, 'windows') && steps.patch-user-config.outputs.toolchain) || '' }}
- name: FlameGraph
uses: alandefreitas/cpp-actions/flamegraph@v1.8.0
if: matrix.time-trace
with:
source-dir: boost-root/libs/http_io
build-dir: boost-root/__build_cmake_test__
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Codecov
if: ${{ matrix.coverage }}
run: |
set -x
# Generate report
gcov_tool="gcov"
if command -v "gcov-${{ steps.setup-cpp.outputs.version-major }}.${{ steps.setup-cpp.outputs.version-minor }}" &> /dev/null; then
gcov_tool="gcov"
elif command -v "gcov-${{ steps.setup-cpp.outputs.version-major }}" &> /dev/null; then
gcov_tool="gcov-${{ steps.setup-cpp.outputs.version-major }}"
fi
lcov -c -q -o "boost-root/__build_cmake_test__/coverage.info" -d "boost-root/__build_cmake_test__" --include "$(pwd)/boost-root/libs/${{steps.patch.outputs.module}}/*" --gcov-tool "$gcov_tool"
# Upload to codecov
bash <(curl -s https://codecov.io/bash) -f "boost-root/__build_cmake_test__/coverage.info"
# Summary
echo "# Coverage" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "[![codecov](https://codecov.io/github/$GITHUB_REPOSITORY/commit/$GITHUB_SHA/graphs/sunburst.svg)](https://codecov.io/github/$GITHUB_REPOSITORY/commit/$GITHUB_SHA)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Commit: [![codecov](https://codecov.io/github/$GITHUB_REPOSITORY/commit/$GITHUB_SHA/graph/badge.svg)](https://codecov.io/github/$GITHUB_REPOSITORY/commit/$GITHUB_SHA)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Branch: [![codecov](https://codecov.io/github/$GITHUB_REPOSITORY/branch/$GITHUB_REF_NAME/graph/badge.svg)](https://codecov.io/github/$GITHUB_REPOSITORY/commit/$GITHUB_SHA)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY