Skip to content

fixed #14088 - made CMake build with BUILD_CLI=Off work #20252

fixed #14088 - made CMake build with BUILD_CLI=Off work

fixed #14088 - made CMake build with BUILD_CLI=Off work #20252

Workflow file for this run

# 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]
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 (no CLI)
if: matrix.os == 'ubuntu-22.04'
run: |
cmake -S . -B cmake.output_nocli -G "Unix Makefiles" -DBUILD_CLI=Off
- name: Run CMake on ubuntu (no CLI / with tests)
if: matrix.os == 'ubuntu-22.04'
run: |
# the test and CLI code are too intertwined so for now we need to reject that
if cmake -S . -B cmake.output_nocli_tests -G "Unix Makefiles" -DBUILD_TESTS=On -DBUILD_CLI=Off; then
exit 1
else
exit 0
fi
- name: Run CMake on ubuntu (no CLI / with GUI)
if: matrix.os == 'ubuntu-22.04'
run: |
cmake -S . -B cmake.output_nocli_gui -G "Unix Makefiles" -DBUILD_CLI=Off -DBUILD_GUI=On
- name: Run CMake on ubuntu (no GUI)
if: matrix.os == 'ubuntu-22.04'
run: |
cmake -S . -B cmake.output_nogui -G "Unix Makefiles" -DBUILD_GUI=Off
- name: Run CMake on ubuntu (no GUI / with triage)
if: matrix.os == 'ubuntu-22.04'
run: |
# cannot build triage without GUI
if cmake -S . -B cmake.output_nogui_triage -G "Unix Makefiles" -DBUILD_GUI=Off -DBUILD_TRIAGE=On; then
exit 1
else
exit 0
fi
- name: Run CMake on ubuntu (no CLI / no GUI)
if: matrix.os == 'ubuntu-22.04'
run: |
cmake -S . -B cmake.output_nocli_nogui -G "Unix Makefiles" -DBUILD_GUI=Off