Silence unused returned value warning #497
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
| # SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> | |
| # | |
| # SPDX-License-Identifier: MIT | |
| # Test on macOS with some dependencies provided externally by Homebrew. | |
| # Both to validate the CMake setup for using system dependencies and to have early warning | |
| # about incompatible changes in some fast-moving external libraries. | |
| name: Build against external 3rdparty | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: | |
| - macos-latest | |
| shared: | |
| - ON | |
| - OFF | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| (brew list cmake > /dev/null && brew uninstall cmake) # Workaround for https://github.com/actions/runner-images/issues/12912 | |
| # We remove the pinned CMake if it's installed so commands below can succeed | |
| # TODO: remove when not needed anymore | |
| brew tap KDAB/tap | |
| brew install doctest fmt spdlog KDBindings mosquitto | |
| - name: Configure project | |
| run: > | |
| cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Debug -G Ninja | |
| -DKDUTILS_BUILD_TESTS=ON | |
| -DKDUTILS_USE_EXTERNAL_DEPENDENCIES=ON | |
| -DBUILD_SHARED_LIBS=${{ matrix.shared }} | |
| - name: Check if external dependencies were used | |
| run: | | |
| ! grep -q "KDBindings_DIR-NOTFOUND" ./build/CMakeCache.txt | |
| ! grep -q "spdlog_DIR-NOTFOUND" ./build/CMakeCache.txt | |
| ! grep -q "fmt_DIR-NOTFOUND" ./build/CMakeCache.txt | |
| - name: Build Project | |
| run: cmake --build ./build | |
| - name: Run tests | |
| run: ctest --test-dir ./build --output-on-failure |