This commit is contained in:
Alexander Grund 2026-07-04 10:44:17 +00:00 committed by GitHub
commit 6a93e43db8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 90 additions and 32 deletions

View file

@ -26,9 +26,9 @@ jobs:
Formatting: Formatting:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Formatting - name: Formatting
uses: DoozyX/clang-format-lint-action@v0.13 uses: DoozyX/clang-format-lint-action@bcb4eb2cb0d707ee4f3e5cc3b456eb075f12cf73 # v0.20
with: with:
clangFormatVersion: 10 clangFormatVersion: 10
@ -45,25 +45,36 @@ jobs:
- { compiler: gcc-7, cxxstd: '14,17', boostBranch: boost-1.86.0, os: ubuntu-latest, container: 'ubuntu:20.04' } - { compiler: gcc-7, cxxstd: '14,17', boostBranch: boost-1.86.0, os: ubuntu-latest, container: 'ubuntu:20.04' }
- { compiler: gcc-10, cxxstd: '14,17,20', boostBranch: boost-1.86.0, os: ubuntu-22.04 } - { compiler: gcc-10, cxxstd: '14,17,20', boostBranch: boost-1.86.0, os: ubuntu-22.04 }
- { compiler: gcc-12, cxxstd: '14,17,20', boostBranch: master, os: ubuntu-22.04 } - { compiler: gcc-12, cxxstd: '14,17,20', boostBranch: master, os: ubuntu-22.04 }
- { compiler: gcc-14, cxxstd: '14,17,20', boostBranch: boost-1.86.0, os: ubuntu-24.04 } - { compiler: gcc-14, cxxstd: '14,17,20,23,2c', boostBranch: boost-1.86.0, os: ubuntu-24.04 }
- { compiler: gcc-14, cxxstd: '14,17,20', boostBranch: master, os: ubuntu-24.04 } - { compiler: gcc-14, cxxstd: '14,17,20,23,2c', boostBranch: master, os: ubuntu-24.04 }
- { compiler: gcc-15, cxxstd: '14,17,20,23,2c', boostBranch: boost-1.86.0, os: ubuntu-26.04 }
- { compiler: gcc-16, cxxstd: '14,17,20,23,26', boostBranch: boost-1.86.0, os: ubuntu-26.04 }
- { compiler: gcc-16, cxxstd: '14,17,20,23,26', boostBranch: master, os: ubuntu-26.04 }
# Linux, clang # Linux, clang
- { compiler: clang-14, cxxstd: '14,17,20', boostBranch: boost-1.86.0, os: ubuntu-24.04 } - { compiler: clang-14, cxxstd: '14,17,20', boostBranch: boost-1.86.0, os: ubuntu-24.04 }
- { compiler: clang-18, cxxstd: '14,17,20', boostBranch: boost-1.86.0, os: ubuntu-24.04 } - { compiler: clang-18, cxxstd: '14,17,20,23,2c', boostBranch: boost-1.86.0, os: ubuntu-24.04 }
- { compiler: clang-18, cxxstd: '14,17,20', boostBranch: master, os: ubuntu-24.04 } - { compiler: clang-18, cxxstd: '14,17,20,23,2c', boostBranch: master, os: ubuntu-24.04 }
- { compiler: clang-19, cxxstd: '14,17,20,23,2c', boostBranch: boost-1.86.0, os: ubuntu-24.04 }
- { compiler: clang-20, cxxstd: '14,17,20,23,2c', boostBranch: boost-1.86.0, os: ubuntu-24.04 }
- { compiler: clang-21, cxxstd: '14,17,20,23,2c', boostBranch: boost-1.86.0, os: ubuntu-26.04 }
- { compiler: clang-22, cxxstd: '14,17,20,23,2c', boostBranch: boost-1.86.0, os: ubuntu-26.04, cxxflags: '-Wno-c2y-extensions' }
- { compiler: clang-22, cxxstd: '14,17,20,23,2c', boostBranch: master, os: ubuntu-26.04, cxxflags: '-Wno-c2y-extensions' }
# Windows # Windows
- { toolset: msvc-14.2, os: windows-2019, cxxstd: 14, generator: 'Visual Studio 16 2019' } - { toolset: gcc, os: windows-2022, cxxstd: 17, generator: 'MinGW Makefiles' }
- { toolset: gcc, os: windows-2019, cxxstd: 17, generator: 'MinGW Makefiles' }
- { toolset: msvc-14.3, os: windows-2022, cxxstd: 20, generator: 'Visual Studio 17 2022' } - { toolset: msvc-14.3, os: windows-2022, cxxstd: 20, generator: 'Visual Studio 17 2022' }
- { toolset: msvc-14.5, os: windows-2025-vs2026, cxxstd: 20, generator: 'Visual Studio 18 2026' }
- { toolset: msvc-14.5, os: windows-2025-vs2026, cxxstd: latest, generator: 'Visual Studio 18 2026' }
- { name: Collect coverage, coverage: yes, - { name: Collect coverage, coverage: yes,
compiler: gcc-8, cxxstd: '14', boostBranch: boost-1.86.0, os: ubuntu-latest, container: 'ubuntu:20.04' } compiler: gcc-13, cxxstd: '14,2b', boostBranch: boost-1.86.0, os: ubuntu-24.04 }
timeout-minutes: 120 timeout-minutes: 120
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
container: ${{matrix.container}} container: ${{matrix.container}}
env:
B2_CXXFLAGS: ${{matrix.cxxflags}}
steps: steps:
- name: Prepare container environment - name: Prepare container environment
@ -82,19 +93,19 @@ jobs:
git config --global pack.threads 0 git config --global pack.threads 0
git config --global --add safe.directory "$GITHUB_WORKSPACE" # Avoid ownership issues of repo in container git config --global --add safe.directory "$GITHUB_WORKSPACE" # Avoid ownership issues of repo in container
- uses: actions/checkout@v4 - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with: with:
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary' # For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
fetch-depth: ${{ matrix.coverage && '0' || '1' }} fetch-depth: ${{ matrix.coverage && '0' || '1' }}
# Checking out Boost and all its submodules takes ages... # Checking out Boost and all its submodules takes ages...
- name: Cache Boost - name: Cache Boost
uses: actions/cache@v4 uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
with: with:
path: boost-root path: boost-root
key: boost-${{matrix.boostBranch}} key: boost-${{matrix.boostBranch}}
- name: Checkout Boost - name: Checkout Boost
uses: actions/checkout@v4 uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with: with:
repository: boostorg/boost repository: boostorg/boost
ref: ${{matrix.boostBranch}} ref: ${{matrix.boostBranch}}
@ -130,6 +141,9 @@ jobs:
if [[ "${{matrix.coverage}}" == "yes" ]]; then if [[ "${{matrix.coverage}}" == "yes" ]]; then
B2_FLAGS+=" cxxflags=--coverage linkflags=--coverage" B2_FLAGS+=" cxxflags=--coverage linkflags=--coverage"
fi fi
if [[ -n $B2_CXXFLAGS ]]; then
B2_FLAGS+=" cxxflags='$B2_CXXFLAGS'"
fi
echo "B2_FLAGS=$B2_FLAGS" >> $GITHUB_ENV echo "B2_FLAGS=$B2_FLAGS" >> $GITHUB_ENV
# Move the Boost root to a sibling folder # Move the Boost root to a sibling folder
@ -137,7 +151,7 @@ jobs:
echo "BOOST_ROOT=${{github.workspace}}/../boost-root" >> $GITHUB_ENV echo "BOOST_ROOT=${{github.workspace}}/../boost-root" >> $GITHUB_ENV
- name: Cache ccache - name: Cache ccache
uses: hendrikmuhs/ccache-action@v1 uses: hendrikmuhs/ccache-action@d62db5f07c26379fc4b4e0916f098a92573c3b03 # v1.2.23
if: startsWith(matrix.os, 'ubuntu') if: startsWith(matrix.os, 'ubuntu')
with: with:
key: ${{matrix.os}}-${{matrix.compiler}}-${{matrix.boostBranch}} key: ${{matrix.os}}-${{matrix.compiler}}-${{matrix.boostBranch}}
@ -148,6 +162,7 @@ jobs:
- name: Boost build - name: Boost build
run: | run: |
set -x
./b2 "$GITHUB_WORKSPACE/test" -q $B2_FLAGS -j3 ./b2 "$GITHUB_WORKSPACE/test" -q $B2_FLAGS -j3
./b2 "$GITHUB_WORKSPACE/doc//mock_examples" -q $B2_FLAGS "$@" ./b2 "$GITHUB_WORKSPACE/doc//mock_examples" -q $B2_FLAGS "$@"
working-directory: ${{env.BOOST_ROOT}} working-directory: ${{env.BOOST_ROOT}}
@ -162,18 +177,30 @@ jobs:
- name: Collect coverage - name: Collect coverage
if: matrix.coverage if: matrix.coverage
working-directory: ${{github.workspace}} # Make sure file is found by upload action
run: | run: |
B2_COMPILER=${{matrix.compiler}}
if [[ "$B2_COMPILER" =~ gcc- ]]; then
ver="${B2_COMPILER##*gcc-}"
else
ver=8
fi
GCOV=gcov-${ver}
lcov --version lcov --version
lcov --gcov-tool=gcov-8 --directory "$GITHUB_WORKSPACE/test" --capture --output-file all.info LCOV_OPTIONS=()
LCOV_OPTIONS+=(--rc "branch_coverage=0")
LCOV_OPTIONS+=(--ignore-errors "inconsistent,mismatch,unused")
lcov "${LCOV_OPTIONS[@]}" --gcov-tool="$GCOV" --directory "$GITHUB_WORKSPACE/test" --capture --output-file all.info
# dump a summary on the console # dump a summary on the console
lcov --list all.info lcov "${LCOV_OPTIONS[@]}" --list all.info
# Limit to our files (header-only in this case) # Limit to our files (header-only in this case)
lcov --extract all.info "$GITHUB_WORKSPACE/include/*" --output-file coverage.info lcov "${LCOV_OPTIONS[@]}" --extract all.info "$GITHUB_WORKSPACE/include/*" --output-file coverage.info
# Output what was collected # Output what was collected
lcov --list coverage.info lcov "${LCOV_OPTIONS[@]}" --list coverage.info
- name: Upload coverage - name: Upload coverage
if: matrix.coverage if: matrix.coverage
uses: coverallsapp/github-action@master uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
with: with:
path-to-lcov: ${{github.workspace}}/coverage.info path-to-lcov: ${{github.workspace}}/coverage.info
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
@ -186,9 +213,10 @@ jobs:
echo "LD_LIBRARY_PATH=$PWD/stage/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=$PWD/stage/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: CMake build - name: CMake build
env:
CXX_STD: ${{matrix.cxxstd}}
run: | run: |
mkdir build && cd build mkdir build && cd build
CXX_STANDARD="${{matrix.cxxstd}}"
if [[ "${{matrix.os}}" == "windows-"* ]]; then if [[ "${{matrix.os}}" == "windows-"* ]]; then
extra_args=() extra_args=()
else else
@ -198,10 +226,31 @@ jobs:
extra_args+=(-G "${{matrix.generator}}") extra_args+=(-G "${{matrix.generator}}")
fi fi
if [[ "${{matrix.generator}}" == "MinGW"* ]]; then if [[ "${{matrix.generator}}" == "MinGW"* ]]; then
# Avoid "Fatal error: can't write 1214 bytes to section .text of [...] 'file too big' [...] too many sections"
extra_args+=(-DCMAKE_CXX_FLAGS="-Wa,-mbig-obj") extra_args+=(-DCMAKE_CXX_FLAGS="-Wa,-mbig-obj")
# GHA has 2 MinGWs installed which must not be mixed,
# so make sure the executables pick up the libraries/DLLs matching the compiler
gcc_folder=$(dirname "$(which g++)")
prefix=${gcc_folder%/bin}
echo "GCC prefix: $prefix"
export PATH="$prefix/bin:$prefix/lib:$PATH"
fi fi
echo "Using extra args: ${extra_args[*]}" if [[ -n $B2_CXXFLAGS ]]; then
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBoost_ROOT="$BOOST_ROOT/stage" -DCMAKE_CXX_STANDARD="${CXX_STANDARD##*,}" "${extra_args[@]}" -DCMAKE_VERBOSE_MAKEFILE=ON -DBoost_DEBUG=ON -DBoost_VERBOSE=ON extra_args+=(-DCMAKE_CXX_FLAGS="$B2_CXXFLAGS")
fi
CXX_STD=${CXX_STD##*,} # Extract last value
case "$CXX_STD" in
latest) CXX_STD="" ;; # MSVC: Use default
# Use older ones instead of aliases
2b) CXX_STD=20 ;;
2c) CXX_STD=23 ;;
esac
if [[ -n "$CXX_STD" ]]; then
extra_args+=(-DCMAKE_CXX_STANDARD="$CXX_STD")
fi
set +x
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBoost_ROOT="$BOOST_ROOT/stage" "${extra_args[@]}" -DCMAKE_VERBOSE_MAKEFILE=ON -DBoost_DEBUG=ON -DBoost_VERBOSE=ON
cmake --build . --config Debug --parallel 3 cmake --build . --config Debug --parallel 3
ctest --output-on-failure --build-config Debug ctest --output-on-failure --build-config Debug

