From 6cfca36d27e4f5a5fa8474ddd53d44ba366d7a54 Mon Sep 17 00:00:00 2001 From: beau-lunarg Date: Mon, 3 Feb 2025 16:55:09 -0500 Subject: [PATCH] No default test app builds. Force build during Github CI --- .github/workflows/ci_build.yml | 8 ++++---- CMakeLists.txt | 2 +- scripts/build.py | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 14c774be9e..60efd75f4c 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -49,11 +49,11 @@ jobs: then clang-format --version # A check for version 9 should be added. git fetch origin ${{ github.base_ref }} # Fetch target branch to FETCH_HEAD for code style check. - python3 scripts/build.py --config ${{ matrix.config.type }} --check-code-style-base FETCH_HEAD --parallel 0 + python3 scripts/build.py --config ${{ matrix.config.type }} --check-code-style-base FETCH_HEAD --parallel 0 --test-apps --test-apps python3 framework/generated/generate_vulkan.py # check generated code isn't out of date git diff --exit-code else - python3 scripts/build.py --config ${{ matrix.config.type }} --skip-check-code-style --parallel 0 + python3 scripts/build.py --config ${{ matrix.config.type }} --skip-check-code-style --parallel 0 --test-apps --test-apps fi - name: Prepare artifacts run: | @@ -119,7 +119,7 @@ jobs: git diff --exit-code - name: Run build script run: | - python scripts\build.py --skip-check-code-style --config ${{ matrix.config.type }} --parallel 0 + python scripts\build.py --skip-check-code-style --config ${{ matrix.config.type }} --parallel 0 --test-apps - name: Prepare artifacts run: | copy LICENSE.txt ${{ matrix.config.build_dir }}\windows\x64\output\bin\ @@ -171,7 +171,7 @@ jobs: run: .github/workflows/scripts/build-dependencies-macos.sh - name: Run build script run: | - python3 scripts/build.py --skip-check-code-style --config ${{ matrix.config.type }} --cmake-extra "CMAKE_PREFIX_PATH=$HOME/deps" --cmake-extra CMAKE_OSX_DEPLOYMENT_TARGET=11.0 --parallel 0 + python3 scripts/build.py --skip-check-code-style --config ${{ matrix.config.type }} --cmake-extra "CMAKE_PREFIX_PATH=$HOME/deps" --cmake-extra CMAKE_OSX_DEPLOYMENT_TARGET=11.0 --parallel 0 --test-apps - name: Prepare artifacts run: | cp LICENSE.txt ${{ matrix.config.build_dir }}/darwin/universal/output/bin/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 2545b37607..94a0bdf83e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,7 +139,7 @@ endif() option(GFXRECON_TOCPP_SUPPORT "Build ToCpp export tool as part of GFXReconstruct builds." TRUE) -option(GFXRECON_INCLUDE_TEST_APPS "Build and install test apps" ON) +option(GFXRECON_INCLUDE_TEST_APPS "Build and install test apps" OFF) if(MSVC) diff --git a/scripts/build.py b/scripts/build.py index 77a4525a5e..4f97f471f7 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -119,6 +119,10 @@ def parse_args(): '--check-code-style-base', dest='check_code_style_base', metavar='BASE', action='store', default='HEAD', help='Git branch name or commit ID to use as the base for C++ code style comparison') + arg_parser.add_argument( + '--test-apps', dest='test_apps', + action='store_true', default=False, + help='Build test apps') arg_parser.add_argument( '--cmake-system-version', dest='cmake_system_version', type=str, default="10.0.20348.0",help='Select SDK version') @@ -218,7 +222,7 @@ def cmake_generate_options(args): generate_options.append( '-DRUN_TESTS={}'.format('OFF' if args.skip_tests else 'ON')) generate_options.append( - '-DGFXRECON_INCLUDE_TEST_APPS={}'.format('OFF' if args.skip_tests else 'ON')) + '-DGFXRECON_INCLUDE_TEST_APPS={}'.format('ON' if args.test_apps else 'OFF')) generate_options.append( '-DGENERATE_TEST_ARCHIVE={}'.format( 'ON' if args.test_archive else 'OFF'))