tidy: resolving warnings from clangd #66
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| arch: x64 | |
| cmake_arch: x86_64 | |
| - os: macos-latest | |
| arch: arm64 | |
| cmake_arch: arm64 | |
| - os: ubuntu-latest | |
| arch: x64 | |
| - os: ubuntu-latest | |
| arch: x64 | |
| toolchain: mingw32-cross | |
| - os: windows-latest | |
| arch: x64 | |
| toolchain: mingw | |
| - os: windows-latest | |
| arch: x64 | |
| toolchain: msvc | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install system dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: echo "CMake and Ninja pre-installed" | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libx11-dev libxcursor-dev libxext-dev libxrandr-dev \ | |
| libgl1-mesa-dev libepoxy-dev libcairo2-dev ninja-build cmake \ | |
| doxygen graphviz python3-sphinx python3-sphinx-rtd-theme \ | |
| ${{ matrix.toolchain == 'mingw32-cross' && 'gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64' || '' }} | |
| - name: Configure CMake (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| cmake -B build -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake_arch }} \ | |
| -DLUI_BUILD_TESTS=ON \ | |
| -DLUI_BUILD_DEMO=ON \ | |
| -DLUI_BUILD_DOCS=OFF \ | |
| -DLUI_ENABLE_CAIRO=${{ matrix.cmake_arch == 'x86_64' && 'OFF' || 'ON' }} | |
| - name: Configure CMake (Linux) | |
| if: runner.os == 'Linux' && matrix.toolchain != 'mingw32-cross' | |
| run: | | |
| cmake -B build -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DLUI_BUILD_TESTS=ON \ | |
| -DLUI_BUILD_DEMO=ON \ | |
| -DLUI_BUILD_DOCS=ON | |
| - name: Configure CMake (MinGW32 Cross) | |
| if: runner.os == 'Linux' && matrix.toolchain == 'mingw32-cross' | |
| run: | | |
| cmake -B build -G Ninja \ | |
| -DCMAKE_TOOLCHAIN_FILE=cmake/mingw32.cmake \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DLUI_ENABLE_CAIRO=OFF \ | |
| -DLUI_BUILD_TESTS=OFF \ | |
| -DLUI_BUILD_DEMO=ON \ | |
| -DLUI_BUILD_DOCS=OFF | |
| - name: Configure CMake (Windows MinGW) | |
| if: runner.os == 'Windows' && matrix.toolchain == 'mingw' | |
| run: | | |
| cmake -B build -G Ninja ` | |
| -DCMAKE_BUILD_TYPE=Release ` | |
| -DLUI_BUILD_TESTS=ON ` | |
| -DLUI_BUILD_DEMO=ON ` | |
| -DLUI_BUILD_DOCS=OFF | |
| - name: Configure CMake (Windows MSVC) | |
| if: runner.os == 'Windows' && matrix.toolchain == 'msvc' | |
| run: | | |
| cmake -B build -G "Visual Studio 17 2022" -A x64 ` | |
| -DCMAKE_BUILD_TYPE=Release ` | |
| -DLUI_BUILD_TESTS=ON ` | |
| -DLUI_BUILD_DEMO=ON ` | |
| -DLUI_BUILD_DOCS=OFF | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Run Tests | |
| run: ctest --test-dir build --build-config Release --output-on-failure |