Skip to content

Commit ffc35e8

Browse files
committed
copytree and cxxstd
1 parent a02837a commit ffc35e8

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,23 @@ jobs:
6060
run: |
6161
python3 tools/ci.py run-cmake-add-subdirectory-tests \
6262
--build-type ${{ matrix.build-type }} \
63+
--cxxstd ${{ matrix.cxxstd }} \
6364
--toolset ${{ matrix.toolset }} \
6465
--generator "${{ matrix.generator }}"
6566
6667
- name: Run find_package tests with the built cmake distribution
6768
run: |
6869
python3 tools/ci.py run-cmake-find-package-tests \
6970
--build-type ${{ matrix.build-type }} \
71+
--cxxstd ${{ matrix.cxxstd }} \
7072
--toolset ${{ matrix.toolset }} \
7173
--generator "${{ matrix.generator }}"
7274
7375
- name: Run find_package tests with the built b2 distribution
7476
run: |
7577
python3 tools/ci.py run-cmake-b2-find-package-tests \
7678
--build-type ${{ matrix.build-type }} \
79+
--cxxstd ${{ matrix.cxxstd }} \
7780
--toolset ${{ matrix.toolset }} \
7881
--generator "${{ matrix.generator }}"
7982
@@ -117,9 +120,9 @@ jobs:
117120
- name: Build a Boost distribution using CMake
118121
run: |
119122
./tools/ci.py build-cmake-distro \
120-
--toolset ${{ matrix.toolset }} \
121123
--build-type ${{ matrix.build-type }} \
122-
--cxxstd ${{ matrix.cxxstd }}
124+
--cxxstd ${{ matrix.cxxstd }} \
125+
--toolset ${{ matrix.toolset }}
123126
124127
- name: Build the project tests
125128
run: |
@@ -137,16 +140,19 @@ jobs:
137140
run: |
138141
./tools/ci.py run-cmake-add-subdirectory-tests \
139142
--build-type ${{ matrix.build-type }} \
143+
--cxxstd ${{ matrix.cxxstd }} \
140144
--toolset ${{ matrix.toolset }}
141145
142146
- name: Run find_package tests with the built cmake distribution
143147
run: |
144148
./tools/ci.py run-cmake-find-package-tests \
145149
--build-type ${{ matrix.build-type }} \
150+
--cxxstd ${{ matrix.cxxstd }} \
146151
--toolset ${{ matrix.toolset }}
147152
148153
- name: Run find_package tests with the built b2 distribution
149154
run: |
150155
./tools/ci.py run-cmake-b2-find-package-tests \
151156
--build-type ${{ matrix.build-type }} \
157+
--cxxstd ${{ matrix.cxxstd }} \
152158
--toolset ${{ matrix.toolset }}

tools/ci.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ def _setup_boost(
103103
copytree(
104104
str(source_dir),
105105
str(lib_dir),
106-
ignore=ignore_patterns('__build*__', '.git'),
107-
dirs_exist_ok=True
106+
ignore=ignore_patterns('__build*__', '.git')
108107
)
109108

110109
# Install Boost dependencies
@@ -205,6 +204,7 @@ def _run_cmake_standalone_tests(
205204
def _run_cmake_add_subdirectory_tests(
206205
generator: str,
207206
build_type: str,
207+
cxxstd: str,
208208
toolset: str,
209209
build_shared_libs: bool = False
210210
):
@@ -219,6 +219,7 @@ def _run_cmake_add_subdirectory_tests(
219219
'-DBOOST_CI_INSTALL_TEST=OFF',
220220
'-DCMAKE_BUILD_TYPE={}'.format(build_type),
221221
'-DBUILD_SHARED_LIBS={}'.format(_cmake_bool(build_shared_libs)),
222+
'-DCMAKE_CXX_STANDARD={}'.format(cxxstd),
222223
'..'
223224
])
224225
_run(['cmake', '--build', '.', '--config', build_type])
@@ -229,6 +230,7 @@ def _run_cmake_add_subdirectory_tests(
229230
def _run_cmake_find_package_tests(
230231
generator: str,
231232
build_type: str,
233+
cxxstd: str,
232234
toolset: str,
233235
build_shared_libs: bool = False
234236
):
@@ -242,6 +244,7 @@ def _run_cmake_find_package_tests(
242244
'-DBOOST_CI_INSTALL_TEST=ON',
243245
'-DCMAKE_BUILD_TYPE={}'.format(build_type),
244246
'-DBUILD_SHARED_LIBS={}'.format(_cmake_bool(build_shared_libs)),
247+
'-DCMAKE_CXX_STANDARD={}'.format(cxxstd),
245248
'-DCMAKE_PREFIX_PATH={}'.format(_build_prefix_path(_cmake_distro)),
246249
'..'
247250
])
@@ -253,6 +256,7 @@ def _run_cmake_find_package_tests(
253256
def _run_cmake_b2_find_package_tests(
254257
generator: str,
255258
build_type: str,
259+
cxxstd: str,
256260
toolset: str,
257261
build_shared_libs: bool = False
258262
):
@@ -266,6 +270,7 @@ def _run_cmake_b2_find_package_tests(
266270
'-DCMAKE_PREFIX_PATH={}'.format(_build_prefix_path(_b2_distro)),
267271
'-DCMAKE_BUILD_TYPE={}'.format(build_type),
268272
'-DBUILD_SHARED_LIBS={}'.format(_cmake_bool(build_shared_libs)),
273+
'-DCMAKE_CXX_STANDARD={}'.format(cxxstd),
269274
'-DBUILD_TESTING=ON',
270275
'..'
271276
])
@@ -310,20 +315,23 @@ def main():
310315
subp = subparsers.add_parser('run-cmake-add-subdirectory-tests')
311316
subp.add_argument('--generator', default='Unix Makefiles')
312317
subp.add_argument('--build-type', default='Debug')
318+
subp.add_argument('--cxxstd', default='20')
313319
subp.add_argument('--toolset', default='gcc')
314320
subp.add_argument('--build-shared-libs', type=_str2bool, default=False)
315321
subp.set_defaults(func=_run_cmake_add_subdirectory_tests)
316322

317323
subp = subparsers.add_parser('run-cmake-find-package-tests')
318324
subp.add_argument('--generator', default='Unix Makefiles')
319325
subp.add_argument('--build-type', default='Debug')
326+
subp.add_argument('--cxxstd', default='20')
320327
subp.add_argument('--toolset', default='gcc')
321328
subp.add_argument('--build-shared-libs', type=_str2bool, default=False)
322329
subp.set_defaults(func=_run_cmake_find_package_tests)
323330

324331
subp = subparsers.add_parser('run-cmake-b2-find-package-tests')
325332
subp.add_argument('--generator', default='Unix Makefiles')
326333
subp.add_argument('--build-type', default='Debug')
334+
subp.add_argument('--cxxstd', default='20')
327335
subp.add_argument('--toolset', default='gcc')
328336
subp.add_argument('--build-shared-libs', type=_str2bool, default=False)
329337
subp.set_defaults(func=_run_cmake_b2_find_package_tests)

0 commit comments

Comments
 (0)