View file

@ -3,7 +3,7 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
# #
# Copyright 2015 Mathieu Champlon # Copyright 2015 Mathieu Champlon
# Copyright 2020-2025 Alexander Grund # Copyright 2020-2026 Alexander Grund
skip_branch_with_pr: true skip_branch_with_pr: true
@ -30,31 +30,40 @@ environment:
ADDRESS_MODEL: 64 ADDRESS_MODEL: 64
VARIANT: debug VARIANT: debug
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
BOOST: 1_83_0 BOOST: 1_85_0
TOOLSET: msvc-14.3 TOOLSET: msvc-14.3
CXX_STANDARD: 14,17,20 CXX_STANDARD: 14,17,20
ADDRESS_MODEL: 64 ADDRESS_MODEL: 64
VARIANT: debug VARIANT: debug
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
BOOST: 1_86_0 BOOST: 1_89_0
TOOLSET: msvc-14.3 TOOLSET: msvc-14.3
CXX_STANDARD: 14,17 CXX_STANDARD: 14,17
ADDRESS_MODEL: 64 ADDRESS_MODEL: 64
VARIANT: debug VARIANT: debug
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
BOOST: 1_86_0 BOOST: 1_89_0
TOOLSET: msvc-14.3 TOOLSET: msvc-14.3
CXX_STANDARD: 20 CXX_STANDARD: 20
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2026
BOOST: 1_91_0
TOOLSET: msvc-14.5
CXX_STANDARD: 20
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2026
BOOST: 1_91_0
TOOLSET: msvc-14.5
CXX_STANDARD: latest
# CMake builds # CMake builds
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
BOOST: 1_65_1 BOOST: 1_65_1
CMAKE: true CMAKE: true
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
BOOST: 1_83_0 BOOST: 1_85_0
CMAKE: true CMAKE: true
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
BOOST: 1_86_0 BOOST: 1_89_0
CMAKE: true CMAKE: true
install: install: