Skip to content

Commit c692e40

Browse files
authored
Add support for modular build structure. (#20)
* Make the library modular usable. * Switch to library requirements instead of source. As source puts extra source in install targets. * Add requires-b2 check to top-level build file. * Bump B2 require to 5.2 * Update copyright dates. * Move inter-lib dependencies to a project variable and into the build targets. * Adjust self dependencies as inter-lib deps no longer apply globally. * Add Boost.ThrowExceptions transitive dep module. * Need 22.04 for gcc-11. * Use latest macOS for GHA. * windows-2016 is no longer available for GHA. * ubuntu-18.04 is no longer available for GHA. * Use ubuntu-24 for gcc on GHA. * ubuntu-18.04 is no longer available for GHA. * Use latest clang version on latest ubuntu-24 for GHA. * Need to instal gcc-9. * Move include to target. * Put back disabled CI compilers with hopefully fixed building to account for GHA system changes. * Fix copy-paste error for cxxstd option. * Fix to avoid unattended attempt at instal prompt. * Undo many of the CI changes.
1 parent 5ad7df6 commit c692e40

File tree

3 files changed

+108
-46
lines changed

3 files changed

+108
-46
lines changed

.github/workflows/ci.yml

Lines changed: 81 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -14,97 +14,134 @@ jobs:
1414
matrix:
1515
include:
1616
- toolset: gcc-4.8
17-
standard: "03,11"
18-
os: ubuntu-18.04
17+
cxxstd: "03,11"
18+
container: ubuntu:18.04
19+
os: ubuntu-latest
1920
install: g++-4.8
2021
- toolset: gcc-5
21-
standard: "03,11,14,1z"
22-
os: ubuntu-18.04
22+
cxxstd: "03,11,14,1z"
23+
container: ubuntu:18.04
24+
os: ubuntu-latest
2325
install: g++-5
2426
- toolset: gcc-6
25-
standard: "03,11,14,1z"
26-
os: ubuntu-18.04
27+
cxxstd: "03,11,14,1z"
28+
container: ubuntu:18.04
29+
os: ubuntu-latest
2730
install: g++-6
2831
- toolset: gcc-7
29-
standard: "03,11,14,17"
30-
os: ubuntu-18.04
32+
cxxstd: "03,11,14,17"
33+
container: ubuntu:20.04
34+
os: ubuntu-latest
35+
install: g++-7
3136
- toolset: gcc-8
32-
standard: "03,11,14,17,2a"
33-
os: ubuntu-18.04
37+
cxxstd: "03,11,14,17,2a"
38+
container: ubuntu:20.04
39+
os: ubuntu-latest
3440
install: g++-8
3541
- toolset: gcc-9
36-
standard: "03,11,14,17,2a"
37-
os: ubuntu-18.04
42+
cxxstd: "03,11,14,17,2a"
43+
container: ubuntu:20.04
44+
os: ubuntu-latest
3845
- toolset: gcc-10
39-
standard: "03,11,14,17,2a"
40-
os: ubuntu-20.04
46+
cxxstd: "03,11,14,17,2a"
47+
container: ubuntu:20.04
48+
os: ubuntu-latest
4149
install: g++-10
4250
- toolset: gcc-11
43-
standard: "03,11,14,17,2a"
44-
os: ubuntu-20.04
51+
cxxstd: "03,11,14,17,2a"
52+
container: ubuntu:24.04
53+
os: ubuntu-latest
4554
install: g++-11
4655
- toolset: clang
4756
compiler: clang++-3.9
48-
standard: "03,11,14"
49-
os: ubuntu-18.04
57+
cxxstd: "03,11,14"
58+
container: ubuntu:18.04
59+
os: ubuntu-latest
5060
install: clang-3.9
5161
- toolset: clang
5262
compiler: clang++-4.0
53-
standard: "03,11,14"
54-
os: ubuntu-18.04
63+
cxxstd: "03,11,14"
64+
container: ubuntu:18.04
65+
os: ubuntu-latest
5566
install: clang-4.0
5667
- toolset: clang
5768
compiler: clang++-5.0
58-
standard: "03,11,14,1z"
59-
os: ubuntu-18.04
69+
cxxstd: "03,11,14,1z"
70+
container: ubuntu:18.04
71+
os: ubuntu-latest
6072
install: clang-5.0
6173
- toolset: clang
6274
compiler: clang++-6.0
63-
standard: "03,11,14,17"
64-
os: ubuntu-18.04
75+
cxxstd: "03,11,14,17"
76+
container: ubuntu:20.04
77+
os: ubuntu-latest
6578
install: clang-6.0
6679
- toolset: clang
6780
compiler: clang++-7
68-
standard: "03,11,14,17"
69-
os: ubuntu-18.04
81+
cxxstd: "03,11,14,17"
82+
container: ubuntu:20.04
83+
os: ubuntu-latest
7084
install: clang-7
7185
- toolset: clang
7286
compiler: clang++-8
73-
standard: "03,11,14,17"
74-
os: ubuntu-20.04
87+
cxxstd: "03,11,14,17"
88+
container: ubuntu:20.04
89+
os: ubuntu-latest
7590
install: clang-8
7691
- toolset: clang
7792
compiler: clang++-9
78-
standard: "03,11,14,17,2a"
79-
os: ubuntu-20.04
93+
cxxstd: "03,11,14,17"
94+
container: ubuntu:20.04
95+
os: ubuntu-latest
8096
install: clang-9
8197
- toolset: clang
8298
compiler: clang++-10
83-
standard: "03,11,14,17,2a"
84-
os: ubuntu-20.04
99+
cxxstd: "03,11,14,17,2a"
100+
container: ubuntu:20.04
101+
os: ubuntu-latest
85102
install: clang-10
86103
- toolset: clang
87104
compiler: clang++-11
88105
cxxstd: "03,11,14,17,2a"
89-
os: ubuntu-20.04
106+
container: ubuntu:20.04
107+
os: ubuntu-latest
90108
install: clang-11
91109
- toolset: clang
92110
compiler: clang++-12
93111
cxxstd: "03,11,14,17,2a"
94-
os: ubuntu-20.04
112+
container: ubuntu:20.04
113+
os: ubuntu-latest
95114
install: clang-12
96115
- toolset: clang
97-
standard: "03,11,14,17,2a"
98-
os: macos-10.15
116+
cxxstd: "03,11,14,17,20,2b"
117+
os: macos-15
99118

100119
runs-on: ${{matrix.os}}
120+
container:
121+
image: ${{matrix.container}}
122+
volumes:
123+
- /node20217:/node20217:rw,rshared
124+
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
101125

102126
steps:
103-
- uses: actions/checkout@v2
127+
- name: Setup container environment
128+
if: matrix.container
129+
run: |
130+
apt-get update
131+
apt-get -y install sudo python3 git g++ curl xz-utils
132+
133+
- name: Install nodejs20glibc2.17
134+
if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }}
135+
run: |
136+
curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz
137+
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
138+
ldd /__e/node20/bin/node
104139
105140
- name: Install packages
106141
if: matrix.install
107-
run: sudo apt install ${{matrix.install}}
142+
run: sudo apt-get -y install ${{matrix.install}}
143+
144+
- uses: actions/checkout@v2
108145

