From de5053ae0d8905d8abfa6c59764774aeb2cef801 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Fri, 9 Oct 2026 16:33:41 +0000 Subject: [PATCH] build: Reduce number of conan logs (#8548) --- .github/actions/build-deps/action.yml | 17 ++++++++++++---- .../workflows/reusable-build-test-config.yml | 3 --- .github/workflows/reusable-clang-tidy.yml | 1 - .github/workflows/upload-conan-deps.yml | 3 --- conan/profiles/default | 20 ++++++++++++------- 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/actions/build-deps/action.yml b/.github/actions/build-deps/action.yml index d38544b489..86e0f82b0b 100644 --- a/.github/actions/build-deps/action.yml +++ b/.github/actions/build-deps/action.yml @@ -15,9 +15,9 @@ inputs: required: false default: "false" log_verbosity: - description: "The logging verbosity." + description: 'The logging verbosity ("quiet", "verbose"), or empty to use the Conan defaults.' required: false - default: "verbose" + default: "" sanitizers: description: "The sanitizers to enable." required: false @@ -35,6 +35,16 @@ runs: LOG_VERBOSITY: ${{ inputs.log_verbosity }} SANITIZERS: ${{ inputs.sanitizers }} run: | + # By default, leave the verbosity unset, so CMake configure output is + # shown, but compile commands and Boost's b2 debug output (~85k lines + # when "verbose") are not. + VERBOSITY_ARGS=() + if [[ -n "${LOG_VERBOSITY}" ]]; then + VERBOSITY_ARGS=( + --conf:all tools.build:verbosity="${LOG_VERBOSITY}" + --conf:all tools.compilation:verbosity="${LOG_VERBOSITY}" + ) + fi conan install \ --profile:all ci \ --build="${BUILD_OPTION}" \ @@ -42,8 +52,7 @@ runs: --options:host='&:xrpld=True' \ --settings:all build_type="${BUILD_TYPE}" \ --conf:all tools.build:jobs=${BUILD_NPROC} \ - --conf:all tools.build:verbosity="${LOG_VERBOSITY}" \ - --conf:all tools.compilation:verbosity="${LOG_VERBOSITY}" \ + "${VERBOSITY_ARGS[@]}" \ --format=json \ . >"${RUNNER_TEMP}/conan-graph.json" diff --git a/.github/workflows/reusable-build-test-config.yml b/.github/workflows/reusable-build-test-config.yml index 103e848734..f5b92bc6f8 100644 --- a/.github/workflows/reusable-build-test-config.yml +++ b/.github/workflows/reusable-build-test-config.yml @@ -186,9 +186,6 @@ jobs: with: build_nproc: ${{ steps.nproc.outputs.nproc }} build_type: ${{ inputs.build_type }} - # Set the verbosity to "quiet" for Windows to avoid an excessive - # amount of logs. For other OSes, the "verbose" logs are more useful. - log_verbosity: ${{ runner.os == 'Windows' && 'quiet' || 'verbose' }} sanitizers: ${{ inputs.sanitizers }} - name: Configure CMake diff --git a/.github/workflows/reusable-clang-tidy.yml b/.github/workflows/reusable-clang-tidy.yml index 045125b763..ca78a61bd2 100644 --- a/.github/workflows/reusable-clang-tidy.yml +++ b/.github/workflows/reusable-clang-tidy.yml @@ -73,7 +73,6 @@ jobs: with: build_nproc: ${{ steps.nproc.outputs.nproc }} build_type: ${{ env.BUILD_TYPE }} - log_verbosity: verbose - name: Configure CMake working-directory: ${{ env.BUILD_DIR }} diff --git a/.github/workflows/upload-conan-deps.yml b/.github/workflows/upload-conan-deps.yml index ff8360d999..915562c596 100644 --- a/.github/workflows/upload-conan-deps.yml +++ b/.github/workflows/upload-conan-deps.yml @@ -108,9 +108,6 @@ jobs: build_nproc: ${{ steps.nproc.outputs.nproc }} build_type: ${{ matrix.build_type }} force_build: ${{ github.event_name == 'schedule' || github.event.inputs.force_source_build == 'true' }} - # Set the verbosity to "quiet" for Windows to avoid an excessive - # amount of logs. For other OSes, the "verbose" logs are more useful. - log_verbosity: ${{ runner.os == 'Windows' && 'quiet' || 'verbose' }} sanitizers: ${{ matrix.sanitizers }} - name: Check the Conan cache for Nix store references (Nix toolchain) diff --git a/conan/profiles/default b/conan/profiles/default index bb73ab3721..5441a07eff 100644 --- a/conan/profiles/default +++ b/conan/profiles/default @@ -60,8 +60,20 @@ tools.build:exelinkflags+={{ static_runtime_flags }} tools.info.package_id:confs+=["tools.build:exelinkflags"] {% endif %} -{% if os == "Macos" %} +{% if os == "Linux" and context == "build" %} +{# b2 links itself with its own script, which ignores exelinkflags #} +{# and only takes CXXFLAGS when use_cxx_env is set (see [buildenv] below). #} +[options] +b2/*:use_cxx_env=True +{% endif %} + [buildenv] +{# gRPC emits thousands of compiler warnings that we cannot act on. #} +{# CMake picks up CXXFLAGS, and unlike tools.build:cxxflags, #} +{# this is not part of the package ID, so binaries stay shareable. #} +grpc/*:CXXFLAGS=-w + +{% if os == "Macos" %} {# os.version adds -mmacosx-version-min to compiler command lines, #} {# but Boost.Context's b2 assembly (.S) rule ignores it, #} {# so those objects keep the host SDK version and still warn at link time. #} @@ -71,11 +83,5 @@ boost/*:MACOSX_DEPLOYMENT_TARGET={{ min_macos_version }} {% endif %} {% if os == "Linux" and context == "build" %} -{# b2 links itself with its own script, which ignores exelinkflags #} -{# and only takes CXXFLAGS when use_cxx_env is set. #} -[options] -b2/*:use_cxx_env=True - -[buildenv] b2/*:CXXFLAGS={{ static_runtime_flags | join(" ") }} {% endif %}