From efa11aa1e70b09a6f36bbee4cc3601b985c30dbc Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:17 -0500 Subject: [PATCH 01/17] Make the library modular usable. --- build.jam | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..081fd34 --- /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/numeric_conversion + : common-requirements + /boost/config//boost_config + /boost/conversion//boost_conversion + /boost/core//boost_core + /boost/mpl//boost_mpl + /boost/preprocessor//boost_preprocessor + /boost/throw_exception//boost_throw_exception + /boost/type_traits//boost_type_traits + include + ; + +explicit + [ alias boost_numeric_conversion ] + [ alias all : boost_numeric_conversion test ] + ; + +call-if : boost-library numeric_conversion + ; From dde04082021684c16f6cbf81d621a39da81865ca Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:15:59 -0500 Subject: [PATCH 02/17] 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 081fd34..0bce66b 100644 --- a/build.jam +++ b/build.jam @@ -7,13 +7,13 @@ import project ; project /boost/numeric_conversion : common-requirements - /boost/config//boost_config - /boost/conversion//boost_conversion - /boost/core//boost_core - /boost/mpl//boost_mpl - /boost/preprocessor//boost_preprocessor - /boost/throw_exception//boost_throw_exception - /boost/type_traits//boost_type_traits + /boost/config//boost_config + /boost/conversion//boost_conversion + /boost/core//boost_core + /boost/mpl//boost_mpl + /boost/preprocessor//boost_preprocessor + /boost/throw_exception//boost_throw_exception + /boost/type_traits//boost_type_traits include ; From bf0cfb9044db83688eef949e277e19cde773aa03 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 25 Apr 2024 08:52:29 -0500 Subject: [PATCH 03/17] Add missing b2 testing module import. --- test/Jamfile.v2 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 16f3eba..b6d00a9 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -5,8 +5,8 @@ # 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 testing ; + +import testing ; project numeric_conversion_unit_tests : @@ -16,7 +16,7 @@ project numeric_conversion_unit_tests darwin:"-ftemplate-depth-300 -g0" ; -test-suite minimal +test-suite minimal : [ run bounds_test.cpp ] [ run traits_test.cpp : : : msvc:/bigobj ] @@ -27,10 +27,10 @@ test-suite minimal [ run numeric_cast_traits_test.cpp ] ; -test-suite full +test-suite full : minimal - [ compile-fail compile_fail/built_in_numeric_cast_traits.cpp ] + [ compile-fail compile_fail/built_in_numeric_cast_traits.cpp ] ; test-suite extra ; From 2bf1612e4e607e0cec9836c7b1c576172bc45981 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -0500 Subject: [PATCH 04/17] 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 0bce66b..fc89430 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/numeric_conversion From 58a3cfe2121e82137d85de82ceb372e8061dcc89 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:56 -0500 Subject: [PATCH 05/17] 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 fc89430..0a5ad62 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/numeric_conversion : common-requirements From aec2f4493b4a07bb81eea0c5ff647c4ab7465154 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 22:52:03 -0500 Subject: [PATCH 06/17] Update copyright dates. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index 0a5ad62..e28d0e2 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 fc4e58eba8608cceee7e82f39bf8323b416a5eac Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:22 -0500 Subject: [PATCH 07/17] 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 e28d0e2..2ddc349 100644 --- a/build.jam +++ b/build.jam @@ -5,22 +5,25 @@ require-b2 5.2 ; +constant boost_dependencies : + /boost/config//boost_config + /boost/conversion//boost_conversion + /boost/core//boost_core + /boost/mpl//boost_mpl + /boost/preprocessor//boost_preprocessor + /boost/throw_exception//boost_throw_exception + /boost/type_traits//boost_type_traits ; + project /boost/numeric_conversion : common-requirements - /boost/config//boost_config - /boost/conversion//boost_conversion - /boost/core//boost_core - /boost/mpl//boost_mpl - /boost/preprocessor//boost_preprocessor - /boost/throw_exception//boost_throw_exception - /boost/type_traits//boost_type_traits include ; explicit - [ alias boost_numeric_conversion ] + [ alias boost_numeric_conversion : : : : $(boost_dependencies) ] [ alias all : boost_numeric_conversion test ] ; call-if : boost-library numeric_conversion ; + From d578387b2c77879efe68049e5491589a94b2cdeb Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 4 Aug 2024 11:49:19 -0500 Subject: [PATCH 08/17] Update build deps. --- test/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index b6d00a9..1bef2ab 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -11,6 +11,7 @@ import testing ; project numeric_conversion_unit_tests : requirements + /boost/numeric_conversion//boost_numeric_conversion . gcc:"-ftemplate-depth-300 -g0" darwin:"-ftemplate-depth-300 -g0" From 08b691c30267070491f48508edd385819daa77ba Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 6 Apr 2025 23:07:59 -0500 Subject: [PATCH 09/17] Replace GHA CI with simpler working one based on alandefreitas/cpp-actions utilities. --- .github/workflows/ci.yml | 321 +++++++++++++-------------------------- 1 file changed, 106 insertions(+), 215 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b79821..f0bc157 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,230 +6,121 @@ on: branches: - master - develop + - githubactions* - feature/** - -env: - UBSAN_OPTIONS: print_stacktrace=1 - LIBRARY: numeric/conversion + - fix/** + - pr/** jobs: - posix: - strategy: - fail-fast: false - matrix: - include: - - toolset: gcc-4.8 - cxxstd: "03,11" - os: ubuntu-latest - container: ubuntu:18.04 - install: g++-4.8-multilib - address-model: 32,64 - - toolset: gcc-5 - cxxstd: "03,11,14,1z" - os: ubuntu-latest - container: ubuntu:18.04 - install: g++-5-multilib - address-model: 32,64 - - toolset: gcc-6 - cxxstd: "03,11,14,1z" - os: ubuntu-latest - container: ubuntu:18.04 - install: g++-6-multilib - address-model: 32,64 - - toolset: gcc-7 - cxxstd: "03,11,14,17" - os: ubuntu-latest - container: ubuntu:18.04 - install: g++-7-multilib - address-model: 32,64 - - toolset: gcc-8 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - install: g++-8-multilib - address-model: 32,64 - - toolset: gcc-9 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - install: g++-9-multilib - address-model: 32,64 - - toolset: gcc-10 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - install: g++-10-multilib - address-model: 32,64 - - toolset: gcc-11 - cxxstd: "03,11,14,17,20" - os: ubuntu-20.04 - install: g++-11-multilib - address-model: 32,64 - - toolset: gcc-12 - cxxstd: "03,11,14,17,20,2b" - os: ubuntu-22.04 - install: g++-12-multilib - address-model: 32,64 - - toolset: clang - compiler: clang++-3.9 - cxxstd: "03,11,14" - os: ubuntu-latest - container: ubuntu:18.04 - install: clang-3.9 - - toolset: clang - compiler: clang++-4.0 - cxxstd: "03,11,14" - os: ubuntu-latest - container: ubuntu:18.04 - install: clang-4.0 - - toolset: clang - compiler: clang++-5.0 - cxxstd: "03,11,14,1z" - os: ubuntu-latest - container: ubuntu:18.04 - install: clang-5.0 - - toolset: clang - compiler: clang++-6.0 - cxxstd: "03,11,14,17" - os: ubuntu-20.04 - install: clang-6.0 - - toolset: clang - compiler: clang++-7 - cxxstd: "03,11,14,17" - os: ubuntu-20.04 - install: clang-7 - - toolset: clang - compiler: clang++-8 - cxxstd: "03,11,14,17" - os: ubuntu-20.04 - install: clang-8 - - toolset: clang - compiler: clang++-9 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - install: clang-9 - - toolset: clang - compiler: clang++-10 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - - toolset: clang - compiler: clang++-11 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - - toolset: clang - compiler: clang++-12 - cxxstd: "03,11,14,17,20" - os: ubuntu-20.04 - - toolset: clang - compiler: clang++-13 - cxxstd: "03,11,14,17,20,2b" - os: ubuntu-22.04 - install: clang-13 - - toolset: clang - compiler: clang++-14 - cxxstd: "03,11,14,17,20,2b" - os: ubuntu-22.04 - install: clang-14 - - toolset: clang - cxxstd: "03,11,14,17,2a" - os: macos-11 - - 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 python git g++ - - - name: Install packages - if: matrix.install - run: sudo apt-get -y install ${{matrix.install}} - - - name: Setup Boost - run: | - 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 - python tools/boostdep/depinst/depinst.py --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 toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} ${ADDRMD:+address-model=$ADDRMD} variant=debug,release - - windows: + - name: Generate Test Matrix + uses: alandefreitas/cpp-actions/cpp-matrix@master + id: cpp-matrix + with: + extra-values: | + boost-lib: numeric/conversion + 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,latest" - addrmd: 32,64 - os: windows-2022 - - toolset: gcc - cxxstd: "03,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_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 --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 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 6025f17e09654834861a84ad964c62b5c3b27013 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 7 Apr 2025 20:54:02 -0500 Subject: [PATCH 10/17] 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 2ddc349..3f06eef 100644 --- a/build.jam +++ b/build.jam @@ -15,12 +15,11 @@ constant boost_dependencies : /boost/type_traits//boost_type_traits ; project /boost/numeric_conversion - : common-requirements - include ; explicit - [ alias boost_numeric_conversion : : : : $(boost_dependencies) ] + [ alias boost_numeric_conversion : : : + : include $(boost_dependencies) ] [ alias all : boost_numeric_conversion test ] ; From 0f4df2a0781cb3448cc888dbe14486ea62c66bcb Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 9 Apr 2025 23:04:59 -0500 Subject: [PATCH 11/17] 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 f0bc157..cf8ecb0 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 3842acb132c813a91e7f1c4382a513731119d29f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 8 Jun 2025 10:44:46 -0500 Subject: [PATCH 12/17] Redo GHA CI to undo move to cpp-actions. --- .github/workflows/ci.yml | 339 +++++++++++++++++++++++++++------------ 1 file changed, 236 insertions(+), 103 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf8ecb0..67b512d 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,255 @@ on: branches: - master - develop - - githubactions* - feature/** - - fix/** - - pr/** + +env: + UBSAN_OPTIONS: print_stacktrace=1 + LIBRARY: numeric/conversion 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: numeric/conversion - 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: "11" + os: ubuntu-latest + container: ubuntu:18.04 + install: g++-4.8-multilib + address-model: 32,64 + - toolset: gcc + compiler: g++-5 + cxxstd: "11,14,1z" + os: ubuntu-latest + container: ubuntu:18.04 + install: g++-5-multilib + address-model: 32,64 + - toolset: gcc + compiler: g++-6 + cxxstd: "11,14,1z" + os: ubuntu-latest + container: ubuntu:18.04 + install: g++-6-multilib + address-model: 32,64 + - toolset: gcc + compiler: g++-7 + cxxstd: "11,14,17" + os: ubuntu-latest + container: ubuntu:18.04 + install: g++-7-multilib + address-model: 32,64 + - toolset: gcc + compiler: g++-8 + cxxstd: "11,14,17,2a" + os: ubuntu-latest + container: ubuntu:18.04 + install: g++-8-multilib + address-model: 32,64 + - toolset: gcc + compiler: g++-9 + cxxstd: "11,14,17,2a" + os: ubuntu-latest + container: ubuntu:20.04 + install: g++-9-multilib + address-model: 32,64 + - toolset: gcc + compiler: g++-10 + cxxstd: "11,14,17,2a" + os: ubuntu-latest + container: ubuntu:20.04 + address-model: 32,64 + - toolset: gcc + compiler: g++-11 + cxxstd: "11,14,17,2a" + os: ubuntu-latest + container: ubuntu:24.04 + install: g++-11-multilib + address-model: 32,64 + - toolset: gcc + compiler: g++-12 + cxxstd: "11,14,17,20,2b" + os: ubuntu-latest + container: ubuntu:22.04 + install: g++-12-multilib + address-model: 32,64 + - toolset: clang + compiler: clang++-3.9 + cxxstd: "11,14" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-3.9 + - toolset: clang + compiler: clang++-4.0 + cxxstd: "11,14" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-4.0 + - toolset: clang + compiler: clang++-5.0 + cxxstd: "11,14,1z" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-5.0 + - toolset: clang + compiler: clang++-6.0 + cxxstd: "11,14,17" + os: ubuntu-latest + container: ubuntu:20.04 + install: clang-6.0 + - toolset: clang + compiler: clang++-7 + cxxstd: "11,14,17" + os: ubuntu-latest + container: ubuntu:20.04 + install: clang-7 + - toolset: clang + compiler: clang++-8 + cxxstd: "11,14,17" + os: ubuntu-latest + container: ubuntu:20.04 + install: clang-8 + - toolset: clang + compiler: clang++-9 + cxxstd: "11,14,17,2a" + os: ubuntu-latest + container: ubuntu:20.04 + install: clang-9 + - toolset: clang + compiler: clang++-10 + cxxstd: "11,14,17,2a" + os: ubuntu-latest + container: ubuntu:20.04 + - toolset: clang + compiler: clang++-11 + cxxstd: "11,14,17,2a" + os: ubuntu-latest + container: ubuntu:20.04 + - toolset: clang + compiler: clang++-12 + cxxstd: "11,14,17,20" + os: ubuntu-latest + container: ubuntu:20.04 + - toolset: clang + compiler: clang++-13 + cxxstd: "11,14,17,20,2b" + os: ubuntu-latest + container: ubuntu:22.04 + install: clang-13 + - toolset: clang + compiler: clang++-14 + cxxstd: "11,14,17,20,2b" + os: ubuntu-latest + container: ubuntu:22.04 + install: clang-14 + - toolset: clang + cxxstd: "11,14,17,20" + os: macos-latest - # 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_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 + python tools/boostdep/depinst/depinst.py --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 toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} ${ADDRMD:+address-model=$ADDRMD} 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,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_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 --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 toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker From 975a480d3d569d0e2ee0bfe3934cdcbc448f1fe4 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 8 Jun 2025 10:50:51 -0500 Subject: [PATCH 13/17] Need specific python3 for systems where regular python is not 3. --- .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 67b512d..ae20515 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -198,7 +198,7 @@ jobs: cd boost-root cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY + python3 tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY ./bootstrap.sh ./b2 -d0 headers @@ -249,7 +249,7 @@ jobs: cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY:/=\%\ git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + python3 tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% cmd /c bootstrap b2 -d0 headers From 4efb16b016a17fae77c0e707a300e785dbc84b90 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 8 Jun 2025 10:59:56 -0500 Subject: [PATCH 14/17] Can't assume a specific version of clang/gcc is installed. --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae20515..bd7aef3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,7 @@ jobs: cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 + install: g++-10-multilib address-model: 32,64 - toolset: gcc compiler: g++-11 @@ -127,16 +128,19 @@ jobs: cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 + install: clang-10 - toolset: clang compiler: clang++-11 cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 + install: clang-11 - toolset: clang compiler: clang++-12 cxxstd: "11,14,17,20" os: ubuntu-latest container: ubuntu:20.04 + install: clang-12 - toolset: clang compiler: clang++-13 cxxstd: "11,14,17,20,2b" From f874815bc3c0157d8261e8024551c6494d2d2fd9 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 25 Jun 2025 23:06:32 -0500 Subject: [PATCH 15/17] Undo explicit g++ compiler specification. --- .github/workflows/ci.yml | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd7aef3..6fde245 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,64 +18,55 @@ 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-multilib address-model: 32,64 - - toolset: gcc - compiler: g++-5 + - toolset: gcc-5 cxxstd: "11,14,1z" os: ubuntu-latest container: ubuntu:18.04 install: g++-5-multilib address-model: 32,64 - - toolset: gcc - compiler: g++-6 + - toolset: gcc-6 cxxstd: "11,14,1z" os: ubuntu-latest container: ubuntu:18.04 install: g++-6-multilib address-model: 32,64 - - toolset: gcc - compiler: g++-7 + - toolset: gcc-7 cxxstd: "11,14,17" os: ubuntu-latest container: ubuntu:18.04 install: g++-7-multilib address-model: 32,64 - - toolset: gcc - compiler: g++-8 + - toolset: gcc-8 cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:18.04 install: g++-8-multilib address-model: 32,64 - - toolset: gcc - compiler: g++-9 + - toolset: gcc-9 cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 install: g++-9-multilib address-model: 32,64 - - toolset: gcc - compiler: g++-10 + - toolset: gcc-10 cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 install: g++-10-multilib address-model: 32,64 - - toolset: gcc - compiler: g++-11 + - toolset: gcc-11 cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:24.04 install: g++-11-multilib address-model: 32,64 - - toolset: gcc - compiler: g++-12 + - toolset: gcc-12 cxxstd: "11,14,17,20,2b" os: ubuntu-latest container: ubuntu:22.04 From c81cba8eb05b673ba348382fb42a1be335fae40d Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 25 Jun 2025 23:11:29 -0500 Subject: [PATCH 16/17] Put back C++-03 testing. --- .github/workflows/ci.yml | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fde245..86c8b07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,127 +25,127 @@ jobs: install: g++-4.8-multilib address-model: 32,64 - toolset: gcc-5 - cxxstd: "11,14,1z" + cxxstd: "03,11,14,1z" os: ubuntu-latest container: ubuntu:18.04 install: g++-5-multilib address-model: 32,64 - toolset: gcc-6 - cxxstd: "11,14,1z" + cxxstd: "03,11,14,1z" os: ubuntu-latest container: ubuntu:18.04 install: g++-6-multilib address-model: 32,64 - toolset: gcc-7 - cxxstd: "11,14,17" + cxxstd: "03,11,14,17" os: ubuntu-latest container: ubuntu:18.04 install: g++-7-multilib address-model: 32,64 - toolset: gcc-8 - cxxstd: "11,14,17,2a" + cxxstd: "03,11,14,17,2a" os: ubuntu-latest container: ubuntu:18.04 install: g++-8-multilib address-model: 32,64 - toolset: gcc-9 - cxxstd: "11,14,17,2a" + cxxstd: "03,11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 install: g++-9-multilib address-model: 32,64 - toolset: gcc-10 - cxxstd: "11,14,17,2a" + cxxstd: "03,11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 install: g++-10-multilib address-model: 32,64 - toolset: gcc-11 - cxxstd: "11,14,17,2a" + cxxstd: "03,11,14,17,2a" os: ubuntu-latest container: ubuntu:24.04 install: g++-11-multilib address-model: 32,64 - toolset: gcc-12 - cxxstd: "11,14,17,20,2b" + cxxstd: "03,11,14,17,20,2b" os: ubuntu-latest container: ubuntu:22.04 install: g++-12-multilib address-model: 32,64 - toolset: clang compiler: clang++-3.9 - cxxstd: "11,14" + cxxstd: "03,11,14" os: ubuntu-latest container: ubuntu:18.04 install: clang-3.9 - toolset: clang compiler: clang++-4.0 - cxxstd: "11,14" + cxxstd: "03,11,14" os: ubuntu-latest container: ubuntu:18.04 install: clang-4.0 - toolset: clang compiler: clang++-5.0 - cxxstd: "11,14,1z" + cxxstd: "03,11,14,1z" os: ubuntu-latest container: ubuntu:18.04 install: clang-5.0 - toolset: clang compiler: clang++-6.0 - cxxstd: "11,14,17" + cxxstd: "03,11,14,17" os: ubuntu-latest container: ubuntu:20.04 install: clang-6.0 - toolset: clang compiler: clang++-7 - cxxstd: "11,14,17" + cxxstd: "03,11,14,17" os: ubuntu-latest container: ubuntu:20.04 install: clang-7 - toolset: clang compiler: clang++-8 - cxxstd: "11,14,17" + cxxstd: "03,11,14,17" os: ubuntu-latest container: ubuntu:20.04 install: clang-8 - toolset: clang compiler: clang++-9 - cxxstd: "11,14,17,2a" + cxxstd: "03,11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 install: clang-9 - toolset: clang compiler: clang++-10 - cxxstd: "11,14,17,2a" + cxxstd: "03,11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 install: clang-10 - toolset: clang compiler: clang++-11 - cxxstd: "11,14,17,2a" + cxxstd: "03,11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 install: clang-11 - toolset: clang compiler: clang++-12 - cxxstd: "11,14,17,20" + cxxstd: "03,11,14,17,20" os: ubuntu-latest container: ubuntu:20.04 install: clang-12 - toolset: clang compiler: clang++-13 - cxxstd: "11,14,17,20,2b" + cxxstd: "03,11,14,17,20,2b" os: ubuntu-latest container: ubuntu:22.04 install: clang-13 - toolset: clang compiler: clang++-14 - cxxstd: "11,14,17,20,2b" + cxxstd: "03,11,14,17,20,2b" os: ubuntu-latest container: ubuntu:22.04 install: clang-14 - toolset: clang - cxxstd: "11,14,17,20" + cxxstd: "03,11,14,17,20" os: macos-latest runs-on: ${{matrix.os}} @@ -221,7 +221,7 @@ jobs: addrmd: 32,64 os: windows-2022 - toolset: gcc - cxxstd: "11,14,17,2a" + cxxstd: "03,11,14,17,2a" addrmd: 64 os: windows-2022 From b69b43b873666d64aa15848afb2b2667aca6c240 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 25 Jun 2025 23:12:13 -0500 Subject: [PATCH 17/17] Put back C++-03 testing. --- .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 86c8b07..aff635e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: matrix: include: - toolset: gcc-4.8 - cxxstd: "11" + cxxstd: "03,11" os: ubuntu-latest container: ubuntu:18.04 install: g++-4.8-multilib