added CMake option USE_INT128 and support built-in __int128 / some compilation fixes
#20444
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: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, macos-15] | |
| int128: [Off, On] | |
| 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 }} | |
| # TODO: move latest compiler to separate step | |
| # TODO: bail out on warnings with latest GCC | |
| - name: Set up GCC | |
| uses: egor-tensin/setup-gcc@v1 | |
| if: false # matrix.os == 'ubuntu-22.04' | |
| with: | |
| version: 13 | |
| platform: x64 | |
| - name: Select compiler | |
| if: false # matrix.os == 'ubuntu-22.04' | |
| run: | | |
| echo "CXX=g++-13" >> $GITHUB_ENV | |
| - name: Install missing software on ubuntu | |
| if: contains(matrix.os, 'ubuntu') | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libxml2-utils | |
| # qt6-tools-dev-tools for lprodump | |
| # qt6-l10n-tools for lupdate | |
| sudo apt-get install qt6-base-dev libqt6charts6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libglx-dev libgl1-mesa-dev | |
| # coreutils contains "nproc" | |
| - name: Install missing software on macos | |
| if: contains(matrix.os, 'macos') | |
| run: | | |
| # pcre was removed from runner images in November 2022 | |
| brew install coreutils qt@6 pcre | |
| - name: Run CMake on ubuntu (with GUI) | |
| if: contains(matrix.os, 'ubuntu') | |
| run: | | |
| cmake -S . -B cmake.output -G "Unix Makefiles" -DUSE_INT128=${{ matrix.int128 }} -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install | |
| - name: Run CMake on macos (with GUI) | |
| if: contains(matrix.os, 'macos') | |
| run: | | |
| cmake -S . -B cmake.output -G "Unix Makefiles" -DUSE_INT128=${{ matrix.int128 }} -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6 | |
| - name: Run CMake build | |
| run: | | |
| cmake --build cmake.output -- -j$(nproc) | |
| - name: Run CMake test | |
| run: | | |
| cmake --build cmake.output --target check -- -j$(nproc) | |
| - name: Run CTest | |
| run: | | |
| pushd cmake.output | |
| ctest --output-on-failure -j$(nproc) | |
| - name: Run CMake install | |
| run: | | |
| cmake --build cmake.output --target install |