From 076152630ae1d126e567d19562900909771e14b5 Mon Sep 17 00:00:00 2001 From: pajlada Date: Sat, 30 Oct 2021 14:24:43 +0200 Subject: [PATCH] Add GitHub action to test builds with precompiled headers disabled (#3327) --- .github/workflows/build.yml | 15 ++++++++++++++- CHANGELOG.md | 1 + src/CMakeLists.txt | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47f16f7b..95e5b7ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,14 +15,21 @@ jobs: os: [windows-latest, ubuntu-latest, macos-latest] qt-version: [5.15.2, 5.12.10] build-system: [qmake, cmake] + pch: [true] exclude: - os: windows-latest qt-version: 5.12.10 build-system: cmake + pch: true include: - os: windows-2016 qt-version: 5.12.10 build-system: cmake + pch: true + - os: ubuntu-latest + qt-version: 5.15.2 + build-system: cmake + pch: false fail-fast: false steps: @@ -158,7 +165,12 @@ jobs: run: | mkdir build cd build - cmake -DCMAKE_INSTALL_PREFIX=appdir/usr/ -DCMAKE_BUILD_TYPE=Release -DPAJLADA_SETTINGS_USE_BOOST_FILESYSTEM=On .. + cmake \ + -DCMAKE_INSTALL_PREFIX=appdir/usr/ \ + -DCMAKE_BUILD_TYPE=Release \ + -DPAJLADA_SETTINGS_USE_BOOST_FILESYSTEM=On \ + -DUSE_PRECOMPILED_HEADERS=${{ matrix.pch }} \ + .. make -j8 shell: bash @@ -214,6 +226,7 @@ jobs: cmake \ -DCMAKE_BUILD_TYPE=Release \ -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl \ + -DUSE_PRECOMPILED_HEADERS=${{ matrix.pch }} \ .. make -j8 shell: bash diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dd3fb48..91d1ff58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ - Bugfix: Fixed being unable to disable `First Message` highlights (#3293) - Bugfix: Fixed `First Message` custom sound not persisting through restart. (#3303) - Bugfix: Fixed `First Message` scrollbar highlights not being disabled. (#3325) +- Dev: Add GitHub action to test builds without precompiled headers enabled. (#3327) - Dev: Renamed CMake's build option `USE_SYSTEM_QT5KEYCHAIN` to `USE_SYSTEM_QTKEYCHAIN`. (#3103) - Dev: Add benchmarks that can be compiled with the `BUILD_BENCHMARKS` CMake flag. Off by default. (#3038) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e78de47b..8b62babf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -556,7 +556,10 @@ if (BUILD_APP) endif () if (USE_PRECOMPILED_HEADERS) + message(STATUS "Building with precompiled headers") target_precompile_headers(${LIBRARY_PROJECT} PRIVATE PrecompiledHeader.hpp) +else () + message(STATUS "Building without precompiled headers") endif () # Enable autogeneration of Qts MOC/RCC/UIC