From b3e32ace288bc51dfbcd9bc8359b1b1607925d07 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:16 -0500 Subject: [PATCH 01/10] Make the library modular usable. --- build.jam | 20 ++++++++++++++++++++ test/Jamfile | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..d4338d7 --- /dev/null +++ b/build.jam @@ -0,0 +1,20 @@ +# 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/io + : common-requirements + /boost/config//boost_config + include + ; + +explicit + [ alias boost_io ] + [ alias all : boost_io test ] + ; + +call-if : boost-library io + ; diff --git a/test/Jamfile b/test/Jamfile index ffc9160..d35ab9d 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -8,7 +8,10 @@ import testing ; -project : requirements pedantic on ; +project : requirements pedantic on + /boost/core//boost_core + /boost/type_traits//boost_type_traits + ; run ios_state_unit_test.cpp ; run ios_state_test.cpp ; From bdc52d6eb4888c90db2d6ad1181c2a73feea0dcd Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:15:59 -0500 Subject: [PATCH 02/10] Switch to library requirements instead of source. As source puts extra source in install targets. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index d4338d7..4872454 100644 --- a/build.jam +++ b/build.jam @@ -7,7 +7,7 @@ import project ; project /boost/io : common-requirements - /boost/config//boost_config + /boost/config//boost_config include ; From 4be3c9d1eac89c15c1a7437ad06a5fc72d60b3a7 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -0500 Subject: [PATCH 03/10] 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 4872454..cb9c316 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/io From ff3a272e0fdd4844b8a1894e439bdf6db91a1ed0 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:55 -0500 Subject: [PATCH 04/10] 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 cb9c316..58d4d33 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/io : common-requirements From 72cf9e10eea6c7eb31ecdcf05bfa511c0a85b6fc Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 19:39:59 -0500 Subject: [PATCH 05/10] Change all references to . --- test/Jamfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index d35ab9d..4f1e816 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -9,8 +9,8 @@ import testing ; project : requirements pedantic on - /boost/core//boost_core - /boost/type_traits//boost_type_traits + /boost/core//boost_core + /boost/type_traits//boost_type_traits ; run ios_state_unit_test.cpp ; From 2fb2c3c41dc566f009e4c5daa748f56509f8650e Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 22:52:03 -0500 Subject: [PATCH 06/10] Update copyright dates. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index 58d4d33..d96b1fc 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 66696f116abf3bb5983b31cb15ad7b9187cb49c4 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:22 -0500 Subject: [PATCH 07/10] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.jam b/build.jam index d96b1fc..2d79604 100644 --- a/build.jam +++ b/build.jam @@ -5,16 +5,19 @@ require-b2 5.2 ; +constant boost_dependencies : + /boost/config//boost_config ; + project /boost/io : common-requirements - /boost/config//boost_config include ; explicit - [ alias boost_io ] + [ alias boost_io : : : : $(boost_dependencies) ] [ alias all : boost_io test ] ; call-if : boost-library io ; + From 961ee4f5c04f13f86a9147c8e2278ae3dfde7e24 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 6 Apr 2025 10:43:37 -0500 Subject: [PATCH 08/10] Replace GHA CI with simpler working one based on alandefreitas/cpp-actions utilities. --- .github/workflows/ci.yml | 266 +++++++++++++++------------------------ 1 file changed, 103 insertions(+), 163 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea8c6c2..fa570a5 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,181 +6,121 @@ on: branches: - master - develop + - githubactions* + - feature/** + - fix/** + - pr/** jobs: - posix: + 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: io + scan-dirs: test + compilers: | + gcc >= 4.8 + clang >= 3.5 + msvc >= 14.1 + 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: gcc-4.8 - standard: "03,11" - os: ubuntu-18.04 - install: g++-4.8 - - toolset: gcc-5 - standard: "03,11,14,1z" - os: ubuntu-18.04 - install: g++-5 - - toolset: gcc-6 - standard: "03,11,14,1z" - os: ubuntu-18.04 - install: g++-6 - - toolset: gcc-7 - standard: "03,11,14,17" - os: ubuntu-18.04 - - toolset: gcc-8 - standard: "03,11,14,17,2a" - os: ubuntu-18.04 - install: g++-8 - - toolset: gcc-9 - standard: "03,11,14,17,2a" - os: ubuntu-18.04 - - toolset: gcc-10 - standard: "03,11,14,17,2a" - os: ubuntu-20.04 - install: g++-10 - - toolset: gcc-11 - standard: "03,11,14,17,2a" - os: ubuntu-20.04 - install: g++-11 - - toolset: clang - compiler: clang++-3.9 - standard: "03,11,14" - os: ubuntu-18.04 - install: clang-3.9 - - toolset: clang - compiler: clang++-4.0 - standard: "03,11,14" - os: ubuntu-18.04 - install: clang-4.0 - - toolset: clang - compiler: clang++-5.0 - standard: "03,11,14,1z" - os: ubuntu-18.04 - install: clang-5.0 - - toolset: clang - compiler: clang++-6.0 - standard: "03,11,14,17" - os: ubuntu-18.04 - install: clang-6.0 - - toolset: clang - compiler: clang++-7 - standard: "03,11,14,17" - os: ubuntu-18.04 - install: clang-7 - - toolset: clang - compiler: clang++-8 - standard: "03,11,14,17" - os: ubuntu-20.04 - install: clang-8 - - toolset: clang - compiler: clang++-9 - standard: "03,11,14,17,2a" - os: ubuntu-20.04 - install: clang-9 - - toolset: clang - compiler: clang++-10 - standard: "03,11,14,17,2a" - os: ubuntu-20.04 - install: clang-10 - - toolset: clang - compiler: clang++-11 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - install: clang-11 - - toolset: clang - compiler: clang++-12 - cxxstd: "03,11,14,17,2a" - os: ubuntu-20.04 - install: clang-12 - - toolset: clang - standard: "03,11,14,17,2a" - os: macos-10.15 + 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@v2 - - - name: Install packages - if: matrix.install - run: sudo apt install ${{matrix.install}} - - - name: Setup Boost + # 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: | - cd .. - git clone --depth 1 https://github.com/boostorg/boost - cd boost - cp -r $GITHUB_WORKSPACE/* libs/io - git submodule init libs/assert - git submodule init libs/config - git submodule init libs/core - git submodule init libs/headers - git submodule init libs/type_traits - git submodule init tools/build - git submodule init tools/boost_install - git submodule update - ./bootstrap.sh - ./b2 -d0 headers + 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: Create user-config.jam - if: matrix.compiler - run: | - echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam + - name: Setup C++ Compiler + uses: alandefreitas/cpp-actions/setup-cpp@master + id: setup-cpp + with: + compiler: ${{ matrix.compiler }} + version: ${{ matrix.version }} - - name: Run tests - run: | - cd ../boost - ./b2 -j3 libs/io/test toolset=${{matrix.toolset}} cxxstd=${{matrix.standard}} variant=debug,release + - name: Install Packages + if: matrix.install != '' + uses: alandefreitas/cpp-actions/package-install@master + id: package-install + with: + apt-get: ${{ matrix.install }} - windows: - strategy: - fail-fast: false - matrix: - include: - - toolset: msvc-14.1 - standard: "14,17,latest" - target: 32,64 - os: windows-2016 - - toolset: msvc-14.2 - standard: "14,17,latest" - target: 32,64 - os: windows-2019 - - toolset: msvc-14.3 - cxxstd: "14,17,latest" - addrmd: 32,64 - os: windows-2022 - - toolset: gcc - standard: "03,11,14,17,2a" - target: 64 - os: windows-2019 + - name: Clone Library + uses: actions/checkout@v4 - runs-on: ${{matrix.os}} + - 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 - steps: - - uses: actions/checkout@v2 - - - name: Setup Boost - shell: cmd + - name: Copy Library + shell: bash run: | - cd .. - git clone --depth 1 https://github.com/boostorg/boost boost - cd boost - xcopy /s /e /q %GITHUB_WORKSPACE% libs\io\ - git submodule init libs/assert - git submodule init libs/config - git submodule init libs/core - git submodule init libs/static_assert - git submodule init libs/type_traits - git submodule init libs/headers - git submodule init tools/build - git submodule init tools/boost_install - git submodule update - cmd /c bootstrap - b2 -d0 headers + 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: Run tests - shell: cmd - run: | - cd ../boost - b2 -j3 libs/io/test toolset=${{matrix.toolset}} cxxstd=${{matrix.standard}} address-model=${{matrix.target}} variant=debug,release + - 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 f195926074f44b6eca7b0b1a09a2cc5344caf9e1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 7 Apr 2025 17:35:19 -0500 Subject: [PATCH 09/10] Move project global include to target local include. --- build.jam | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build.jam b/build.jam index 2d79604..8153e9b 100644 --- a/build.jam +++ b/build.jam @@ -9,15 +9,13 @@ constant boost_dependencies : /boost/config//boost_config ; project /boost/io - : common-requirements - include ; explicit - [ alias boost_io : : : : $(boost_dependencies) ] + [ alias boost_io : : : + : include $(boost_dependencies) ] [ alias all : boost_io test ] ; call-if : boost-library io ; - From 67606793d7bba70b457e3c8e0a400ff70716af0e Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 9 Apr 2025 23:04:24 -0500 Subject: [PATCH 10/10] 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 fa570a5..43f0550 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