From d278e682c622cf5f355edc63a503af97f079ba79 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 12 Mar 2024 16:03:24 +0100 Subject: [PATCH] coin: Build standalone examples in a separate build directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously configurations with -make examples in their configure args were building examples as part of the Qt library build. This has some downsides: - we don't build examples as a separate project, thus not ensuring that we build examples as our users would - qt cmake deployment api can't be used due to various limitations in our tooling Use the new qtbase instructions to instead build examples as a separate project in a separate build directory, after Qt is built and installed. This is similar to how we build standalone tests. The new instructions are activated by the StandaloneExamples features. It is opt-in as opposed to standalone tests, so we can disable the feature in case any regressions happen. Task-number: QTBUG-90820 Task-number: QTBUG-96232 Change-Id: I71b37b91ed09bcc0797841adf0df84cc0b111fd7 Reviewed-by: Tor Arne Vestbø --- coin/platform_configs/cmake_platforms.yaml | 8 ++++---- coin/platform_configs/cmake_platforms_qemu.yaml | 2 +- coin/platform_configs/macos.yaml | 2 +- coin/platform_configs/nightly_ubuntu_22_04_xwayland.yaml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/coin/platform_configs/cmake_platforms.yaml b/coin/platform_configs/cmake_platforms.yaml index d17985ba..406cfde6 100644 --- a/coin/platform_configs/cmake_platforms.yaml +++ b/coin/platform_configs/cmake_platforms.yaml @@ -12,7 +12,7 @@ Configurations: Id: 'ubuntu-22.04-documentation' Template: 'qtci-linux-Ubuntu-22.04-x86_64-51' Compiler: 'GCC' - Features: ['Sccache', 'Documentation', 'UseConfigure', 'DoNotRunTests'] + Features: ['Sccache', 'Documentation', 'UseConfigure', 'DoNotRunTests', 'StandaloneExamples'] Configure arguments: '-make examples -developer-build -c++std c++20 -linker gold -qtlibinfix TestInfix -qtnamespace TestNamespace' Environment variables: ['NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR}} -DQT_DEPLOY_FFMPEG=TRUE'] - @@ -43,7 +43,7 @@ Configurations: Id: 'ubuntu-24.04-arm64-documentation' Template: 'qtci-linux-Ubuntu-24.04-aarch64-50' Compiler: 'GCC' - Features: ['Documentation', 'UseConfigure', 'DoNotRunTests'] + Features: ['Documentation', 'UseConfigure', 'DoNotRunTests', 'StandaloneExamples'] Configure arguments: '-make examples -developer-build -c++std c++20 -linker gold -qtlibinfix TestInfix -qtnamespace TestNamespace -qpa offscreen\;xcb' Environment variables: ['NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR}}'] - @@ -73,7 +73,7 @@ Configurations: Id: 'ubuntu-24.04-x64-documentation' Template: 'qtci-linux-Ubuntu-24.04-x86_64-50' Compiler: 'GCC' - Features: ['Sccache', 'Documentation', 'UseConfigure', 'DoNotRunTests'] + Features: ['Sccache', 'Documentation', 'UseConfigure', 'DoNotRunTests', 'StandaloneExamples'] Configure arguments: '-make examples -developer-build -c++std c++20 -linker gold -qtlibinfix TestInfix -qtnamespace TestNamespace' Environment variables: ['NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR}} -DQT_DEPLOY_FFMPEG=TRUE'] - @@ -241,7 +241,7 @@ Configurations: Id: 'windows-11_23H2-mingw13-developer-build' Template: 'qtci-windows-11_23H2-x86_64-52' Compiler: 'Mingw' - Features: ['Sccache', 'WarningsAreErrors', 'UseConfigure'] + Features: ['Sccache', 'WarningsAreErrors', 'UseConfigure', 'StandaloneExamples'] Configure arguments: '-developer-build -release -force-debug-info -separate-debug-info -make examples' Environment variables: [ 'Path={{.Env.MINGW_PATH}}\bin;{{.Env.Path}}', diff --git a/coin/platform_configs/cmake_platforms_qemu.yaml b/coin/platform_configs/cmake_platforms_qemu.yaml index d876f609..235b2ba7 100644 --- a/coin/platform_configs/cmake_platforms_qemu.yaml +++ b/coin/platform_configs/cmake_platforms_qemu.yaml @@ -7,7 +7,7 @@ Configurations: Target arch: 'armv7' Compiler: 'GCC' Platform dependency: 'ubuntu-22.04' - Features: ['Sccache', 'UseConfigure', 'Insignificant'] + Features: ['Sccache', 'UseConfigure', 'Insignificant', 'StandaloneExamples'] Environment variables: [ 'TARGET_CONFIGURE_ARGS=-release -force-debug-info -developer-build -no-warnings-are-errors -make examples -qt-harfbuzz -device linux-imx7-g++ -device-option "CROSS_COMPILE={{.Env.QEMUARMV7_TOOLCHAIN_CROSS_COMPILE}}" -device-option "DISTRO_OPTS=hard-float boot2qt" -no-feature-forkfd_pidfd', 'TARGET_CMAKE_ARGS=-DCMAKE_TOOLCHAIN_FILE={{.Env.QEMUARMV7_TOOLCHAIN_FILE}} -DQT_FORCE_BUILD_TOOLS=ON', diff --git a/coin/platform_configs/macos.yaml b/coin/platform_configs/macos.yaml index bfaccb86..158a2104 100644 --- a/coin/platform_configs/macos.yaml +++ b/coin/platform_configs/macos.yaml @@ -114,7 +114,7 @@ Configurations: Id: 'macos-14-x86_64-developer-build' Template: 'qtci-macos-14-x86_64-105' Compiler: 'Clang' - Features: ['Sccache', 'DoNotRunTests', 'WarningsAreErrors', 'UseConfigure'] + Features: ['Sccache', 'DoNotRunTests', 'WarningsAreErrors', 'UseConfigure', 'StandaloneExamples'] Configure arguments: '-developer-build -release -force-debug-info -no-pch -no-framework -qtnamespace TestNamespace -make examples' Environment variables: [ 'CMAKE_ARGS=-DOPENSSL_ROOT_DIR={{.Env.OPENSSL_DIR}}', diff --git a/coin/platform_configs/nightly_ubuntu_22_04_xwayland.yaml b/coin/platform_configs/nightly_ubuntu_22_04_xwayland.yaml index d95746e8..16371a08 100644 --- a/coin/platform_configs/nightly_ubuntu_22_04_xwayland.yaml +++ b/coin/platform_configs/nightly_ubuntu_22_04_xwayland.yaml @@ -4,7 +4,7 @@ Configurations: # cmake_platforms.yaml Template: 'qtci-linux-Ubuntu-22.04-x86_64-50' Compiler: 'GCC' - Features: ['Sccache', 'Documentation', 'TestDocs', 'UseConfigure'] + Features: ['Sccache', 'Documentation', 'TestDocs', 'UseConfigure', 'StandaloneExamples'] Configure arguments: '-make examples -developer-build -c++std c++20 -qtlibinfix TestInfix -qtnamespace TestNamespace' - Id: 'Ubuntu-22.04-xwayland-host'