Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 42 additions & 16 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ 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
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
Expand All @@ -70,6 +70,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'
Expand All @@ -80,34 +81,59 @@ 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
# Requires cmd shell as on windows-2022 with msvc-14.3 'cl' won't be found with bash
- 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$(nproc) --prefix="$BOOST_ROOT" install
.\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: |
Expand Down
Loading