From b4bb556d09ea4467f2b782368de5f36a1a8e4cb1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 13 Apr 2024 10:21:13 -0500 Subject: [PATCH 1/8] Update build & CI for modular Boost. --- Jamfile.v2 | 53 +++++++++++++++++------------------------------- build/Jamfile.v2 | 9 -------- src/Jamfile.v2 | 30 +++++++++++++-------------- test/Jamfile.v2 | 2 +- 4 files changed, 35 insertions(+), 59 deletions(-) delete mode 100644 build/Jamfile.v2 diff --git a/Jamfile.v2 b/Jamfile.v2 index 678b68c3c..9d6ccef34 100644 --- a/Jamfile.v2 +++ b/Jamfile.v2 @@ -9,7 +9,16 @@ # http://www.boost.org/LICENSE_1_0.txt) #============================================================================== -project quickbook +import path ; +import option ; + +local DIST_DIR = [ option.get distdir ] ; +DIST_DIR ?= [ option.get build-dir ] ; +DIST_DIR ?= [ path.join $(BOOST_ROOT) dist ] ; +DIST_DIR ?= dist ; +DIST_DIR = [ path.root [ path.make $(DIST_DIR) ] [ path.pwd ] ] ; + +project /boost/quickbook : requirements gcc:300 darwin:300 @@ -19,39 +28,15 @@ project quickbook all BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE : default-build - 0x - ; - -import boostcpp ; -import path ; -import option ; - -local DIST_DIR = [ option.get distdir ] ; -if $(DIST_DIR) { - DIST_DIR = [ path.root [ path.make $(DIST_DIR) ] [ path.pwd ] ] ; -} else { - DIST_DIR = [ path.join $(BOOST_ROOT) dist ] ; -} -local DIST_BIN = [ path.join $(DIST_DIR) bin ] ; - -# Install quickbook by default. - -install dist-bin - : - src//quickbook - : - EXE - $(DIST_BIN) - : - release - ; - -# Target for quickbook toolset's auto build. - -alias quickbook - : src//quickbook - : release + 11 ; -explicit quickbook +explicit + [ install dist-bin + : src//quickbook/static + : EXE $(DIST_DIR)/bin + : release ] + [ alias dist : dist-bin ] + [ alias quickbook : src//quickbook ] + [ alias all : quickbook dist test ] ; diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 deleted file mode 100644 index 6873ef424..000000000 --- a/build/Jamfile.v2 +++ /dev/null @@ -1,9 +0,0 @@ -#============================================================================== -# Copyright (c) 2017 Daniel James -# -# Use, modification and distribution is subject to the Boost Software -# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) -#============================================================================== - -alias dist-bin : ..//dist-bin ; diff --git a/src/Jamfile.v2 b/src/Jamfile.v2 index fe62c33f5..320e7cb27 100644 --- a/src/Jamfile.v2 +++ b/src/Jamfile.v2 @@ -44,19 +44,19 @@ exe quickbook block_element_grammar.cpp phrase_element_grammar.cpp doc_info_grammar.cpp - /boost//program_options - /boost//filesystem - : #QUICKBOOK_NO_DATES - BOOST_FILESYSTEM_NO_DEPRECATED - msvc:/wd4355 - msvc:/wd4511 - msvc:/wd4512 - msvc:/wd4701 - msvc:/wd4702 - msvc:/wd4244 - msvc:/wd4267 - msvc:/wd4800 - msvc:_CRT_SECURE_NO_DEPRECATE - msvc:_SCL_SECURE_NO_DEPRECATE - windows:shell32 + /boost/program_options//boost_program_options + /boost/filesystem//boost_filesystem + : #QUICKBOOK_NO_DATES + BOOST_FILESYSTEM_NO_DEPRECATED + msvc:/wd4355 + msvc:/wd4511 + msvc:/wd4512 + msvc:/wd4701 + msvc:/wd4702 + msvc:/wd4244 + msvc:/wd4267 + msvc:/wd4800 + msvc:_CRT_SECURE_NO_DEPRECATE + msvc:_SCL_SECURE_NO_DEPRECATE + windows:shell32 ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index c0d543f59..4c68043af 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -6,7 +6,7 @@ # http://www.boost.org/LICENSE_1_0.txt) # -project quickbook/test +project : requirements msvc:off 98:no From 4101f7aee85a02ac982505f5217043b984e1e4b0 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 13 Apr 2024 10:25:12 -0500 Subject: [PATCH 2/8] Update build & CI for modular Boost. --- .github/workflows/ci.yml | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4429303fd..1ec85c1a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ on: - master - develop - feature/** + - modular env: UBSAN_OPTIONS: print_stacktrace=1 @@ -149,19 +150,16 @@ jobs: - name: Setup Boost run: | echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - 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 && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + 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/quickbook/boost}.git + echo BOOST_GIT: ${BOOST_GIT} echo BOOST_BRANCH: $BOOST_BRANCH cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + git clone -b $BOOST_BRANCH --depth 1 "${BOOST_GIT}" boost-root cd boost-root + git submodule update --init + rm -rf tools/quickbook/* cp -r $GITHUB_WORKSPACE/* tools/quickbook - git submodule update --init tools/boostdep - python3 tools/boostdep/depinst/depinst.py --git_args "--jobs 3" ../tools/quickbook ./bootstrap.sh ./b2 -d0 headers @@ -173,7 +171,7 @@ jobs: - name: Run tests run: | cd ../boost-root - ./b2 -j3 tools/quickbook/test toolset=${{matrix.toolset}} variant=debug,release + ./b2 tools/quickbook//all toolset=${{matrix.toolset}} variant=debug,release windows: strategy: @@ -203,18 +201,19 @@ jobs: - 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% + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% set BOOST_BRANCH=develop - for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + if "%GITHUB_REF_NAME%" == "master" set BOOST_BRANCH=master + if "%GITHUB_REF_NAME%" == "modular" set BOOST_BRANCH=modular + set BOOST_GIT=https://github.com/%GITHUB_REPOSITORY:quickbook=boost%.git + echo BOOST_GIT: %BOOST_GIT% echo BOOST_BRANCH: %BOOST_BRANCH% cd .. - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + git clone -b %BOOST_BRANCH% --depth 1 %BOOST_GIT% boost-root cd boost-root + git submodule update --init + rd /s/q tools\quickbook xcopy /s /e /q %GITHUB_WORKSPACE% tools\quickbook\ - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" ../tools/quickbook cmd /c bootstrap b2 -d0 headers @@ -222,4 +221,4 @@ jobs: shell: cmd run: | cd ../boost-root - b2 -j3 tools/quickbook/test toolset=${{matrix.toolset}} variant=debug,release embed-manifest-via=linker + b2 tools/quickbook//all toolset=${{matrix.toolset}} variant=debug,release embed-manifest-via=linker From 4f870792c3f0e0e139c0b3769ae94657c1a5119f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 13 Apr 2024 10:47:35 -0500 Subject: [PATCH 3/8] Only use static linking to avoid DLL hell. --- Jamfile.v2 | 2 +- src/Jamfile.v2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jamfile.v2 b/Jamfile.v2 index 9d6ccef34..e5e10315c 100644 --- a/Jamfile.v2 +++ b/Jamfile.v2 @@ -37,6 +37,6 @@ explicit : EXE $(DIST_DIR)/bin : release ] [ alias dist : dist-bin ] - [ alias quickbook : src//quickbook ] + [ alias quickbook : src//quickbook/static ] [ alias all : quickbook dist test ] ; diff --git a/src/Jamfile.v2 b/src/Jamfile.v2 index 320e7cb27..7a7079ee2 100644 --- a/src/Jamfile.v2 +++ b/src/Jamfile.v2 @@ -44,8 +44,8 @@ exe quickbook block_element_grammar.cpp phrase_element_grammar.cpp doc_info_grammar.cpp - /boost/program_options//boost_program_options - /boost/filesystem//boost_filesystem + /boost/program_options//boost_program_options/static + /boost/filesystem//boost_filesystem/static : #QUICKBOOK_NO_DATES BOOST_FILESYSTEM_NO_DEPRECATED msvc:/wd4355 From 8045a823bb568c6189172dd6d61bfe2a9a6fb0a5 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Apr 2024 23:32:07 -0500 Subject: [PATCH 4/8] Need dist-bin target as default for release scripts. --- Jamfile.v2 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Jamfile.v2 b/Jamfile.v2 index e5e10315c..912fc05e4 100644 --- a/Jamfile.v2 +++ b/Jamfile.v2 @@ -31,11 +31,13 @@ project /boost/quickbook 11 ; +# The release scripts expect this as the default build target. +install dist-bin + : src//quickbook/static + : EXE $(DIST_DIR)/bin + : release ; + explicit - [ install dist-bin - : src//quickbook/static - : EXE $(DIST_DIR)/bin - : release ] [ alias dist : dist-bin ] [ alias quickbook : src//quickbook/static ] [ alias all : quickbook dist test ] From 92db05aafb65430edad215e816613a577b6d298a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Apr 2024 22:52:17 -0500 Subject: [PATCH 5/8] Build the dist target for tools by default. --- Jamfile.v2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Jamfile.v2 b/Jamfile.v2 index 912fc05e4..9b36f2c85 100644 --- a/Jamfile.v2 +++ b/Jamfile.v2 @@ -31,14 +31,14 @@ project /boost/quickbook 11 ; -# The release scripts expect this as the default build target. -install dist-bin - : src//quickbook/static - : EXE $(DIST_DIR)/bin - : release ; - explicit - [ alias dist : dist-bin ] + [ install dist-bin + : src//quickbook/static + : EXE $(DIST_DIR)/bin + : release ] [ alias quickbook : src//quickbook/static ] [ alias all : quickbook dist test ] ; + +# Install distribution files/execs by default. +alias dist : dist-bin ; From d482102e23b937d1e8a194a1ba73f83972b23458 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:01:49 -0500 Subject: [PATCH 6/8] Add requires-b2 check to top-level build file. --- Jamfile.v2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jamfile.v2 b/Jamfile.v2 index 9b36f2c85..ec2761b81 100644 --- a/Jamfile.v2 +++ b/Jamfile.v2 @@ -9,6 +9,8 @@ # http://www.boost.org/LICENSE_1_0.txt) #============================================================================== +require-b2 5.1 ; + import path ; import option ; From 01bb77b6c8671212eddf8c3323f2de433e4a9fa8 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 16 Jun 2024 14:28:18 -0500 Subject: [PATCH 7/8] Increment b2 version require. --- Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jamfile.v2 b/Jamfile.v2 index ec2761b81..18d6309e9 100644 --- a/Jamfile.v2 +++ b/Jamfile.v2 @@ -9,7 +9,7 @@ # http://www.boost.org/LICENSE_1_0.txt) #============================================================================== -require-b2 5.1 ; +require-b2 5.2 ; import path ; import option ; From 1b7b8ee1d86b0b333246a475374c41705a4d46e4 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 17 Jun 2024 10:12:41 -0500 Subject: [PATCH 8/8] Use 22.04 image to get g++-11 installed. As the 20.04 image aliases g++ to clang. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ec85c1a2..d49def241 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: os: ubuntu-20.04 install: g++-10 - toolset: gcc-11 - os: ubuntu-20.04 + os: ubuntu-22.04 install: g++-11 - toolset: gcc-12 os: ubuntu-22.04