From f7aca999b95eb52329c351d0a90ab28d78a6720b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:17 -0500 Subject: [PATCH 01/18] Make the library modular usable. --- build.jam | 26 ++++++++++++++++++++++++++ example/Jamfile.v2 | 9 +++++---- test/Jamfile.v2 | 2 ++ 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..f15a03f --- /dev/null +++ b/build.jam @@ -0,0 +1,26 @@ +# Copyright René Ferdinand Rivera Morell 2023 +# Distributed under 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) + +import project ; + +project /boost/local_function + : common-requirements + /boost/config//boost_config + /boost/mpl//boost_mpl + /boost/preprocessor//boost_preprocessor + /boost/scope_exit//boost_scope_exit + /boost/type_traits//boost_type_traits + /boost/typeof//boost_typeof + /boost/utility//boost_utility + include + ; + +explicit + [ alias boost_local_function ] + [ alias all : boost_local_function example test ] + ; + +call-if : boost-library local_function + ; diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 068ef6d..f5ba6f9 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -18,7 +18,7 @@ project : run add_cxx11_lambda.cpp ; run add_global_functor.cpp ; run add_local_functor.cpp ; -run add_phoenix.cpp ; +run add_phoenix.cpp : : : /boost/spirit//boost_spirit ; run const_block.cpp ; compile-fail const_block_error.cpp : debug ; @@ -43,8 +43,8 @@ run n2550_find_if.cpp ; compile-fail noncopyable_cxx11_lambda_error.cpp ; run noncopyable_local_function.cpp ; -run phoenix_factorial.cpp ; -run phoenix_factorial_local.cpp ; +run phoenix_factorial.cpp : : : /boost/phoenix//boost_phoenix ; +run phoenix_factorial_local.cpp : : : /boost/phoenix//boost_phoenix ; # Only compile but do not run profiling programs (they take a long time to run). exe profile_global_functor : profile_global_functor.cpp @@ -75,8 +75,9 @@ exe profile_local_functor : profile_local_functor.cpp exe profile_phoenix : profile_phoenix.cpp : /boost/chrono//boost_chrono /boost/system//boost_system + /boost/phoenix//boost_phoenix static ; -run scope_exit.cpp ; +run scope_exit.cpp : : : /boost/foreach//boost_foreach ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 20bed34..8cda65f 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -13,6 +13,8 @@ project : sun:BOOST_TYPEOF_EMULATION gcc:-Wno-unused-local-typedefs clang:-Wno-unused-local-typedefs + /boost/concept_check//boost_concept_check + /boost/functional//boost_functional ; rule vaseq ( command target ) From 72123e0511e59b94728e2147447f8adf00da7c8b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:15:59 -0500 Subject: [PATCH 02/18] Switch to library requirements instead of source. As source puts extra source in install targets. --- build.jam | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build.jam b/build.jam index f15a03f..c9793b5 100644 --- a/build.jam +++ b/build.jam @@ -7,13 +7,13 @@ import project ; project /boost/local_function : common-requirements - /boost/config//boost_config - /boost/mpl//boost_mpl - /boost/preprocessor//boost_preprocessor - /boost/scope_exit//boost_scope_exit - /boost/type_traits//boost_type_traits - /boost/typeof//boost_typeof - /boost/utility//boost_utility + /boost/config//boost_config + /boost/mpl//boost_mpl + /boost/preprocessor//boost_preprocessor + /boost/scope_exit//boost_scope_exit + /boost/type_traits//boost_type_traits + /boost/typeof//boost_typeof + /boost/utility//boost_utility include ; From f9fa2ef18695f991de182e35aaeea7045e121e26 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -0500 Subject: [PATCH 03/18] Add requires-b2 check to top-level build file. --- build.jam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.jam b/build.jam index c9793b5..c9e68ea 100644 --- a/build.jam +++ b/build.jam @@ -3,6 +3,8 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) +require-b2 5.1 ; + import project ; project /boost/local_function From 53e5ab4b0711bad13e8c4e72c3d82e332565d47c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:55 -0500 Subject: [PATCH 04/18] Bump B2 require to 5.2 --- build.jam | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.jam b/build.jam index c9e68ea..b186720 100644 --- a/build.jam +++ b/build.jam @@ -3,9 +3,7 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -require-b2 5.1 ; - -import project ; +require-b2 5.2 ; project /boost/local_function : common-requirements From b818be49ce426d4bcbfeca5b317b6b9dd0ee7cd7 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 19:40:31 -0500 Subject: [PATCH 05/18] Change all references to . --- example/Jamfile.v2 | 10 +++++----- test/Jamfile.v2 | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index f5ba6f9..db578c1 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -18,7 +18,7 @@ project : run add_cxx11_lambda.cpp ; run add_global_functor.cpp ; run add_local_functor.cpp ; -run add_phoenix.cpp : : : /boost/spirit//boost_spirit ; +run add_phoenix.cpp : : : /boost/spirit//boost_spirit ; run const_block.cpp ; compile-fail const_block_error.cpp : debug ; @@ -43,8 +43,8 @@ run n2550_find_if.cpp ; compile-fail noncopyable_cxx11_lambda_error.cpp ; run noncopyable_local_function.cpp ; -run phoenix_factorial.cpp : : : /boost/phoenix//boost_phoenix ; -run phoenix_factorial_local.cpp : : : /boost/phoenix//boost_phoenix ; +run phoenix_factorial.cpp : : : /boost/phoenix//boost_phoenix ; +run phoenix_factorial_local.cpp : : : /boost/phoenix//boost_phoenix ; # Only compile but do not run profiling programs (they take a long time to run). exe profile_global_functor : profile_global_functor.cpp @@ -75,9 +75,9 @@ exe profile_local_functor : profile_local_functor.cpp exe profile_phoenix : profile_phoenix.cpp : /boost/chrono//boost_chrono /boost/system//boost_system - /boost/phoenix//boost_phoenix + /boost/phoenix//boost_phoenix static ; -run scope_exit.cpp : : : /boost/foreach//boost_foreach ; +run scope_exit.cpp : : : /boost/foreach//boost_foreach ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 8cda65f..0ad9210 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -13,8 +13,8 @@ project : sun:BOOST_TYPEOF_EMULATION gcc:-Wno-unused-local-typedefs clang:-Wno-unused-local-typedefs - /boost/concept_check//boost_concept_check - /boost/functional//boost_functional + /boost/concept_check//boost_concept_check + /boost/functional//boost_functional ; rule vaseq ( command target ) From 87584e369476d3bb536927a86a3cc0cac5aff900 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 22:52:04 -0500 Subject: [PATCH 06/18] Update copyright dates. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index b186720..020e54e 100644 --- a/build.jam +++ b/build.jam @@ -1,4 +1,4 @@ -# Copyright René Ferdinand Rivera Morell 2023 +# Copyright René Ferdinand Rivera Morell 2023-2024 # Distributed under 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) From d792d63a15b7be1003d54e17717ac4238cd42c47 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:23 -0500 Subject: [PATCH 07/18] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/build.jam b/build.jam index 020e54e..4d5aa76 100644 --- a/build.jam +++ b/build.jam @@ -5,22 +5,25 @@ require-b2 5.2 ; +constant boost_dependencies : + /boost/config//boost_config + /boost/mpl//boost_mpl + /boost/preprocessor//boost_preprocessor + /boost/scope_exit//boost_scope_exit + /boost/type_traits//boost_type_traits + /boost/typeof//boost_typeof + /boost/utility//boost_utility ; + project /boost/local_function : common-requirements - /boost/config//boost_config - /boost/mpl//boost_mpl - /boost/preprocessor//boost_preprocessor - /boost/scope_exit//boost_scope_exit - /boost/type_traits//boost_type_traits - /boost/typeof//boost_typeof - /boost/utility//boost_utility include ; explicit - [ alias boost_local_function ] + [ alias boost_local_function : : : : $(boost_dependencies) ] [ alias all : boost_local_function example test ] ; call-if : boost-library local_function ; + From 985af83141ef7ea7fe610008ea3964c297171d47 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 28 Jul 2024 11:11:21 -0500 Subject: [PATCH 08/18] Adjust doc build to avoid boost-root references. --- doc/Jamfile.v2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index e614691..c5813cd 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -12,8 +12,8 @@ path-constant images_location : html ; path-constant here : . ; doxygen reference - : ../../../boost/local_function.hpp - ../../../boost/local_function/config.hpp + : ../include/boost/local_function.hpp + ../include/boost/local_function/config.hpp : "Reference" PREDEFINED="DOXYGEN" QUIET=YES From f23790a027e8da279a2df8b13eec8e13de423f29 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 3 Aug 2024 16:47:16 -0500 Subject: [PATCH 09/18] Update build deps. --- example/Jamfile.v2 | 1 + test/Jamfile.v2 | 1 + 2 files changed, 2 insertions(+) diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index db578c1..be36c68 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -10,6 +10,7 @@ import testing ; # Sun does not automatically detect type-of emulation mode (force it). project : requirements + /boost/local_function//boost_local_function sun:BOOST_TYPEOF_EMULATION gcc:-Wno-unused-local-typedefs clang:-Wno-unused-local-typedefs diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 0ad9210..f0b69ae 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -10,6 +10,7 @@ import testing ; # Sun does not automatically detect type-of emulation mode (force it). project : requirements + /boost/local_function//boost_local_function sun:BOOST_TYPEOF_EMULATION gcc:-Wno-unused-local-typedefs clang:-Wno-unused-local-typedefs From aebd43cc868a341c1e95e7da89e712fbbc8f088b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 15 Aug 2024 08:23:08 -0500 Subject: [PATCH 10/18] Update build deps. --- example/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index be36c68..1c8a4b1 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -19,7 +19,7 @@ project : run add_cxx11_lambda.cpp ; run add_global_functor.cpp ; run add_local_functor.cpp ; -run add_phoenix.cpp : : : /boost/spirit//boost_spirit ; +run add_phoenix.cpp : : : /boost/phoenix//boost_phoenix ; run const_block.cpp ; compile-fail const_block_error.cpp : debug ; From 1475ecb831f93b753096fe54ace9568246e2bc25 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 6 Apr 2025 21:26:20 -0500 Subject: [PATCH 11/18] Replace GHA CI with simpler working one based on alandefreitas/cpp-actions utilities. --- .github/workflows/ci.yml | 353 ++++++++++++--------------------------- 1 file changed, 106 insertions(+), 247 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86a20b9..ef426ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: GitHub Actions CI on: pull_request: @@ -6,262 +6,121 @@ on: branches: - master - develop + - githubactions* - feature/** - -env: - UBSAN_OPTIONS: print_stacktrace=1 + - fix/** + - pr/** jobs: - posix: - strategy: - fail-fast: false - matrix: - include: - - toolset: gcc-4.8 - cxxstd: "11" - container: ubuntu:18.04 - os: ubuntu-latest - install: g++-4.8 - - toolset: gcc-5 - cxxstd: "11,14,1z" - container: ubuntu:18.04 - os: ubuntu-latest - install: g++-5 - - toolset: gcc-6 - cxxstd: "11,14,1z" - container: ubuntu:18.04 - os: ubuntu-latest - install: g++-6 - - toolset: gcc-7 - cxxstd: "11,14,17" - os: ubuntu-20.04 - install: g++-7 - - toolset: gcc-8 - cxxstd: "11,14,17,2a" - os: ubuntu-20.04 - install: g++-8 - - toolset: gcc-9 - cxxstd: "11,14,17,2a" - os: ubuntu-20.04 - - toolset: gcc-10 - cxxstd: "11,14,17,2a" - os: ubuntu-20.04 - install: g++-10 - - toolset: gcc-11 - cxxstd: "11,14,17,2a" - os: ubuntu-20.04 - install: g++-11 - - toolset: gcc-12 - cxxstd: "11,14,17,20,2b" - os: ubuntu-22.04 - install: g++-12 - - toolset: gcc-13 - cxxstd: "11,14,17,20,2b" - container: ubuntu:23.04 - os: ubuntu-latest - install: g++-13 - - toolset: clang - compiler: clang++-3.9 - cxxstd: "11,14" - container: ubuntu:18.04 - os: ubuntu-latest - install: clang-3.9 - - toolset: clang - compiler: clang++-4.0 - cxxstd: "11,14" - container: ubuntu:18.04 - os: ubuntu-latest - install: clang-4.0 - - toolset: clang - compiler: clang++-5.0 - cxxstd: "11,14,1z" - container: ubuntu:18.04 - os: ubuntu-latest - install: clang-5.0 - - toolset: clang - compiler: clang++-6.0 - cxxstd: "11,14,17" - os: ubuntu-20.04 - install: clang-6.0 - - toolset: clang - compiler: clang++-7 - cxxstd: "11,14,17" - os: ubuntu-20.04 - install: clang-7 - - toolset: clang - compiler: clang++-8 - cxxstd: "11,14,17" - os: ubuntu-20.04 - install: clang-8 - - toolset: clang - compiler: clang++-9 - cxxstd: "11,14,17,2a" - os: ubuntu-20.04 - install: clang-9 - - toolset: clang - compiler: clang++-10 - cxxstd: "11,14,17,2a" - os: ubuntu-20.04 - install: clang-10 - - toolset: clang - compiler: clang++-11 - cxxstd: "11,14,17,2a" - os: ubuntu-20.04 - install: clang-11 - - toolset: clang - compiler: clang++-12 - cxxstd: "11,14,17,2a" - os: ubuntu-20.04 - install: clang-12 - - toolset: clang - compiler: clang++-13 - cxxstd: "11,14,17,20,2b" - container: ubuntu:22.04 - os: ubuntu-latest - install: clang-13 - - toolset: clang - compiler: clang++-14 - cxxstd: "11,14,17,20,2b" - container: ubuntu:22.04 - os: ubuntu-latest - install: clang-14 - - toolset: clang - compiler: clang++-15 - cxxstd: "11,14,17,20,2b" - container: ubuntu:22.04 - os: ubuntu-latest - install: clang-15 - - toolset: clang - compiler: clang++-16 - cxxstd: "11,14,17,20,2b" - container: ubuntu:23.04 - os: ubuntu-latest - install: clang-16 - - toolset: clang - compiler: clang++-17 - cxxstd: "11,14,17,20,2b" - container: ubuntu:23.10 - os: ubuntu-latest - install: clang-17 - - toolset: clang - cxxstd: "11,14,17,2a" - os: macos-11 - - toolset: clang - cxxstd: "11,14,17,20,2b" - os: macos-12 - - toolset: clang - cxxstd: "11,14,17,20,2b" - os: macos-13 - - runs-on: ${{matrix.os}} - container: ${{matrix.container}} - - defaults: - run: - shell: bash - + cpp-matrix: + runs-on: ubuntu-latest + name: Generate Test Matrix + outputs: + matrix: ${{ steps.cpp-matrix.outputs.matrix }} steps: - - uses: actions/checkout@v3 - - - name: Setup container environment - if: matrix.container - run: | - apt-get update - apt-get -y install sudo python3 git g++ - - - name: Install packages - if: matrix.install - run: | - sudo apt-get update - sudo apt-get -y install ${{matrix.install}} - - - name: Setup Boost - run: | - echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY - LIBRARY=${GITHUB_REPOSITORY#*/} - echo LIBRARY: $LIBRARY - echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV - 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 - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY - git submodule update --init tools/boostdep - python3 tools/boostdep/depinst/depinst.py -I example --git_args "--jobs 3" $LIBRARY - ./bootstrap.sh - ./b2 -d0 headers - - - name: Create user-config.jam - if: matrix.compiler - run: | - echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam - - - name: Run tests - run: | - cd ../boost-root - ./b2 -j3 libs/$LIBRARY/test libs/$LIBRARY/example toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release - - windows: + - name: Generate Test Matrix + uses: alandefreitas/cpp-actions/cpp-matrix@master + id: cpp-matrix + with: + extra-values: | + boost-lib: local_function + scan-dirs: test + compilers: | + gcc >= 4.8 + clang >= 3.5 + msvc >= 14.0 + apple-clang * + mingw * + clang-cl * + standards: ">=11" + latest-factors: | + gcc Asan TSan UBSan + clang BoundsSan IntSan + factors: | + gcc Shared + msvc Shared x86 + mingw Shared + subrange-policy: one-per-minor + trace-commands: true + build: + needs: cpp-matrix strategy: fail-fast: false matrix: - include: - - toolset: msvc-14.0 - cxxstd: "14,latest" - addrmd: 32,64 - os: windows-2019 - - toolset: msvc-14.2 - cxxstd: "14,17,20,latest" - addrmd: 32,64 - os: windows-2019 - - toolset: msvc-14.3 - cxxstd: "14,17,20,latest" - addrmd: 32,64 - os: windows-2022 - - toolset: clang-win - cxxstd: "14,17,20,latest" - addrmd: 32,64 - os: windows-2022 - - toolset: gcc - cxxstd: "11,14,17,2a" - addrmd: 64 - os: windows-2019 + include: ${{ fromJSON(needs.cpp-matrix.outputs.matrix) }} - runs-on: ${{matrix.os}} + # use matrix entries + name: ${{ matrix.name }} + runs-on: ${{ matrix.runs-on }} + container: ${{ matrix.container }} steps: - - uses: actions/checkout@v3 - - - name: Setup Boost - shell: cmd + # GitHub Actions no longer support older containers. + # The workaround is to install our own Node.js for the actions. + - name: Patch Node + # The containers that need Node.js 20 will have volumes set up so that + # the Node.js 20 installation can go there. + if: ${{ matrix.container.volumes }} run: | - echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% - for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi - echo LIBRARY: %LIBRARY% - echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% - echo GITHUB_BASE_REF: %GITHUB_BASE_REF% - echo GITHUB_REF: %GITHUB_REF% - if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% - set BOOST_BRANCH=develop - for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master - echo BOOST_BRANCH: %BOOST_BRANCH% - cd .. - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py -I example --git_args "--jobs 3" %LIBRARY% - cmd /c bootstrap - b2 -d0 headers - - - name: Run tests - shell: cmd + set -x + apt-get update + apt-get install -y curl xz-utils + curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz + tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 + ldd /__e/node20/bin/node + + - name: Setup C++ Compiler + uses: alandefreitas/cpp-actions/setup-cpp@master + id: setup-cpp + with: + compiler: ${{ matrix.compiler }} + version: ${{ matrix.version }} + + - name: Install Packages + if: matrix.install != '' + uses: alandefreitas/cpp-actions/package-install@master + id: package-install + with: + apt-get: ${{ matrix.install }} + + - name: Clone Library + uses: actions/checkout@v4 + + - name: Clone Boost + uses: alandefreitas/cpp-actions/boost-clone@master + id: boost-clone + with: + branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }} + boost-dir: ../boost-root + scan-modules-dir: . + scan-modules-ignore: ${{ matrix.boost-lib }} + modules-scan-paths: ${{ matrix.scan-dirs }} + cache: false + + - name: Copy Library + shell: bash run: | + workspace_root=$(echo "$GITHUB_WORKSPACE" | sed 's/\\/\//g') cd ../boost-root - b2 -j3 libs/%LIBRARY%/test libs/%LIBRARY%/example toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker + rm -rf "libs/${{ matrix.boost-lib }}" + mkdir "libs/${{ matrix.boost-lib }}" + cp -r "$workspace_root"/* "libs/${{ matrix.boost-lib }}" + + - name: B2 Workflow + uses: alandefreitas/cpp-actions/b2-workflow@master + with: + source-dir: ${{ steps.boost-clone.outputs.boost-dir }} + modules: ${{ matrix.boost-lib }} + toolset: ${{ matrix.b2-toolset }} + build-variant: ${{ matrix.build-type }} + cxx: ${{ steps.setup-cpp.outputs.cxx || '' }} + cxxstd: ${{ matrix.cxxstd }} + address-model: ${{ matrix.address-model }} + asan: ${{ matrix.asan }} + ubsan: ${{ matrix.ubsan }} + tsan: ${{ matrix.tsan }} + shared: ${{ matrix.shared }} + abbreviate-paths: false + hash: true + debug-configuration: true + trace-commands: true From e665b18280e78c74eff792bef9cc067f2bbbc08c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 7 Apr 2025 18:57:39 -0500 Subject: [PATCH 12/18] Move project global include to target local include. --- build.jam | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.jam b/build.jam index 4d5aa76..3dd1be5 100644 --- a/build.jam +++ b/build.jam @@ -15,12 +15,11 @@ constant boost_dependencies : /boost/utility//boost_utility ; project /boost/local_function - : common-requirements - include ; explicit - [ alias boost_local_function : : : : $(boost_dependencies) ] + [ alias boost_local_function : : : + : include $(boost_dependencies) ] [ alias all : boost_local_function example test ] ; From 5ffcd1ab6edb847ebaa721ee4bc7f8740e34aa38 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 9 Apr 2025 23:04:36 -0500 Subject: [PATCH 13/18] Only msvc gets minor version tests. --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef426ab..c58712d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,8 @@ jobs: gcc Shared msvc Shared x86 mingw Shared - subrange-policy: one-per-minor + subrange-policy: | + msvc: one-per-minor trace-commands: true build: needs: cpp-matrix From b080345720896063a9d442e2ec69636c4051558c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 7 Jun 2025 22:39:33 -0500 Subject: [PATCH 14/18] Redo GHA CI to undo move to cpp-actions. --- .github/workflows/ci.yml | 368 ++++++++++++++++++++++++++++----------- 1 file changed, 265 insertions(+), 103 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c58712d..b829d85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: GitHub Actions CI +name: CI on: pull_request: @@ -6,122 +6,284 @@ on: branches: - master - develop - - githubactions* - feature/** - - fix/** - - pr/** + +env: + UBSAN_OPTIONS: print_stacktrace=1 jobs: - cpp-matrix: - runs-on: ubuntu-latest - name: Generate Test Matrix - outputs: - matrix: ${{ steps.cpp-matrix.outputs.matrix }} - steps: - - name: Generate Test Matrix - uses: alandefreitas/cpp-actions/cpp-matrix@master - id: cpp-matrix - with: - extra-values: | - boost-lib: local_function - scan-dirs: test - compilers: | - gcc >= 4.8 - clang >= 3.5 - msvc >= 14.0 - apple-clang * - mingw * - clang-cl * - standards: ">=11" - latest-factors: | - gcc Asan TSan UBSan - clang BoundsSan IntSan - factors: | - gcc Shared - msvc Shared x86 - mingw Shared - subrange-policy: | - msvc: one-per-minor - trace-commands: true - build: - needs: cpp-matrix + posix: strategy: fail-fast: false matrix: - include: ${{ fromJSON(needs.cpp-matrix.outputs.matrix) }} + include: + - toolset: gcc + compiler: g++-4.8 + cxxstd: "03,11" + os: ubuntu-latest + container: ubuntu:18.04 + install: g++-4.8 + - toolset: gcc + compiler: g++-5 + cxxstd: "03,11,14,1z" + os: ubuntu-latest + container: ubuntu:18.04 + install: g++-5 + - toolset: gcc + compiler: g++-6 + cxxstd: "03,11,14,1z" + os: ubuntu-latest + container: ubuntu:18.04 + install: g++-6 + - toolset: gcc + compiler: g++-7 + cxxstd: "03,11,14,17" + os: ubuntu-latest + container: ubuntu:18.04 + - toolset: gcc + compiler: g++-8 + cxxstd: "03,11,14,17,2a" + os: ubuntu-latest + container: ubuntu:18.04 + install: g++-8 + - toolset: gcc + compiler: g++-9 + cxxstd: "03,11,14,17,2a" + os: ubuntu-latest + container: ubuntu:20.04 + - toolset: gcc + compiler: g++-10 + cxxstd: "03,11,14,17,2a" + os: ubuntu-latest + container: ubuntu:20.04 + install: g++-10 + - toolset: gcc + compiler: g++-11 + cxxstd: "03,11,14,17,2a" + os: ubuntu-latest + container: ubuntu:24.04 + install: g++-11 + - toolset: gcc + compiler: g++-12 + cxxstd: "11,14,17,20,2b" + os: ubuntu-22.04 + install: g++-12 + - toolset: gcc + compiler: g++-13 + cxxstd: "11,14,17,20,2b" + container: ubuntu:24.04 + os: ubuntu-latest + install: g++-13 + - toolset: clang + compiler: clang++-3.9 + cxxstd: "11,14" + container: ubuntu:18.04 + os: ubuntu-latest + install: clang-3.9 + - toolset: clang + compiler: clang++-4.0 + cxxstd: "11,14" + container: ubuntu:18.04 + os: ubuntu-latest + install: clang-4.0 + - toolset: clang + compiler: clang++-5.0 + cxxstd: "11,14,1z" + container: ubuntu:18.04 + os: ubuntu-latest + install: clang-5.0 + - toolset: clang + compiler: clang++-6.0 + cxxstd: "11,14,17" + container: ubuntu:20.04 + os: ubuntu-latest + install: clang-6.0 + - toolset: clang + compiler: clang++-7 + cxxstd: "11,14,17" + container: ubuntu:20.04 + os: ubuntu-latest + install: clang-7 + - toolset: clang + compiler: clang++-8 + cxxstd: "11,14,17" + container: ubuntu:20.04 + os: ubuntu-latest + install: clang-8 + - toolset: clang + compiler: clang++-9 + cxxstd: "11,14,17,2a" + container: ubuntu:20.04 + os: ubuntu-latest + install: clang-9 + - toolset: clang + compiler: clang++-10 + cxxstd: "11,14,17,2a" + container: ubuntu:20.04 + os: ubuntu-latest + install: clang-10 + - toolset: clang + compiler: clang++-11 + cxxstd: "11,14,17,2a" + container: ubuntu:20.04 + os: ubuntu-latest + install: clang-11 + - toolset: clang + compiler: clang++-12 + cxxstd: "11,14,17,2a" + container: ubuntu:20.04 + os: ubuntu-latest + install: clang-12 + - toolset: clang + compiler: clang++-13 + cxxstd: "11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-13 + - toolset: clang + compiler: clang++-14 + cxxstd: "11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-14 + - toolset: clang + compiler: clang++-15 + cxxstd: "11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-15 + - toolset: clang + compiler: clang++-16 + cxxstd: "11,14,17,20,2b" + container: ubuntu:23.04 + os: ubuntu-latest + install: clang-16 + - toolset: clang + compiler: clang++-17 + cxxstd: "11,14,17,20,2b" + container: ubuntu:23.10 + os: ubuntu-latest + install: clang-17 + - toolset: clang + cxxstd: "11,14,17,20,2b" + os: macos-13 + - toolset: clang + cxxstd: "11,14,17,20,2b" + os: macos-14 + - toolset: clang + cxxstd: "11,14,17,20,2b" + os: macos-15 - # use matrix entries - name: ${{ matrix.name }} - runs-on: ${{ matrix.runs-on }} - container: ${{ matrix.container }} + runs-on: ${{matrix.os}} + container: + image: ${{matrix.container}} + volumes: + - /node20217:/node20217:rw,rshared + - ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }} + + defaults: + run: + shell: bash steps: - # GitHub Actions no longer support older containers. - # The workaround is to install our own Node.js for the actions. - - name: Patch Node - # The containers that need Node.js 20 will have volumes set up so that - # the Node.js 20 installation can go there. - if: ${{ matrix.container.volumes }} + - name: Setup container environment + if: matrix.container run: | - set -x apt-get update - apt-get install -y curl xz-utils + apt-get -y install sudo python3 git g++ curl xz-utils + + - name: Install nodejs20glibc2.17 + if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }} + run: | curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 ldd /__e/node20/bin/node - - name: Setup C++ Compiler - uses: alandefreitas/cpp-actions/setup-cpp@master - id: setup-cpp - with: - compiler: ${{ matrix.compiler }} - version: ${{ matrix.version }} - - - name: Install Packages - if: matrix.install != '' - uses: alandefreitas/cpp-actions/package-install@master - id: package-install - with: - apt-get: ${{ matrix.install }} - - - name: Clone Library - uses: actions/checkout@v4 - - - name: Clone Boost - uses: alandefreitas/cpp-actions/boost-clone@master - id: boost-clone - with: - branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }} - boost-dir: ../boost-root - scan-modules-dir: . - scan-modules-ignore: ${{ matrix.boost-lib }} - modules-scan-paths: ${{ matrix.scan-dirs }} - cache: false - - - name: Copy Library - shell: bash + - name: Install packages + if: matrix.install + run: sudo apt-get -y install ${{matrix.install}} + + - uses: actions/checkout@v3 + + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + 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 + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python3 tools/boostdep/depinst/depinst.py -I example --git_args "--jobs 3" $LIBRARY + ./bootstrap.sh + ./b2 -d0 headers + + - name: Create user-config.jam + if: matrix.compiler + run: | + echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam + + - name: Run tests + run: | + cd ../boost-root + ./b2 -j3 libs/$LIBRARY/test libs/$LIBRARY/example toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release + + windows: + strategy: + fail-fast: false + matrix: + include: + - toolset: msvc-14.3 + cxxstd: "14,17,20,latest" + addrmd: 32,64 + os: windows-2022 + - toolset: clang-win + cxxstd: "14,17,20,latest" + addrmd: 32,64 + os: windows-2022 + - toolset: gcc + cxxstd: "11,14,17,2a" + addrmd: 64 + os: windows-2022 + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v3 + + - name: Setup Boost + shell: cmd + run: | + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% + cd .. + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py -I example --git_args "--jobs 3" %LIBRARY% + cmd /c bootstrap + b2 -d0 headers + + - name: Run tests + shell: cmd run: | - workspace_root=$(echo "$GITHUB_WORKSPACE" | sed 's/\\/\//g') cd ../boost-root - rm -rf "libs/${{ matrix.boost-lib }}" - mkdir "libs/${{ matrix.boost-lib }}" - cp -r "$workspace_root"/* "libs/${{ matrix.boost-lib }}" - - - name: B2 Workflow - uses: alandefreitas/cpp-actions/b2-workflow@master - with: - source-dir: ${{ steps.boost-clone.outputs.boost-dir }} - modules: ${{ matrix.boost-lib }} - toolset: ${{ matrix.b2-toolset }} - build-variant: ${{ matrix.build-type }} - cxx: ${{ steps.setup-cpp.outputs.cxx || '' }} - cxxstd: ${{ matrix.cxxstd }} - address-model: ${{ matrix.address-model }} - asan: ${{ matrix.asan }} - ubsan: ${{ matrix.ubsan }} - tsan: ${{ matrix.tsan }} - shared: ${{ matrix.shared }} - abbreviate-paths: false - hash: true - debug-configuration: true - trace-commands: true + b2 -j3 libs/%LIBRARY%/test libs/%LIBRARY%/example toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker From 79e1b9f90679e9fca9899debb6b08fa930add0cf Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 7 Jun 2025 22:44:01 -0500 Subject: [PATCH 15/18] Fix non-existent containers. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b829d85..43a3fd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,13 +155,13 @@ jobs: - toolset: clang compiler: clang++-16 cxxstd: "11,14,17,20,2b" - container: ubuntu:23.04 + container: ubuntu:24.04 os: ubuntu-latest install: clang-16 - toolset: clang compiler: clang++-17 cxxstd: "11,14,17,20,2b" - container: ubuntu:23.10 + container: ubuntu:24.04 os: ubuntu-latest install: clang-17 - toolset: clang From 525cfaee336c9e3a3ec6180834ce455074e7d157 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 8 Jun 2025 09:21:42 -0500 Subject: [PATCH 16/18] This lib now only works for C++11. --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43a3fd0..bfe5da1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,47 +19,47 @@ jobs: include: - toolset: gcc compiler: g++-4.8 - cxxstd: "03,11" + cxxstd: "11" os: ubuntu-latest container: ubuntu:18.04 install: g++-4.8 - toolset: gcc compiler: g++-5 - cxxstd: "03,11,14,1z" + cxxstd: "11,14,1z" os: ubuntu-latest container: ubuntu:18.04 install: g++-5 - toolset: gcc compiler: g++-6 - cxxstd: "03,11,14,1z" + cxxstd: "11,14,1z" os: ubuntu-latest container: ubuntu:18.04 install: g++-6 - toolset: gcc compiler: g++-7 - cxxstd: "03,11,14,17" + cxxstd: "11,14,17" os: ubuntu-latest container: ubuntu:18.04 - toolset: gcc compiler: g++-8 - cxxstd: "03,11,14,17,2a" + cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:18.04 install: g++-8 - toolset: gcc compiler: g++-9 - cxxstd: "03,11,14,17,2a" + cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 - toolset: gcc compiler: g++-10 - cxxstd: "03,11,14,17,2a" + cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 install: g++-10 - toolset: gcc compiler: g++-11 - cxxstd: "03,11,14,17,2a" + cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:24.04 install: g++-11 From 360c93cba46854be9311f84865c7291bf62ebec0 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 25 Jun 2025 22:58:33 -0500 Subject: [PATCH 17/18] Undo explicit g++ compiler specification. --- .github/workflows/ci.yml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfe5da1..ac2c63b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,59 +17,49 @@ jobs: fail-fast: false matrix: include: - - toolset: gcc - compiler: g++-4.8 + - toolset: gcc-4.8 cxxstd: "11" os: ubuntu-latest container: ubuntu:18.04 install: g++-4.8 - - toolset: gcc - compiler: g++-5 + - toolset: gcc-5 cxxstd: "11,14,1z" os: ubuntu-latest container: ubuntu:18.04 install: g++-5 - - toolset: gcc - compiler: g++-6 + - toolset: gcc-6 cxxstd: "11,14,1z" os: ubuntu-latest container: ubuntu:18.04 install: g++-6 - - toolset: gcc - compiler: g++-7 + - toolset: gcc-7 cxxstd: "11,14,17" os: ubuntu-latest container: ubuntu:18.04 - - toolset: gcc - compiler: g++-8 + - toolset: gcc-8 cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:18.04 install: g++-8 - - toolset: gcc - compiler: g++-9 + - toolset: gcc-9 cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 - - toolset: gcc - compiler: g++-10 + - toolset: gcc-10 cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 install: g++-10 - - toolset: gcc - compiler: g++-11 + - toolset: gcc-11 cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:24.04 install: g++-11 - - toolset: gcc - compiler: g++-12 + - toolset: gcc-12 cxxstd: "11,14,17,20,2b" os: ubuntu-22.04 install: g++-12 - - toolset: gcc - compiler: g++-13 + - toolset: gcc-13 cxxstd: "11,14,17,20,2b" container: ubuntu:24.04 os: ubuntu-latest From d09d510c20f710099d00fc4ba091e7b325ac450c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 26 Jun 2025 08:34:34 -0500 Subject: [PATCH 18/18] Move container spec up for display purpouses. --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac2c63b..c831c0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,41 +19,41 @@ jobs: include: - toolset: gcc-4.8 cxxstd: "11" - os: ubuntu-latest container: ubuntu:18.04 + os: ubuntu-latest install: g++-4.8 - toolset: gcc-5 cxxstd: "11,14,1z" - os: ubuntu-latest container: ubuntu:18.04 + os: ubuntu-latest install: g++-5 - toolset: gcc-6 cxxstd: "11,14,1z" - os: ubuntu-latest container: ubuntu:18.04 + os: ubuntu-latest install: g++-6 - toolset: gcc-7 cxxstd: "11,14,17" - os: ubuntu-latest container: ubuntu:18.04 + os: ubuntu-latest - toolset: gcc-8 cxxstd: "11,14,17,2a" - os: ubuntu-latest container: ubuntu:18.04 + os: ubuntu-latest install: g++-8 - toolset: gcc-9 cxxstd: "11,14,17,2a" - os: ubuntu-latest container: ubuntu:20.04 + os: ubuntu-latest - toolset: gcc-10 cxxstd: "11,14,17,2a" - os: ubuntu-latest container: ubuntu:20.04 + os: ubuntu-latest install: g++-10 - toolset: gcc-11 cxxstd: "11,14,17,2a" - os: ubuntu-latest container: ubuntu:24.04 + os: ubuntu-latest install: g++-11 - toolset: gcc-12 cxxstd: "11,14,17,20,2b"