From 19685c92f9a4e1fad85742c67541040698323cad Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 31 Jul 2025 09:15:58 +0200 Subject: [PATCH 1/4] Revert "Skip failing Windows jobs for now" This reverts commit 1a866928f5e17def695b8c920faa80e6d0e268e7. --- .github/workflows/ci_tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 2cc0243e..32d02ed5 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -48,8 +48,6 @@ jobs: generator: Visual Studio 17 2022 - os: ubuntu-22.04 buildType: Debug - - os: windows-2022 - standalone: Boost runs-on: ${{matrix.os}} env: DEP_DIR: ${{github.workspace}}/dependencies From 76d666096ab90e798e230c82064491b0d9a68d31 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 31 Jul 2025 09:19:12 +0200 Subject: [PATCH 2/4] Fix b2 invocation on Windows --- .github/workflows/ci_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 32d02ed5..73b00eb2 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -103,7 +103,7 @@ jobs: shell: cmd run: | cd __buildBoost - ./b2 link=static toolset=$B2_TOOLSET address-model=64 -j$(nproc) --prefix="$BOOST_ROOT" install + .\b2 link=static toolset=%B2_TOOLSET% address-model=64 -j 3 --prefix="%BOOST_ROOT%" install cd .. rm -r __buildBoost || true - name: Create standalone From 7efd76e7c0ba1b2357a4087616c328af058aed85 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 23 Jul 2025 15:26:27 +0200 Subject: [PATCH 3/4] Fix failure building Boost Boost.Build 1.56 doesn't support VS 2022 so use a newer version of it but keep the Boost version. --- .github/workflows/ci_tests.yml | 50 ++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 73b00eb2..7344278b 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -68,6 +68,7 @@ jobs: - name: Set BOOST_ROOT if: matrix.standalone == 'Boost' run: echo "BOOST_ROOT=${DEP_DIR//\\/\/}/boost_${BOOST_VERSION//./_}" >> $GITHUB_ENV + # Install Boost - uses: actions/checkout@v4 if: matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true' @@ -78,22 +79,46 @@ jobs: fetch-depth: 1 - name: Bootstrap Boost if: matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true' + working-directory: __buildBoost run: | - cd __buildBoost git submodule update --init --jobs 3 tools/boostdep libs/filesystem tools/inspect libs/wave # Last 2 are required for pre-1.64 - (cd tools/boostdep && git fetch && git checkout boost-1.73.0 && git checkout boost-1.63.0 -- depinst/exceptions.txt) - python tools/boostdep/depinst/depinst.py --include tools --exclude test --git_args '--jobs 3' filesystem - [[ "${{matrix.os}}" =~ "windows" ]] && toolset=mingw || toolset=gcc - ./bootstrap.sh --with-toolset="$toolset" --with-libraries=system,filesystem threading=multi || (cat bootstrap.log && false) - sed -i 's/mingw/gcc/' project-config.jam - [[ "${{matrix.generator}}" =~ "Visual Studio" ]] && toolset=msvc-14.3 || toolset=gcc + if [[ $BOOST_VERSION < '1.73.0' ]]; then + (cd tools/boostdep && git fetch origin && git checkout boost-1.73.0 && git checkout boost-1.63.0 -- depinst/exceptions.txt) + fi + python tools/boostdep/depinst/depinst.py --include tools --exclude test --git_args '--jobs 3 --depth 1' wave # Should be filesystem, but works because that is a dependency of wave + if [[ "${{matrix.generator}}" =~ "Visual Studio" ]]; then + toolset=msvc-14.3 + # Boost.Build doesn't support MSVC 2022 (14.3) until 1.78 + if [[ $BOOST_VERSION < '1.78.0' ]]; then + (cd tools/build && git fetch --depth 1 origin boost-1.78.0 && git checkout FETCH_HEAD) + git fetch --depth 1 origin boost-1.78.0 && git checkout FETCH_HEAD -- bootstrap.bat + fi + else + toolset=gcc + [[ "${{matrix.os}}" =~ "windows" ]] && botstrap_toolset=mingw || botstrap_toolset=gcc + ./bootstrap.sh --with-toolset="$botstrap_toolset" --with-libraries=system,filesystem threading=multi || (cat bootstrap.log && false) + sed -i 's/mingw/gcc/' project-config.jam + ./b2 headers + fi echo "B2_TOOLSET=$toolset" >> $GITHUB_ENV - ./b2 headers + # The updated Boost requires a C++11 compiler which MinGW isn't and using VS implies using the CMD shell + - name: Bootstrap Boost (MSVC) + if: matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true' && startsWith(matrix.os, 'windows') && startsWith(matrix.generator, 'Visual Studio') + shell: cmd + working-directory: __buildBoost + run: | + CALL .\bootstrap.bat --with-toolset=%B2_TOOLSET% --with-libraries=system,filesystem threading=multi + IF %ERRORLEVEL% NEQ 0 ( + ECHO Build failed, printing log + TYPE bootstrap.log + EXIT /B 1 + ) + .\b2 headers + - name: Build Boost (Linux) if: matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') - shell: bash + working-directory: __buildBoost run: | - cd __buildBoost ./b2 link=static toolset=$B2_TOOLSET address-model=64 -j$(nproc) --prefix="$BOOST_ROOT" install cd .. rm -r __buildBoost || true @@ -101,11 +126,12 @@ jobs: - name: Build Boost (Windows) if: matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true' && startsWith(matrix.os, 'windows') shell: cmd + working-directory: __buildBoost run: | - cd __buildBoost .\b2 link=static toolset=%B2_TOOLSET% address-model=64 -j 3 --prefix="%BOOST_ROOT%" install + if %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% cd .. - rm -r __buildBoost || true + rmdir /s /q __buildBoost - name: Create standalone if: matrix.standalone == 'Standalone' run: | From 24692c3740955e706558f884c6cf633057cf0711 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 6 Aug 2025 09:04:05 +0200 Subject: [PATCH 4/4] Raise Boost version to 1.69 for VS 2022 standalone tests Boost.Build 1.73 (required for VS 2022) added the `threadapi` feature required by Boost.Thread importable via `threadapi-feature` which got supported by Boost.Thread in 1.66: https://github.com/boostorg/thread/commit/3ebd3b6bcee3e26c919f8149440348c1219f6a3a Boost.Iostreams requires a patch from 1.69: https://github.com/boostorg/iostreams/commit/a0c32babd2f491163b9876a35d2f778bb43e5e01 --- .github/workflows/ci_tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 7344278b..64c01e4f 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -51,7 +51,9 @@ jobs: runs-on: ${{matrix.os}} env: DEP_DIR: ${{github.workspace}}/dependencies - BOOST_VERSION: 1.56.0 + # VS 2022 only supported by Boost.Build 1.78+ with changes to build files (e.g. in Boost.Thread) required that are introduced in Boost 1.66 + # Boost.Iostreams doesn't support VS 2022 until 1.69 + BOOST_VERSION: ${{ startsWith(matrix.generator, 'Visual Studio') && '1.69.0' || '1.56.0' }} steps: - uses: actions/checkout@v4 - name: Sanity check version