Suppress bad clang warnings #1374
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
| name: boost-asio | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - feature/* | |
| paths-ignore: | |
| - '**/*.md' | |
| - 'docs/**' | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| - 'docs/**' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: | |
| - { name: clang, version: 18 } | |
| - { name: clang, version: 20 } | |
| - { name: gcc, version: 14 } | |
| boost_version: [1.88.0, 1.86.0] | |
| env: | |
| CC: ${{matrix.compiler.name}}-${{matrix.compiler.version}} | |
| CXX: ${{ matrix.compiler.name == 'gcc' && 'g++' || 'clang++' }}-${{matrix.compiler.version}} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install clang | |
| if: matrix.compiler.name == 'clang' | |
| run: | | |
| wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
| echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ matrix.compiler.version }} main" | sudo tee /etc/apt/sources.list.d/llvm.list | |
| sudo apt-get update | |
| sudo apt-get install -y --fix-missing clang-${{ matrix.compiler.version }} libc++-${{ matrix.compiler.version }}-dev libc++abi-${{ matrix.compiler.version }}-dev | |
| echo "PATH=/usr/lib/llvm-${{ matrix.compiler.version }}/bin:$PATH" >> $GITHUB_ENV | |
| - name: Install Boost | |
| id: install-boost | |
| uses: MarkusJx/install-boost@v2 | |
| with: | |
| boost_version: ${{ matrix.boost_version }} | |
| - name: Configure CMake | |
| run: | | |
| CMAKE_CXX_FLAGS="" | |
| CMAKE_EXE_LINKER_FLAGS="" | |
| if [ "${{ matrix.compiler.name }}" = "clang" ]; then | |
| CMAKE_CXX_FLAGS="-stdlib=libc++" | |
| CMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++abi" | |
| fi | |
| cmake -B ${{github.workspace}}/build \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_CXX_STANDARD=23 \ | |
| -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \ | |
| -DCMAKE_EXE_LINKER_FLAGS="$CMAKE_EXE_LINKER_FLAGS" \ | |
| -Dglaze_USE_BUNDLED_ASIO=OFF | |
| env: | |
| Boost_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | |
| - name: Build | |
| # Only build networking tests that actually use Asio | |
| run: | | |
| cmake --build build -j $(nproc) --target \ | |
| asio_repe \ | |
| http_examples \ | |
| http_router_test \ | |
| http_client_test \ | |
| http_server_api_tests \ | |
| https_test \ | |
| jsonrpc_registry_test \ | |
| openapi_test \ | |
| repe_buffer_test \ | |
| repe_plugin_test \ | |
| repe_test \ | |
| registry_view_test \ | |
| repe_to_jsonrpc_test \ | |
| websocket_close_test \ | |
| websocket_client_test \ | |
| utf8_test \ | |
| shared_context_bug_test \ | |
| wss_test | |
| - name: Test | |
| working-directory: build | |
| run: ctest -j $(nproc) --output-on-failure -R "^(asio_repe|http_examples|http_router_test|http_client_test|http_server_api_tests|https_test|jsonrpc_registry_test|openapi_test|repe_buffer_test|repe_plugin_test|repe_test|registry_view_test|repe_to_jsonrpc_test|websocket_close_test|websocket_client_test|utf8_test|shared_context_bug_test|wss_test)$" |