109146
- name: Setup Boost
110147
run: |
@@ -116,6 +153,7 @@ jobs:
116153
git submodule init libs/config
117154
git submodule init libs/core
118155
git submodule init libs/static_assert
156+
git submodule init libs/throw_exception
119157
git submodule init libs/headers
120158
git submodule init tools/build
121159
git submodule init tools/boost_install
@@ -131,27 +169,23 @@ jobs:
131169
- name: Run tests
132170
run: |
133171
cd ../boost
134-
./b2 -j3 libs/align/test toolset=${{matrix.toolset}} cxxstd=${{matrix.standard}} variant=debug,release
172+
./b2 -j3 libs/align/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release
135173
136174
windows:
137175
strategy:
138176
fail-fast: false
139177
matrix:
140178
include:
141-
- toolset: msvc-14.1
142-
standard: "14,17,latest"
143-
target: 32,64
144-
os: windows-2016
145179
- toolset: msvc-14.2
146-
standard: "14,17,latest"
180+
cxxstd: "14,17,latest"
147181
target: 32,64
148182
os: windows-2019
149183
- toolset: msvc-14.3
150184
cxxstd: "14,17,latest"
151185
addrmd: 32,64
152186
os: windows-2022
153187
- toolset: gcc
154-
standard: "03,11,14,17,2a"
188+
cxxstd: "03,11,14,17,2a"
155189
target: 64
156190
os: windows-2019
157191

@@ -171,6 +205,7 @@ jobs:
171205
git submodule init libs/config
172206
git submodule init libs/core
173207
git submodule init libs/static_assert
208+
git submodule init libs/throw_exception
174209
git submodule init libs/headers
175210
git submodule init tools/build
176211
git submodule init tools/boost_install
@@ -182,4 +217,4 @@ jobs:
182217
shell: cmd
183218
run: |
184219
cd ../boost
185-
b2 -j3 libs/align/test toolset=${{matrix.toolset}} cxxstd=${{matrix.standard}} address-model=${{matrix.target}} variant=debug,release
220+
b2 -j3 libs/align/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.target}} variant=debug,release

build.jam

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright René Ferdinand Rivera Morell 2023-2024
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# (See accompanying file LICENSE_1_0.txt or copy at
4+
# http://www.boost.org/LICENSE_1_0.txt)
5+
6+
require-b2 5.2 ;
7+
8+
constant boost_dependencies :
9+
/boost/assert//boost_assert
10+
/boost/config//boost_config
11+
/boost/core//boost_core
12+
/boost/static_assert//boost_static_assert ;
13+
14+
project /boost/align
15+
;
16+
17+
explicit
18+
[ alias boost_align : : :
19+
: <include>include <library>$(boost_dependencies) ]
20+
[ alias all : boost_align test ]
21+
;
22+
23+
call-if : boost-library align
24+
;
25+

test/Jamfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
import testing ;
88

9+
project : requirements <library>/boost/align//boost_align ;
10+
911
run align_test.cpp ;
1012
run align_overflow_test.cpp ;
1113
run align_down_test.cpp ;

0 commit comments

Comments
 (0)