@@ -176,3 +176,227 @@ jobs:
176176 - name : Test
177177 run : ..\..\..\b2 --hash address-model=64 cxxstd=14,17,20 toolset=msvc-14.3
178178 working-directory : ../boost-root/libs/graph/test
179+
180+ posix-cmake-subdir :
181+ strategy :
182+ fail-fast : false
183+ matrix :
184+ include :
185+ - os : ubuntu-20.04
186+ - os : ubuntu-22.04
187+ - os : ubuntu-24.04
188+ - os : macos-13
189+ - os : macos-14
190+ - os : macos-15
191+
192+ runs-on : ${{matrix.os}}
193+
194+ steps :
195+ - uses : actions/checkout@v4
196+
197+ - name : Install packages
198+ if : matrix.install
199+ run : sudo apt-get -y install ${{matrix.install}}
200+
201+ - name : Setup Boost
202+ run : |
203+ echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
204+ LIBRARY=${GITHUB_REPOSITORY#*/}
205+ echo LIBRARY: $LIBRARY
206+ echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
207+ echo GITHUB_BASE_REF: $GITHUB_BASE_REF
208+ echo GITHUB_REF: $GITHUB_REF
209+ REF=${GITHUB_BASE_REF:-$GITHUB_REF}
210+ REF=${REF#refs/heads/}
211+ echo REF: $REF
212+ BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
213+ echo BOOST_BRANCH: $BOOST_BRANCH
214+ cd ..
215+ git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
216+ cd boost-root
217+ cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
218+ git submodule update --init tools/boostdep
219+ python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
220+
221+ - name : Use library with add_subdirectory
222+ run : |
223+ cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test
224+ mkdir __build__ && cd __build__
225+ cmake ..
226+ cmake --build .
227+ ctest --output-on-failure --no-tests=error
228+
229+ posix-cmake-install :
230+ strategy :
231+ fail-fast : false
232+ matrix :
233+ include :
234+ - os : ubuntu-20.04
235+ - os : ubuntu-22.04
236+ - os : ubuntu-24.04
237+ - os : macos-13
238+ - os : macos-14
239+ - os : macos-15
240+
241+ runs-on : ${{matrix.os}}
242+
243+ steps :
244+ - uses : actions/checkout@v4
245+
246+ - name : Install packages
247+ if : matrix.install
248+ run : sudo apt-get -y install ${{matrix.install}}
249+
250+ - name : Setup Boost
251+ run : |
252+ echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
253+ LIBRARY=${GITHUB_REPOSITORY#*/}
254+ echo LIBRARY: $LIBRARY
255+ echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
256+ echo GITHUB_BASE_REF: $GITHUB_BASE_REF
257+ echo GITHUB_REF: $GITHUB_REF
258+ REF=${GITHUB_BASE_REF:-$GITHUB_REF}
259+ REF=${REF#refs/heads/}
260+ echo REF: $REF
261+ BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
262+ echo BOOST_BRANCH: $BOOST_BRANCH
263+ cd ..
264+ git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
265+ cd boost-root
266+ cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
267+ git submodule update --init tools/boostdep
268+ python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
269+
270+ - name : Configure
271+ run : |
272+ cd ../boost-root
273+ mkdir __build__ && cd __build__
274+ cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ..
275+
276+ - name : Install
277+ run : |
278+ cd ../boost-root/__build__
279+ cmake --build . --target install
280+
281+ - name : Use the installed library
282+ run : |
283+ cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__
284+ cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
285+ cmake --build .
286+ ctest --output-on-failure --no-tests=error
287+
288+ windows-cmake-subdir :
289+ strategy :
290+ fail-fast : false
291+ matrix :
292+ include :
293+ - os : windows-2019
294+ - os : windows-2022
295+
296+ runs-on : ${{matrix.os}}
297+
298+ steps :
299+ - uses : actions/checkout@v4
300+
301+ - name : Setup Boost
302+ shell : cmd
303+ run : |
304+ echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
305+ for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
306+ echo LIBRARY: %LIBRARY%
307+ echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
308+ echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
309+ echo GITHUB_REF: %GITHUB_REF%
310+ if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
311+ set BOOST_BRANCH=develop
312+ for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
313+ echo BOOST_BRANCH: %BOOST_BRANCH%
314+ cd ..
315+ git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
316+ cd boost-root
317+ xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
318+ git submodule update --init tools/boostdep
319+ python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
320+
321+ - name : Use library with add_subdirectory (Debug)
322+ shell : cmd
323+ run : |
324+ cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test
325+ mkdir __build__ && cd __build__
326+ cmake ..
327+ cmake --build . --config Debug
328+ ctest --output-on-failure --no-tests=error -C Debug
329+
330+ - name : Use library with add_subdirectory (Release)
331+ shell : cmd
332+ run : |
333+ cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__
334+ cmake --build . --config Release
335+ ctest --output-on-failure --no-tests=error -C Release
336+
337+ windows-cmake-install :
338+ strategy :
339+ fail-fast : false
340+ matrix :
341+ include :
342+ - os : windows-2019
343+ - os : windows-2022
344+
345+ runs-on : ${{matrix.os}}
346+
347+ steps :
348+ - uses : actions/checkout@v4
349+
350+ - name : Setup Boost
351+ shell : cmd
352+ run : |
353+ echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
354+ for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
355+ echo LIBRARY: %LIBRARY%
356+ echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
357+ echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
358+ echo GITHUB_REF: %GITHUB_REF%
359+ if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
360+ set BOOST_BRANCH=develop
361+ for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
362+ echo BOOST_BRANCH: %BOOST_BRANCH%
363+ cd ..
364+ git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
365+ cd boost-root
366+ xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
367+ git submodule update --init tools/boostdep
368+ python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
369+
370+ - name : Configure
371+ shell : cmd
372+ run : |
373+ cd ../boost-root
374+ mkdir __build__ && cd __build__
375+ cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
376+
377+ - name : Install (Debug)
378+ shell : cmd
379+ run : |
380+ cd ../boost-root/__build__
381+ cmake --build . --target install --config Debug
382+
383+ - name : Install (Release)
384+ shell : cmd
385+ run : |
386+ cd ../boost-root/__build__
387+ cmake --build . --target install --config Release
388+
389+ - name : Use the installed library (Debug)
390+ shell : cmd
391+ run : |
392+ cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__
393+ cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
394+ cmake --build . --config Debug
395+ ctest --output-on-failure --no-tests=error -C Debug
396+
397+ - name : Use the installed library (Release)
398+ shell : cmd
399+ run : |
400+ cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__
401+ cmake --build . --config Release
402+ ctest --output-on-failure --no-tests=error -C Release
0 commit comments