Skip to content

Commit e60c848

Browse files
committed
ci.yml: split posix to posix-opts and posix-libs; rename windows to windows-opts; rename windows-noprefix to windows-libs
1 parent 6a09dfe commit e60c848

1 file changed

Lines changed: 81 additions & 146 deletions

File tree

.github/workflows/ci.yml

Lines changed: 81 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,12 @@ on:
99
- feature/**
1010

1111
jobs:
12-
posix:
12+
posix-opts:
1313
strategy:
1414
fail-fast: false
1515
matrix:
1616
include:
1717

18-
- lib: filesystem
19-
bopts: install
20-
os: ubuntu-latest
21-
2218
- lib: filesystem
2319
bopts: install
2420
copts: -DCMAKE_CXX_STANDARD=11
@@ -200,33 +196,13 @@ jobs:
200196

201197
# Boost_INCLUDE_DIRS, old style
202198

203-
- lib: headers
204-
bopts: install
205-
os: ubuntu-latest
206-
207199
- lib: headers
208200
bopts: stage
209201
copts: -DUSE_STAGED_BOOST=ON
210202
os: ubuntu-latest
211203

212204
# other libraries
213205

214-
- lib: atomic
215-
bopts: install
216-
os: ubuntu-latest
217-
218-
- lib: chrono
219-
bopts: install
220-
os: ubuntu-latest
221-
222-
- lib: container
223-
bopts: install
224-
os: ubuntu-latest
225-
226-
- lib: date_time
227-
bopts: install
228-
os: ubuntu-latest
229-
230206
- lib: iostreams
231207
bopts: install
232208
os: ubuntu-latest
@@ -250,10 +226,6 @@ jobs:
250226
os: ubuntu-latest
251227
install: libbz2-dev
252228

253-
- lib: log
254-
bopts: install
255-
os: ubuntu-latest
256-
257229
- lib: log
258230
bopts: install
259231
copts: -DBoost_USE_STATIC_LIBS=ON
@@ -273,20 +245,6 @@ jobs:
273245
bopts: --layout=tagged-1.66 threading=multi,single install
274246
os: ubuntu-latest
275247

276-
- lib: mpi
277-
bopts: install
278-
os: ubuntu-latest
279-
install: libopenmpi-dev libpython3-dev
280-
281-
- lib: program_options
282-
bopts: install
283-
os: ubuntu-latest
284-
285-
- lib: python
286-
bopts: install
287-
os: ubuntu-latest
288-
install: libpython3-dev
289-
290248
- lib: python
291249
bopts: install
292250
copts: -DUSE_PYTHON_VERSION=3.12
@@ -305,45 +263,88 @@ jobs:
305263
os: ubuntu-latest
306264
install: libpython3-dev
307265

308-
- lib: random
309-
bopts: install
310-
os: ubuntu-latest
311-
312266
- lib: random
313267
bopts: install
314268
copts: -DBUILD_SHARED_LIBS=ON
315269
os: ubuntu-latest
316270

317-
- lib: regex
318-
bopts: install
319-
os: ubuntu-latest
320-
321271
- lib: regex
322272
bopts: install
323273
copts: -DBoost_USE_STATIC_LIBS=ON
324274
os: ubuntu-latest
325275

326-
- lib: serialization
327-
bopts: install
328-
os: ubuntu-latest
276+
runs-on: ${{matrix.os}}
329277

330-
- lib: system
331-
bopts: install
332-
os: ubuntu-latest
278+
steps:
279+
- uses: actions/checkout@v6
333280

334-
- lib: test
335-
bopts: install
336-
os: ubuntu-latest
281+
- name: Install packages
282+
if: matrix.install
283+
run: |
284+
sudo apt-get update
285+
sudo apt-get -y install ${{matrix.install}}
337286
338-
- lib: thread
339-
bopts: install
340-
os: ubuntu-latest
287+
- name: Setup Boost
288+
run: |
289+
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
290+
echo GITHUB_REF: $GITHUB_REF
291+
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
292+
REF=${REF#refs/heads/}
293+
echo REF: $REF
294+
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
295+
echo BOOST_BRANCH: $BOOST_BRANCH
296+
cd ..
297+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
298+
cd boost-root
299+
git submodule update --init --jobs 3 tools/boostdep libs/assert libs/config libs/core libs/${{matrix.lib}}
300+
python tools/boostdep/depinst/depinst.py -X test -g "--jobs 3" ${{matrix.lib}}
301+
rm -rf tools/boost_install/*
302+
cp -r $GITHUB_WORKSPACE/* tools/boost_install
303+
./bootstrap.sh
304+
./b2 -d0 headers
341305
306+
- name: Run tests
307+
run: |
308+
cd ../boost-root
309+
echo "using python ;" >> ~/user-config.jam
310+
echo "using mpi ;" >> ~/user-config.jam
311+
./b2 -d0 -j3 --prefix=$HOME/.local --with-headers ${{matrix.bopts}}
312+
./b2 -j3 --prefix=$HOME/.local --with-${{matrix.lib}} ${{matrix.bopts}}
313+
cd tools/boost_install/test/${{matrix.lib}}
314+
mkdir __build__ && cd __build__
315+
cmake -DCMAKE_INSTALL_PREFIX=~/.local -DBoost_VERBOSE=ON ${{matrix.copts}} ..
316+
VERBOSE=1 cmake --build .
317+
export LD_LIBRARY_PATH=$HOME/.local/lib:$GITHUB_WORKSPACE/../boost-root/stage/lib:$LD_LIBRARY_PATH
318+
cmake --build . --target check
319+
320+
posix-libs:
321+
strategy:
322+
fail-fast: false
323+
matrix:
324+
include:
325+
326+
- lib: atomic
327+
- lib: chrono
328+
- lib: container
329+
- lib: date_time
330+
- lib: filesystem
331+
- lib: headers
332+
- lib: iostreams
333+
- lib: log
334+
- lib: mpi
335+
install: libopenmpi-dev libpython3-dev
336+
- lib: program_options
337+
- lib: python
338+
install: libpython3-dev
339+
- lib: random
340+
- lib: regex
341+
- lib: serialization
342+
- lib: system
343+
- lib: test
344+
- lib: thread
342345
- lib: wave
343-
bopts: install
344-
os: ubuntu-latest
345346

346-
runs-on: ${{matrix.os}}
347+
runs-on: ubuntu-latest
347348

348349
steps:
349350
- uses: actions/checkout@v6
@@ -378,16 +379,15 @@ jobs:
378379
cd ../boost-root
379380
echo "using python ;" >> ~/user-config.jam
380381
echo "using mpi ;" >> ~/user-config.jam
381-
./b2 -d0 -j3 --prefix=$HOME/.local --with-headers ${{matrix.bopts}}
382-
./b2 -j3 --prefix=$HOME/.local --with-${{matrix.lib}} ${{matrix.bopts}}
382+
./b2 -j3 --prefix=$HOME/.local --with-${{matrix.lib}} install
383383
cd tools/boost_install/test/${{matrix.lib}}
384384
mkdir __build__ && cd __build__
385-
cmake -DCMAKE_INSTALL_PREFIX=~/.local -DBoost_VERBOSE=ON ${{matrix.copts}} ..
385+
cmake -DCMAKE_INSTALL_PREFIX=~/.local -DBoost_VERBOSE=ON ..
386386
VERBOSE=1 cmake --build .
387387
export LD_LIBRARY_PATH=$HOME/.local/lib:$GITHUB_WORKSPACE/../boost-root/stage/lib:$LD_LIBRARY_PATH
388388
cmake --build . --target check
389389
390-
windows:
390+
windows-opts:
391391
strategy:
392392
fail-fast: false
393393
matrix:
@@ -491,48 +491,16 @@ jobs:
491491

492492
# other libraries
493493

494-
- lib: headers
495-
bopts: install
496-
os: windows-latest
497-
498-
- lib: atomic
499-
bopts: install
500-
os: windows-latest
501-
502-
- lib: chrono
503-
bopts: install
504-
os: windows-latest
505-
506-
- lib: container
507-
bopts: install
508-
os: windows-latest
509-
510-
- lib: date_time
511-
bopts: install
512-
os: windows-latest
513-
514-
- lib: iostreams
515-
bopts: install
516-
os: windows-latest
517-
518494
- lib: iostreams
519495
bopts: stage
520496
copts: -DUSE_STAGED_BOOST=ON
521497
os: windows-latest
522498

523-
- lib: log
524-
bopts: install
525-
os: windows-latest
526-
527499
- lib: log
528500
bopts: link=shared install
529501
copts: -DBoost_USE_STATIC_LIBS=OFF
530502
os: windows-latest
531503

532-
- lib: program_options
533-
bopts: install
534-
os: windows-latest
535-
536504
# b2 finds Python 3.12 (in PATH), but CMake finds Python 3.14
537505

538506
# python=3.14 isn't tested because the test executable doesn't run
@@ -548,18 +516,6 @@ jobs:
548516
copts: "-DUSE_PYTHON_VERSION=\"3.12;EXACT\""
549517
os: windows-2025
550518

551-
- lib: serialization
552-
bopts: install
553-
os: windows-latest
554-
555-
- lib: system
556-
bopts: install
557-
os: windows-latest
558-
559-
- lib: random
560-
bopts: install
561-
os: windows-latest
562-
563519
- lib: random
564520
bopts: link=shared install
565521
copts: -DBoost_USE_STATIC_LIBS=OFF
@@ -575,18 +531,6 @@ jobs:
575531
copts: -DBUILD_SHARED_LIBS=ON -DBoost_USE_STATIC_LIBS=OFF
576532
os: windows-latest
577533

578-
- lib: regex
579-
bopts: install
580-
os: windows-latest
581-
582-
- lib: test
583-
bopts: install
584-
os: windows-latest
585-
586-
- lib: thread
587-
bopts: install
588-
os: windows-latest
589-
590534
runs-on: ${{matrix.os}}
591535

592536
steps:
@@ -632,40 +576,31 @@ jobs:
632576
cmake --build . --config MinSizeRel && cmake --build . --config MinSizeRel --target check
633577
cmake --build . --config RelWithDebInfo && cmake --build . --config RelWithDebInfo --target check
634578
635-
windows-noprefix:
579+
windows-libs:
636580
strategy:
637581
fail-fast: false
638582
matrix:
639583
include:
640584

585+
- lib: atomic
586+
- lib: chrono
587+
- lib: container
588+
- lib: date_time
641589
- lib: filesystem
642-
os: windows-latest
643-
644590
- lib: headers
645-
os: windows-latest
646-
647591
- lib: iostreams
648-
os: windows-latest
649-
650592
- lib: log
651-
os: windows-latest
652-
653-
- lib: serialization
654-
os: windows-latest
655-
593+
- lib: program_options
594+
- lib: python
656595
- lib: random
657-
os: windows-latest
658-
659596
- lib: regex
660-
os: windows-latest
661-
597+
- lib: serialization
598+
- lib: system
662599
- lib: test
663-
os: windows-latest
664-
665600
- lib: thread
666-
os: windows-latest
601+
- lib: wave
667602

668-
runs-on: ${{matrix.os}}
603+
runs-on: windows-latest
669604

670605
steps:
671606
- uses: actions/checkout@v6

0 commit comments

Comments
 (0)