-
Notifications
You must be signed in to change notification settings - Fork 32
598 lines (471 loc) · 17.4 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
name: CI
on:
pull_request:
push:
branches:
- master
- develop
- feature/**
- modular
jobs:
posix:
strategy:
fail-fast: false
matrix:
include:
- lib: filesystem
bopts: install
os: ubuntu-20.04
- lib: filesystem
bopts: install
copts: -DCMAKE_CXX_STANDARD=11
os: macos-latest
# --layout=versioned
- lib: filesystem
bopts: --layout=versioned install
os: ubuntu-20.04
- lib: filesystem
bopts: --layout=versioned install
copts: -DCMAKE_CXX_STANDARD=11
os: macos-latest
# --layout=tagged
- lib: filesystem
bopts: --layout=tagged install
os: ubuntu-20.04
- lib: filesystem
bopts: --layout=tagged install
copts: -DCMAKE_CXX_STANDARD=11
os: macos-latest
# build with clang++, use with g++
- lib: filesystem
bopts: toolset=clang install
os: ubuntu-20.04
# same, with tagged layout
- lib: filesystem
bopts: toolset=clang --layout=tagged install
os: ubuntu-20.04
# build with both gcc and clang, use with gcc
- lib: filesystem
bopts: toolset=gcc,clang --layout=versioned install
os: ubuntu-20.04
# build with clang, use with gcc (w/ toolset override)
- lib: filesystem
bopts: toolset=clang --layout=versioned install
copts: -DBoost_COMPILER=clang11
os: ubuntu-20.04
- lib: filesystem
bopts: toolset=clang --layout=versioned install
copts: -DBoost_COMPILER=-clang11
os: ubuntu-20.04
# build with gcc/clang, use with clang/gcc (w/ toolset list)
- lib: filesystem
bopts: toolset=gcc --layout=versioned install
copts: -DCMAKE_CXX_COMPILER=clang++ -DBoost_COMPILER="gcc9;clang11"
os: ubuntu-20.04
- lib: filesystem
bopts: toolset=clang --layout=versioned install
copts: -DBoost_COMPILER="gcc9;clang11"
os: ubuntu-20.04
- lib: filesystem
bopts: toolset=gcc --layout=versioned install
copts: -DCMAKE_CXX_COMPILER=clang++ -DBoost_COMPILER="-gcc9;-clang11"
os: ubuntu-20.04
- lib: filesystem
bopts: toolset=clang --layout=versioned install
copts: -DBoost_COMPILER="-gcc9;-clang11"
os: ubuntu-20.04
# shared
- lib: filesystem
bopts: install
copts: -DBoost_USE_STATIC_LIBS=OFF
os: ubuntu-20.04
- lib: filesystem
bopts: link=shared install
os: ubuntu-20.04
- lib: filesystem
bopts: link=shared install
copts: -DBoost_USE_STATIC_LIBS=OFF
os: ubuntu-20.04
# static
- lib: filesystem
bopts: install
copts: -DBoost_USE_STATIC_LIBS=ON
os: ubuntu-20.04
- lib: filesystem
bopts: link=static install
os: ubuntu-20.04
- lib: filesystem
bopts: link=static install
copts: -DBoost_USE_STATIC_LIBS=ON
os: ubuntu-20.04
# threading=multi,single
- lib: filesystem
bopts: --layout=tagged-1.66 threading=multi,single install
os: ubuntu-20.04
- lib: filesystem
bopts: --layout=tagged-1.66 threading=multi,single install
copts: -DBoost_USE_MULTITHREADED=ON
os: ubuntu-20.04
- lib: filesystem
bopts: --layout=tagged-1.66 threading=multi,single install
copts: -DBoost_USE_MULTITHREADED=OFF
os: ubuntu-20.04
# threading=single
- lib: filesystem
bopts: threading=single install
os: ubuntu-20.04
- lib: filesystem
bopts: threading=single install
copts: -DBoost_USE_MULTITHREADED=OFF
os: ubuntu-20.04
# staged
- lib: filesystem
bopts: stage
copts: -DUSE_STAGED_BOOST=ON
os: ubuntu-20.04
- lib: filesystem
bopts: stage
copts: -DUSE_STAGED_BOOST=ON -DCMAKE_CXX_STANDARD=11
os: macos-latest
- lib: filesystem
bopts: --stagedir=stage64-gcc5 stage
copts: -DBoost_ROOT=$GITHUB_WORKSPACE/../boost-root/stage64-gcc5
os: ubuntu-20.04
- lib: filesystem
bopts: --stagedir=. stage
copts: -DBoost_ROOT=$GITHUB_WORKSPACE/../boost-root/.
os: ubuntu-20.04
- lib: filesystem
bopts: --stage-libdir=lib64-gcc5 stage
copts: -DBoost_ROOT=$GITHUB_WORKSPACE/../boost-root/lib64-gcc5/cmake
os: ubuntu-20.04
# ALL
- lib: filesystem
bopts: install
copts: -DUSE_ALL_COMPONENTS=ON
os: ubuntu-20.04
# Boost_INCLUDE_DIRS, old style
- lib: headers
bopts: install
os: ubuntu-20.04
- lib: headers
bopts: stage
copts: -DUSE_STAGED_BOOST=ON
os: ubuntu-20.04
# other libraries
- lib: atomic
bopts: install
os: ubuntu-20.04
- lib: chrono
bopts: install
os: ubuntu-20.04
- lib: container
bopts: install
os: ubuntu-20.04
- lib: iostreams
bopts: install
os: ubuntu-20.04
- lib: iostreams
bopts: install
copts: -DBoost_USE_STATIC_LIBS=ON
os: ubuntu-20.04
- lib: iostreams
bopts: stage
copts: -DUSE_STAGED_BOOST=ON
os: ubuntu-20.04
- lib: iostreams
bopts: stage
copts: -DUSE_STAGED_BOOST=ON -DBoost_USE_STATIC_LIBS=ON
os: ubuntu-20.04
- lib: log
bopts: install
os: ubuntu-20.04
- lib: log
bopts: install
copts: -DBoost_USE_STATIC_LIBS=ON
os: ubuntu-20.04
- lib: log
bopts: stage
copts: -DUSE_STAGED_BOOST=ON
os: ubuntu-20.04
- lib: log
bopts: stage
copts: -DUSE_STAGED_BOOST=ON -DBoost_USE_STATIC_LIBS=ON
os: ubuntu-20.04
- lib: log
bopts: install
copts: -DUSE_ALL_COMPONENTS=ON
os: ubuntu-20.04
- lib: log
bopts: --layout=tagged-1.66 threading=multi,single install
os: ubuntu-20.04
- lib: mpi
bopts: install
os: ubuntu-20.04
install: libopenmpi-dev libpython2-dev
- lib: program_options
bopts: install
os: ubuntu-20.04
- lib: python
bopts: python=2.7,3.8 install
os: ubuntu-20.04
install: libpython2-dev libpython3-dev
- lib: python
bopts: python=2.7,3.8 install
copts: -DUSE_PYTHON_VERSION=2.7
os: ubuntu-20.04
install: libpython2-dev libpython3-dev
- lib: python
bopts: python=2.7,3.8 install
copts: -DUSE_PYTHON_VERSION=3.8
os: ubuntu-20.04
install: libpython2-dev libpython3-dev
- lib: python
bopts: python=2.7,3.8 install
copts: -DUSE_PYTHON_VERSION=2.7 -DUSE_PYTHON_COMPONENT=python27
os: ubuntu-20.04
install: libpython2-dev libpython3-dev
- lib: python
bopts: python=2.7,3.8 install
copts: -DUSE_PYTHON_VERSION=3.8 -DUSE_PYTHON_COMPONENT=python38
os: ubuntu-20.04
install: libpython2-dev libpython3-dev
- lib: python
bopts: python=2.7,3.8 install
copts: -DUSE_PYTHON_VERSION=2.7 -DUSE_PYTHON_COMPONENT=python2
os: ubuntu-20.04
install: libpython2-dev libpython3-dev
- lib: python
bopts: python=2.7,3.8 install
copts: -DUSE_PYTHON_VERSION=3.8 -DUSE_PYTHON_COMPONENT=python3
os: ubuntu-20.04
install: libpython2-dev libpython3-dev
- lib: random
bopts: install
os: ubuntu-20.04
- lib: random
bopts: install
copts: -DBUILD_SHARED_LIBS=ON
os: ubuntu-20.04
- lib: regex
bopts: install
os: ubuntu-20.04
- lib: regex
bopts: install
copts: -DBoost_USE_STATIC_LIBS=ON
os: ubuntu-20.04
- lib: serialization
bopts: install
os: ubuntu-20.04
- lib: system
bopts: install
os: ubuntu-20.04
- lib: test
bopts: install
os: ubuntu-20.04
- lib: thread
bopts: install
os: ubuntu-20.04
- lib: wave
bopts: install
os: ubuntu-20.04
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install packages
if: matrix.install
run: sudo apt install ${{matrix.install}}
- name: Setup Boost
run: |
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
echo GITHUB_REF: $GITHUB_REF
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
REF=${REF#refs/heads/}
echo REF: $REF
BOOST_BRANCH=develop && ( test "${GITHUB_REF_NAME}" == "master" || test "${GITHUB_REF_NAME}" == "modular" ) && BOOST_BRANCH=${GITHUB_REF_NAME} || true
BOOST_GIT=https://github.com/${GITHUB_REPOSITORY/boost_install/boost}.git
echo BOOST_GIT: ${BOOST_GIT}
echo BOOST_BRANCH: ${BOOST_BRANCH}
cd ..
git clone -b "${BOOST_BRANCH}" --depth 1 "${BOOST_GIT}" boost-root
cd boost-root
git submodule update --init --jobs 3 tools/boostdep libs/assert libs/config libs/core libs/${{matrix.lib}}
python tools/boostdep/depinst/depinst.py -X test -g "--jobs 3" ${{matrix.lib}}
rm -rf tools/boost_install/*
cp -r $GITHUB_WORKSPACE/* tools/boost_install
./bootstrap.sh
./b2 -d0 headers
- name: Run tests
run: |
cd ../boost-root
echo "using python : 2.7 ;" >> ~/user-config.jam
echo "using python : 3.8 ;" >> ~/user-config.jam
echo "using mpi ;" >> ~/user-config.jam
./b2 -d0 -j3 --prefix=$HOME/.local --with-headers ${{matrix.bopts}}
./b2 -j3 --prefix=$HOME/.local --with-${{matrix.lib}} ${{matrix.bopts}}
cd tools/boost_install/test/${{matrix.lib}}
mkdir __build__ && cd __build__
cmake -DCMAKE_INSTALL_PREFIX=~/.local -DUSE_BOOST_PACKAGE=1 -DBoost_VERBOSE=ON ${{matrix.copts}} ..
VERBOSE=1 cmake --build .
export LD_LIBRARY_PATH=$HOME/.local/lib:$GITHUB_WORKSPACE/../boost-root/stage/lib:$LD_LIBRARY_PATH
cmake --build . --target check
windows:
strategy:
fail-fast: false
matrix:
include:
# install
- lib: filesystem
bopts: install
os: windows-2019
- lib: filesystem
bopts: --layout=tagged install
os: windows-2019
- lib: filesystem
bopts: link=shared install
copts: -DBoost_USE_STATIC_LIBS=OFF
os: windows-2019
- lib: filesystem
bopts: link=static,shared install
os: windows-2019
- lib: filesystem
bopts: link=static,shared install
copts: -DBoost_USE_STATIC_LIBS=OFF
os: windows-2019
- lib: filesystem
bopts: link=static,shared install
copts: -DBoost_USE_STATIC_LIBS=ON
os: windows-2019
# stage
- lib: filesystem
bopts: stage
copts: -DUSE_STAGED_BOOST=ON
os: windows-2019
- lib: filesystem
bopts: link=shared stage
copts: -DUSE_STAGED_BOOST=ON -DBoost_USE_STATIC_LIBS=OFF
os: windows-2019
- lib: filesystem
bopts: link=static,shared stage
copts: -DUSE_STAGED_BOOST=ON
os: windows-2019
- lib: filesystem
bopts: link=static,shared stage
copts: -DUSE_STAGED_BOOST=ON -DBoost_USE_STATIC_LIBS=OFF
os: windows-2019
- lib: filesystem
bopts: link=static,shared stage
copts: -DUSE_STAGED_BOOST=ON -DBoost_USE_STATIC_LIBS=ON
os: windows-2019
# mingw
- lib: filesystem
bopts: toolset=gcc install
copts: "-G \"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=Debug"
os: windows-2019
- lib: filesystem
bopts: toolset=gcc install
copts: "-G \"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=RelWithDebInfo"
os: windows-2019
# msvc-14.3
- lib: filesystem
bopts: install
os: windows-2022
# clang-cl
# b2 and CMake find and use a different clang-cl
- lib: filesystem
bopts: toolset=clang-win install
copts: "-G \"Visual Studio 17 2022\" -T clangcl -DBoost_COMPILER=\"clangw14;clangw15;clangw16;clangw17;clangw18\""
os: windows-2022
# other libraries
- lib: headers
bopts: install
os: windows-2019
- lib: iostreams
bopts: install
os: windows-2019
- lib: iostreams
bopts: stage
copts: -DUSE_STAGED_BOOST=ON
os: windows-2019
- lib: log
bopts: install
os: windows-2019
- lib: log
bopts: link=shared install
copts: -DBoost_USE_STATIC_LIBS=OFF
os: windows-2019
- lib: python
bopts: python=3.7,3.9 install
copts: "-DUSE_PYTHON_VERSION=\"3.7;EXACT\""
os: windows-2019
- lib: serialization
bopts: install
os: windows-2019
- lib: random
bopts: install
os: windows-2019
- lib: random
bopts: link=shared install
copts: -DBoost_USE_STATIC_LIBS=OFF
os: windows-2019
- lib: random
bopts: install
copts: -DBUILD_SHARED_LIBS=ON
os: windows-2019
- lib: random
bopts: link=shared install
copts: -DBUILD_SHARED_LIBS=ON -DBoost_USE_STATIC_LIBS=OFF
os: windows-2019
- lib: regex
bopts: install
os: windows-2019
- lib: test
bopts: install
os: windows-2019
- lib: thread
bopts: install
os: windows-2019
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Setup Boost
shell: cmd
run: |
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
echo GITHUB_REF: %GITHUB_REF%
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
set BOOST_BRANCH=develop
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "modular" set BOOST_BRANCH=modular
set BOOST_GIT=https://github.com/%GITHUB_REPOSITORY:boost_install=boost%.git
echo BOOST_GIT: %BOOST_GIT%
echo BOOST_BRANCH: %BOOST_BRANCH%
cd ..
git clone -b %BOOST_BRANCH% --depth 1 %BOOST_GIT% boost-root
cd boost-root
git submodule update --init --jobs 3 tools/boostdep libs/assert libs/config libs/core libs/${{matrix.lib}}
python tools/boostdep/depinst/depinst.py -X test -g "--jobs 3" ${{matrix.lib}}
rd /s/q tools\boost_install
xcopy /s /e /q %GITHUB_WORKSPACE% tools\boost_install\
cmd /c bootstrap
set USER_CONFIG=%HOMEDRIVE%%HOMEPATH%\user-config.jam
echo using python : 3.7 ; >> %USER_CONFIG%
echo using python : 3.9 ; >> %USER_CONFIG%
b2 -d0 headers
- name: Run tests
shell: cmd
run: |
echo on
cd ../boost-root
set ZLIB_SOURCE=%CD%\tools\boost_install\test\iostreams\zlib-1.2.11
set BZIP2_SOURCE=%CD%\tools\boost_install\test\iostreams\bzip2-1.0.8
b2 -d0 -j3 --prefix=%GITHUB_WORKSPACE%\..\.local --with-headers ${{matrix.bopts}}
b2 -j3 --prefix=%GITHUB_WORKSPACE%\..\.local --with-${{matrix.lib}} ${{matrix.bopts}}
cd tools\boost_install\test\${{matrix.lib}}
mkdir __build__ && cd __build__
cmake -DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\..\.local -DUSE_BOOST_PACKAGE=1 -DBoost_VERBOSE=ON ${{matrix.copts}} ..
PATH %PATH%;%GITHUB_WORKSPACE%\..\.local\lib;%GITHUB_WORKSPACE%\..\boost-root\stage\lib
cmake --build . --config Debug && cmake --build . --config Debug --target check
cmake --build . --config Release && cmake --build . --config Release --target check
cmake --build . --config MinSizeRel && cmake --build . --config MinSizeRel --target check
cmake --build . --config RelWithDebInfo && cmake --build . --config RelWithDebInfo --target check