Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/reusable-cpp-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down