fixed #14003 - made it possible to disable Boost again #20106
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
| # Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners | |
| name: CI-unixish | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| - 'releases/**' | |
| - '2.*' | |
| tags: | |
| - '2.*' | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build_cmake_boost: | |
| strategy: | |
| matrix: | |
| os: [macos-13, macos-15] # non-macos platforms are already built with Boost in other contexts | |
| fail-fast: false # Prefer quick result | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| # TODO: figure out why there are cache misses with PCH enabled | |
| CCACHE_SLOPPINESS: pch_defines,time_macros | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }} | |
| - name: Run CMake on macOS (force Boost) | |
| run: | | |
| # make sure we fail when Boost is requested and not available. | |
| # will fail because no package configuration is available. | |
| if cmake -S . -B cmake.output.boost-force-noavail -G "Unix Makefiles" -DUSE_BOOST=On; then | |
| exit 1 | |
| else | |
| exit 0 | |
| fi | |
| # coreutils contains "nproc" | |
| - name: Install missing software on macOS | |
| run: | | |
| brew install coreutils boost | |
| - name: Run CMake on macOS (force Boost) | |
| run: | | |
| cmake -S . -B cmake.output.boost-force -G "Unix Makefiles" -DUSE_BOOST=On | |
| - name: Run CMake on macOS (no Boost) | |
| run: | | |
| # make sure Boost is not used when disabled even though it is available | |
| cmake -S . -B cmake.output.boost-no -G "Unix Makefiles" -DUSE_BOOST=Off | |
| if grep -q '\-DHAVE_BOOST' ./cmake.output.boost-no/compile_commands.json; then | |
| exit 1 | |
| else | |
| exit 0 | |
| fi | |
| - name: Run CMake on macOS (with Boost) | |
| run: | | |
| cmake -S . -B cmake.output.boost -G "Unix Makefiles" -DBUILD_TESTS=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| grep -q '\-DHAVE_BOOST' ./cmake.output.boost/compile_commands.json | |
| - name: Build with CMake on macOS (with Boost) | |
| run: | | |
| cmake --build cmake.output.boost -- -j$(nproc) |