From fbdcdf3306a43ddd5c9131bd1152204e8527a3a8 Mon Sep 17 00:00:00 2001 From: Lukas Burgholzer Date: Tue, 8 Sep 2026 12:49:28 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Allow=20a=20build=20target=20for=20?= =?UTF-8?q?C++=20lint=20preparation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let callers prepare generated headers without building the default target. Keep the existing full-build behavior when no target is supplied. Assisted-by: GPT-6 via Codex --- .github/workflows/reusable-cpp-linter.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-cpp-linter.yml b/.github/workflows/reusable-cpp-linter.yml index 6529b4b..af76afa 100644 --- a/.github/workflows/reusable-cpp-linter.yml +++ b/.github/workflows/reusable-cpp-linter.yml @@ -26,6 +26,10 @@ on: description: "Whether to build the project" default: false type: boolean + build-target: + description: "Optional CMake target to build before linting (empty builds the default target)" + default: "" + type: string use-sccache-gha: description: "Whether project builds use sccache with the GitHub Actions cache backend" default: true @@ -166,7 +170,14 @@ jobs: - name: Build if: ${{ inputs.build-project }} - run: cmake --build build + env: + BUILD_TARGET: ${{ inputs.build-target }} + run: | + args=() + if [[ -n "$BUILD_TARGET" ]]; then + args+=(--target "$BUILD_TARGET") + fi + cmake --build build "${args[@]}" - name: Verify sccache use if: ${{ inputs.build-project && inputs.use-sccache-gha }}