From 9519349ab9b32c3074c8298779707eabe765a4c1 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. --- Jamfile.v2 | 9 --------- build.jam | 20 ++++++++++++++++++++ example/Jamfile.v2 | 4 ++++ test/Jamfile.v2 | 4 ++++ 4 files changed, 28 insertions(+), 9 deletions(-) delete mode 100644 Jamfile.v2 create mode 100644 build.jam diff --git a/Jamfile.v2 b/Jamfile.v2 deleted file mode 100644 index 7c0a96b..0000000 --- a/Jamfile.v2 +++ /dev/null @@ -1,9 +0,0 @@ -# copyright John Maddock 2003 -# Use, modification and distribution are 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) - -# bring in the rules for testing -import testing ; - -build-project test ; \ No newline at end of file diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..0174401 --- /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/static_assert + : common-requirements + /boost/config//boost_config + include + ; + +explicit + [ alias boost_static_assert ] + [ alias all : boost_static_assert example test ] + ; + +call-if : boost-library static_assert + ; diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 97c490b..16444ae 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -6,6 +6,10 @@ # bring in the rules for testing import testing ; +project : requirements + /boost/type_traits//boost_type_traits + ; + #run static_assert_example_1.cpp ; run static_assert_example_2.cpp ; run static_assert_example_3.cpp ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index e4dbe77..4a2169a 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -6,6 +6,10 @@ # bring in the rules for testing import testing ; +project : requirements + /boost/type_traits//boost_type_traits + ; + run static_assert_test.cpp ; compile-fail static_assert_test_fail_1.cpp ; compile-fail static_assert_test_fail_2.cpp ; From 8df439fa03016ee0165de406409594389b5a9281 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index 0174401..6a29534 100644 --- a/build.jam +++ b/build.jam @@ -7,7 +7,7 @@ import project ; project /boost/static_assert : common-requirements - /boost/config//boost_config + /boost/config//boost_config include ; From 13690ce9b554993d4b83f261688a0f825c49c6fb Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -0500 Subject: [PATCH 03/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 6a29534..075f0e7 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/static_assert From 18ab3e92508464a9a84fed71426398610809624e Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:56 -0500 Subject: [PATCH 04/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 075f0e7..d8ce2f2 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/static_assert : common-requirements From c65f0cd147da8232ab0ad6a7b9eff83f0dc56ba1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 21:26:14 -0500 Subject: [PATCH 05/17] Change all references to . --- example/Jamfile.v2 | 6 +++--- test/Jamfile.v2 | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 16444ae..f9b2cf3 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -1,13 +1,13 @@ # copyright John Maddock 2003 -# Use, modification and distribution are subject to the -# Boost Software License, Version 1.0. (See accompanying file +# Use, modification and distribution are 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) # bring in the rules for testing import testing ; project : requirements - /boost/type_traits//boost_type_traits + /boost/type_traits//boost_type_traits ; #run static_assert_example_1.cpp ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 4a2169a..b8a506b 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -1,13 +1,13 @@ # copyright John Maddock 2003 -# Use, modification and distribution are subject to the -# Boost Software License, Version 1.0. (See accompanying file +# Use, modification and distribution are 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) # bring in the rules for testing import testing ; project : requirements - /boost/type_traits//boost_type_traits + /boost/type_traits//boost_type_traits ; run static_assert_test.cpp ; From 54412f79371713a5fcddb4b31255e65588f62018 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 22:52:04 -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 d8ce2f2..e769cad 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 aa4e60bd88368f1794c0de276da3d0a24ffd222f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:23 -0500 Subject: [PATCH 07/17] 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 e769cad..8379680 100644 --- a/build.jam +++ b/build.jam @@ -5,16 +5,19 @@ require-b2 5.2 ; +constant boost_dependencies : + /boost/config//boost_config ; + project /boost/static_assert : common-requirements - /boost/config//boost_config include ; explicit - [ alias boost_static_assert ] + [ alias boost_static_assert : : : : $(boost_dependencies) ] [ alias all : boost_static_assert example test ] ; call-if : boost-library static_assert ; + From 140907f843cce7c7120553a53422cecc636b441c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 7 Apr 2025 08:58:35 -0500 Subject: [PATCH 08/17] Replace GHA CI with simpler working one based on alandefreitas/cpp-actions utilities. --- .github/workflows/ci.yml | 720 +++++++-------------------------------- 1 file changed, 121 insertions(+), 599 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf763d6..6d1d804 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,616 +12,138 @@ on: - 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: multi_array + 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: - - name: "TOOLSET=gcc COMPILER=g++ CXXSTD=03,11 Job 0" - buildtype: "boost" - packages: "" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++" - cxxstd: "03,11" - - name: "TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98 Job 1" - buildtype: "boost" - packages: "g++-4.4" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-4.4" - cxxstd: "98" - - name: "TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x Job 2" - buildtype: "boost" - packages: "g++-4.6" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-4.6" - cxxstd: "03,0x" - - name: "TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 Job 3" - buildtype: "boost" - packages: "g++-4.7" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-4.7" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-4.7" - cxxstd: "03,11" - - name: "TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11 Job 4" - buildtype: "boost" - packages: "g++-4.8" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-4.8" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-4.8" - cxxstd: "03,11" - - name: "TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 Job 5" - buildtype: "boost" - packages: "g++-4.9" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-4.9" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-4.9" - cxxstd: "03,11" - - name: "TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z Job 6" - buildtype: "boost" - packages: "g++-5" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-5" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-5" - cxxstd: "03,11,14,1z" - - name: "TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z Job 7" - buildtype: "boost" - packages: "g++-6" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-6" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-6" - cxxstd: "03,11,14,1z" - - name: "TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 Job 8" - buildtype: "boost" - packages: "g++-7" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-7" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-7" - cxxstd: "03,11,14,17" - - name: "TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17 Job 9" - buildtype: "boost" - packages: "g++-8" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-8" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-8" - cxxstd: "03,11,14,17,2a" - - name: "TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17 Job 10" - buildtype: "boost" - packages: "g++-9" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-9" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-9" - cxxstd: "03,11,14,17,2a" - - name: "TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 Job 11" - buildtype: "boost" - packages: "" - packages_to_remove: "" - os: "ubuntu-18.04" - cxx: "clang++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "clang++" - cxxstd: "03,11" - - name: "TOOLSET=clang COMPILER=/usr/bin/clang++ CXXST Job 12" - buildtype: "boost" - packages: "clang-3.3" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "/usr/bin/clang++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "/usr/bin/clang++" - cxxstd: "03,11" - - name: "TOOLSET=clang COMPILER=/usr/bin/clang++ CXXST Job 13" - buildtype: "boost" - packages: "clang-3.4" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "/usr/bin/clang++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "/usr/bin/clang++" - cxxstd: "03,11" - - name: "TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03, Job 14" - buildtype: "boost" - packages: "clang-3.5" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-3.5" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "clang++-3.5" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03, Job 15" - buildtype: "boost" - packages: "clang-3.6" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-3.6" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "clang++-3.6" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03, Job 16" - buildtype: "boost" - packages: "clang-3.7" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-3.7" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "clang++-3.7" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03, Job 17" - buildtype: "boost" - packages: "clang-3.8" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-3.8" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "clang++-3.8" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03, Job 18" - buildtype: "boost" - packages: "clang-3.9" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-3.9" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "clang++-3.9" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03, Job 19" - buildtype: "boost" - packages: "clang-4.0" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-4.0" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "clang++-4.0" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03, Job 20" - buildtype: "boost" - packages: "clang-5.0" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-5.0" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "clang++-5.0" - cxxstd: "03,11,14,1z" - - name: "TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03, Job 21" - buildtype: "boost" - packages: "clang-6.0" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-6.0" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "clang++-6.0" - cxxstd: "03,11,14,17,2a" - - name: "TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11 Job 22" - buildtype: "boost" - packages: "clang-7" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-7" - sources: "" - llvm_os: "xenial" - llvm_ver: "7" - toolset: "clang" - compiler: "clang++-7" - cxxstd: "03,11,14,17,2a" - - name: "TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11 Job 23" - buildtype: "boost" - packages: "clang-8" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-8" - sources: "" - llvm_os: "xenial" - llvm_ver: "8" - toolset: "clang" - compiler: "clang++-8" - cxxstd: "03,11,14,17,2a" - - name: "TOOLSET=clang COMPILER=clang++-9 CXXSTD=03,11 Job 24" - buildtype: "boost" - packages: "clang-9" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-9" - sources: "" - llvm_os: "xenial" - llvm_ver: "9" - toolset: "clang" - compiler: "clang++-9" - cxxstd: "03,11,14,17,2a" - - name: "TOOLSET=clang COMPILER=clang++-libc++ CXXSTD= Job 25" - buildtype: "boost" - packages: " libc++-9-dev libc++abi-9-dev" - packages_to_remove: "libc++-dev libc++abi-dev" - os: "ubuntu-18.04" - cxx: "clang++-libc++" - sources: "" - llvm_os: "xenial" - llvm_ver: "9" - toolset: "clang" - compiler: "clang++-libc++" - cxxstd: "03,11,14,1z" - - name: "CMAKE=1 Job 26" - buildtype: "6e7f14933e-d40de7c77a" - packages: "" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++" - sources: "" - llvm_os: "" - llvm_ver: "" - cmake: "1" - - name: "CMAKE_SUBDIR=1 Job 27" - buildtype: "fe011f0001-fda7c76df5" - packages: "" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++" - sources: "" - llvm_os: "" - llvm_ver: "" - cmake_subdir: "1" - - name: "CMAKE_INSTALL=1 Job 28" - buildtype: "6e7f14933e-120499f489" - packages: "" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++" - sources: "" - llvm_os: "" - llvm_ver: "" - cmake_install: "1" + 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: - - name: Check if running in container - if: matrix.container != '' - run: echo "GHA_CONTAINER=${{ matrix.container }}" >> $GITHUB_ENV - - name: If running in container, upgrade packages - if: matrix.container != '' + # 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: | - apt-get -o Acquire::Retries=3 update && DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata && apt-get -o Acquire::Retries=3 install -y sudo software-properties-common wget curl apt-transport-https make apt-file sudo unzip libssl-dev build-essential autotools-dev autoconf automake g++ libc++-helpers python ruby cpio gcc-multilib g++-multilib pkgconf python3 ccache libpython-dev - sudo apt-add-repository ppa:git-core/ppa - sudo apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 -y install git - python_version=$(python3 -c 'import sys; print("{0.major}.{0.minor}".format(sys.version_info))') - sudo wget https://bootstrap.pypa.io/pip/$python_version/get-pip.py - sudo python3 get-pip.py - sudo /usr/local/bin/pip install cmake + 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 - - uses: actions/checkout@v2 + - name: Setup C++ Compiler + uses: alandefreitas/cpp-actions/setup-cpp@master + id: setup-cpp + with: + compiler: ${{ matrix.compiler }} + version: ${{ matrix.version }} - - name: linux + - 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 - env: - CXX: ${{ matrix.cxx }} - SOURCES: ${{ matrix.sources }} - LLVM_OS: ${{ matrix.llvm_os }} - LLVM_VER: ${{ matrix.llvm_ver }} - PACKAGES: ${{ matrix.packages }} - PACKAGES_TO_REMOVE: ${{ matrix.packages_to_remove }} - JOB_BUILDTYPE: ${{ matrix.buildtype }} - TOOLSET: ${{ matrix.toolset }} - COMPILER: ${{ matrix.compiler }} - CXXSTD: ${{ matrix.cxxstd }} - CMAKE: ${{ matrix.cmake }} - CMAKE_SUBDIR: ${{ matrix.cmake_subdir }} - CMAKE_INSTALL: ${{ matrix.cmake_install }} - TRAVIS_BRANCH: ${{ github.base_ref }} - TRAVIS_OS_NAME: "linux" run: | - echo '==================================> SETUP' - echo '==================================> PACKAGES' - set -e - if [ -n "$PACKAGES_TO_REMOVE" ]; then sudo apt-get purge -y $PACKAGES_TO_REMOVE; fi - echo ">>>>> APT: REPO.." - for i in {1..3}; do sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" && break || sleep 2; done - - if test -n "${LLVM_OS}" ; then - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - if test -n "${LLVM_VER}" ; then - sudo -E apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS}-${LLVM_VER} main" - else - # Snapshot (i.e. trunk) build of clang - sudo -E apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS} main" - fi - fi - echo ">>>>> APT: UPDATE.." - sudo -E apt-get -o Acquire::Retries=3 update - if test -n "${SOURCES}" ; then - echo ">>>>> APT: INSTALL SOURCES.." - for SOURCE in $SOURCES; do - sudo -E apt-add-repository ppa:$SOURCE - done - fi - echo ">>>>> APT: INSTALL ${PACKAGES}.." - sudo -E DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 -y --no-install-suggests --no-install-recommends install ${PACKAGES} + 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 }}" - echo '==================================> INSTALL AND COMPILE' - set -e - export TRAVIS_BUILD_DIR=$(pwd) - export TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')} - export VCS_COMMIT_ID=$GITHUB_SHA - export GIT_COMMIT=$GITHUB_SHA - export REPO_NAME=$(basename $GITHUB_REPOSITORY) - export USER=$(whoami) - export CC=${CC:-gcc} - export PATH=~/.local/bin:/usr/local/bin:$PATH + - 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 - if [ "$JOB_BUILDTYPE" == "boost" ]; then - - echo '==================================> INSTALL' - - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - git submodule update --init tools/boostdep - cp -r $TRAVIS_BUILD_DIR/* libs/static_assert - python tools/boostdep/depinst/depinst.py static_assert - ./bootstrap.sh - ./b2 headers - - echo '==================================> SCRIPT' - - echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam - ./b2 -j 3 libs/static_assert/test toolset=$TOOLSET cxxstd=$CXXSTD - - elif [ "$JOB_BUILDTYPE" == "6e7f14933e-d40de7c77a" ]; then - - echo '==================================> INSTALL' - - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - git submodule update --init tools/boostdep - cp -r $TRAVIS_BUILD_DIR/* libs/static_assert - python tools/boostdep/depinst/depinst.py static_assert - ./bootstrap.sh - ./b2 headers - - echo '==================================> SCRIPT' - - mkdir __build__ && cd __build__ - cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=static_assert .. - ctest --output-on-failure -R boost_static_assert - - elif [ "$JOB_BUILDTYPE" == "fe011f0001-fda7c76df5" ]; then - - echo '==================================> INSTALL' - - ln -s $TRAVIS_BUILD_DIR ../static_assert; - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true - git clone -b $BOOST_BRANCH https://github.com/boostorg/config.git ../config - - echo '==================================> SCRIPT' - - cd test/cmake_subdir_test && mkdir __build__ && cd __build__ - cmake .. - cmake --build . - cmake --build . --target check - - elif [ "$JOB_BUILDTYPE" == "6e7f14933e-120499f489" ]; then - - echo '==================================> INSTALL' - - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - git submodule update --init tools/boostdep - cp -r $TRAVIS_BUILD_DIR/* libs/static_assert - python tools/boostdep/depinst/depinst.py static_assert - ./bootstrap.sh - ./b2 headers - - echo '==================================> SCRIPT' - - mkdir __build__ && cd __build__ - cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES="static_assert;config" -DCMAKE_INSTALL_PREFIX=~/.local .. - cmake --build . --target install - cd ../libs/static_assert/test/cmake_install_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - cmake --build . - cmake --build . --target check - - fi - osx: - strategy: - fail-fast: false - matrix: - include: - - name: "TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,1 Job 29" - buildtype: "boost" - packages: "" - os: "macos-10.15" - cxx: "clang++" - sources: "" - llvm_os: "" - llvm_ver: "" - xcode_version: 11.7 - toolset: "clang" - compiler: "clang++" - cxxstd: "03,11,14,1z" - - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v2 - - - name: Set DEVELOPER_DIR - if: matrix.xcode_version != '' - run: echo "DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer" >> $GITHUB_ENV - - name: Test DEVELOPER_DIR - run: echo $DEVELOPER_DIR - - - name: "osx" - shell: bash - env: - CXX: ${{ matrix.cxx }} - SOURCES: ${{ matrix.sources }} - LLVM_OS: ${{ matrix.llvm_os }} - LLVM_VER: ${{ matrix.llvm_ver }} - PACKAGES: ${{ matrix.packages }} - JOB_BUILDTYPE: ${{ matrix.buildtype }} - TOOLSET: ${{ matrix.toolset }} - COMPILER: ${{ matrix.compiler }} - CXXSTD: ${{ matrix.cxxstd }} - CMAKE: ${{ matrix.cmake }} - CMAKE_SUBDIR: ${{ matrix.cmake_subdir }} - CMAKE_INSTALL: ${{ matrix.cmake_install }} - TRAVIS_BRANCH: ${{ github.base_ref }} - TRAVIS_OS_NAME: "osx" - run: | - echo '==================================> SETUP' - set -e - sudo mv /Library/Developer/CommandLineTools /Library/Developer/CommandLineTools.bck - echo '==================================> PACKAGES' - echo '==================================> INSTALL AND COMPILE' - set -e - export TRAVIS_BUILD_DIR=$(pwd) - export TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')} - export VCS_COMMIT_ID=$GITHUB_SHA - export GIT_COMMIT=$GITHUB_SHA - export REPO_NAME=$(basename $GITHUB_REPOSITORY) - export USER=$(whoami) - export CC=${CC:-gcc} - export PATH=~/.local/bin:/usr/local/bin:$PATH - - if [ "$JOB_BUILDTYPE" == "boost" ]; then - - echo '==================================> INSTALL' - - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - git submodule update --init tools/boostdep - cp -r $TRAVIS_BUILD_DIR/* libs/static_assert - python tools/boostdep/depinst/depinst.py static_assert - ./bootstrap.sh - ./b2 headers - - echo '==================================> SCRIPT' - - echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam - ./b2 -j 3 libs/static_assert/test toolset=$TOOLSET cxxstd=$CXXSTD - - fi + - name: CMake Workflow + uses: alandefreitas/cpp-actions/cmake-workflow@master + with: + run-tests: true + install: true + cmake-version: ">=3.20" + generator: ${{ matrix.generator }} + generator-toolset: ${{ matrix.generator-toolset }} + toolchain: ${{ steps.package-install.outputs.vcpkg-toolchain }} + build-type: ${{ matrix.build-type }} + install-prefix: .local + cxxstd: ${{ matrix.cxxstd }} + cc: ${{ steps.setup-cpp.outputs.cc }} + ccflags: ${{ matrix.ccflags }} + cxx: ${{ steps.setup-cpp.outputs.cxx }} + cxxflags: ${{ matrix.cxxflags }} + shared: ${{ matrix.shared }} + extra-args: + "${{ ( !matrix.no-deps && format('-D BOOST_SRC_DIR=\"{0}\"', steps.boost-clone.outputs.boost-dir)\ + \ ) || '' }} \n${{ ( matrix.no-deps && '-D CPP_ACTIONS_NO_DEPS=ON' ) || '' }}\n" + export-compile-commands: ${{ matrix.time-trace }} + trace-commands: true From bccba72bffd928ebb67687b8c197125333e7dc72 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 7 Apr 2025 09:07:01 -0500 Subject: [PATCH 09/17] Fix library name in GHA CI. --- .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 6d1d804..a14cbda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: id: cpp-matrix with: extra-values: | - boost-lib: multi_array + boost-lib: static_assert scan-dirs: test compilers: | gcc >= 4.8 From e74f1d4f6ea405ab8128905b1120d77e07045a05 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 9 Apr 2025 18:24:10 -0500 Subject: [PATCH 10/17] Workaround not having cmake tests. --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a14cbda..828ad78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,6 @@ jobs: gcc Shared msvc Shared x86 mingw Shared - subrange-policy: one-per-minor trace-commands: true build: needs: cpp-matrix @@ -128,7 +127,7 @@ jobs: - name: CMake Workflow uses: alandefreitas/cpp-actions/cmake-workflow@master with: - run-tests: true + build-targets: check install: true cmake-version: ">=3.20" generator: ${{ matrix.generator }} From 223997c70c2c1b5908d533a53d320b28c368e14a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 9 Apr 2025 18:32:25 -0500 Subject: [PATCH 11/17] Fix cmake build target, test minor msvc version, and specify the correct min cmake. --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 828ad78..fc3820f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,8 @@ jobs: apple-clang * mingw * clang-cl * + subrange-policy: | + msvc: one-per-minor standards: ">=11" latest-factors: | gcc Asan TSan UBSan @@ -127,9 +129,9 @@ jobs: - name: CMake Workflow uses: alandefreitas/cpp-actions/cmake-workflow@master with: - build-targets: check + build-target: check install: true - cmake-version: ">=3.20" + cmake-version: ">=3.5" generator: ${{ matrix.generator }} generator-toolset: ${{ matrix.generator-toolset }} toolchain: ${{ steps.package-install.outputs.vcpkg-toolchain }} From 91ddf94f3c8dd98d3443e105274add0c641a9462 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 9 Apr 2025 18:43:27 -0500 Subject: [PATCH 12/17] CMake 3.5 fails to run. --- .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 fc3820f..c256cec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,7 +131,7 @@ jobs: with: build-target: check install: true - cmake-version: ">=3.5" + cmake-version: ">=3.31" generator: ${{ matrix.generator }} generator-toolset: ${{ matrix.generator-toolset }} toolchain: ${{ steps.package-install.outputs.vcpkg-toolchain }} From 28277d9854000ced5152e75a69a3619c7b879b70 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 9 Apr 2025 18:54:18 -0500 Subject: [PATCH 13/17] Need to condition cmake tests on having 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 c256cec..70bf30d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,7 @@ jobs: extra-values: | boost-lib: static_assert scan-dirs: test + have-cmake-tests: false compilers: | gcc >= 4.8 clang >= 3.5 @@ -129,7 +130,7 @@ jobs: - name: CMake Workflow uses: alandefreitas/cpp-actions/cmake-workflow@master with: - build-target: check + run-tests: ${{ matrix.have-cmake-tests }} install: true cmake-version: ">=3.31" generator: ${{ matrix.generator }} From acbd1636245aa07410d58ea208273b4500381168 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 9 Apr 2025 20:31:48 -0500 Subject: [PATCH 14/17] Tell ctest to ignore not having tests. --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70bf30d..fa55c94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,6 @@ jobs: extra-values: | boost-lib: static_assert scan-dirs: test - have-cmake-tests: false compilers: | gcc >= 4.8 clang >= 3.5 @@ -129,8 +128,10 @@ jobs: - name: CMake Workflow uses: alandefreitas/cpp-actions/cmake-workflow@master + env: + CTEST_NO_TESTS_ACTION: ignore with: - run-tests: ${{ matrix.have-cmake-tests }} + run-tests: true install: true cmake-version: ">=3.31" generator: ${{ matrix.generator }} From 4df5eb93a3d82a80c168d2e90c00f728d6dae589 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 9 Apr 2025 21:02:58 -0500 Subject: [PATCH 15/17] Set the correct cmake dir to work in. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa55c94..58ca7a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,6 +131,7 @@ jobs: env: CTEST_NO_TESTS_ACTION: ignore with: + source-dir: ${{ steps.boost-clone.outputs.boost-dir }}/libs/${{ matrix.boost-lib }} run-tests: true install: true cmake-version: ">=3.31" From b78ae8e44c7fd61277c0a0c9908e74eff0c1abe2 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 9 Apr 2025 21:23:50 -0500 Subject: [PATCH 16/17] Set testing to special value to get ignored tests. --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58ca7a2..efed6b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,11 +128,9 @@ jobs: - name: CMake Workflow uses: alandefreitas/cpp-actions/cmake-workflow@master - env: - CTEST_NO_TESTS_ACTION: ignore with: source-dir: ${{ steps.boost-clone.outputs.boost-dir }}/libs/${{ matrix.boost-lib }} - run-tests: true + run-tests: ignore install: true cmake-version: ">=3.31" generator: ${{ matrix.generator }} From 82e82194974d0b4234f7063798b2319aa1eaec4e Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 9 Apr 2025 21:48:37 -0500 Subject: [PATCH 17/17] Set a less likely to comflict cmake build dir. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efed6b2..97a32bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,6 +130,7 @@ jobs: uses: alandefreitas/cpp-actions/cmake-workflow@master with: source-dir: ${{ steps.boost-clone.outputs.boost-dir }}/libs/${{ matrix.boost-lib }} + build-dir: _build_dir_ run-tests: ignore install: true cmake-version: ">=3.31"