From a138bd0a2fcf312d2ddf0ceacb5d7d8e9fa6dc38 Mon Sep 17 00:00:00 2001 From: Nuri Jung Date: Thu, 21 Mar 2024 14:46:27 +0900 Subject: [PATCH] feat: add --jobs parameter to action See cpp-linter/cpp-linter#92 for the related CLI updates. --- action.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 97ca0d24..26199385 100644 --- a/action.yml +++ b/action.yml @@ -107,6 +107,11 @@ inputs: description: Set this to true to enable PR reviews from clang-format.See also https://cpp-linter.github.io/cpp-linter/pr_review_caveats.html required: false default: false + jobs: + description: | + The number of jobs to run in parallel. If <= 0, the number of jobs is set to use the number of all available CPU cores. + required: false + default: 0 outputs: checks-failed: description: An integer that can be used as a boolean value to indicate if any checks failed by clang-tidy and clang-format. @@ -176,7 +181,8 @@ runs: --file-annotations=${{ inputs.file-annotations }} \ --extra-arg="${{ inputs.extra-args }}" \ --tidy-review="${{ inputs.tidy-review }}" \ - --format-review="${{ inputs.format-review }}" + --format-review="${{ inputs.format-review }}" \ + --jobs=${{ inputs.jobs }} - name: Setup python venv (Windows) if: runner.os == 'Windows' @@ -211,6 +217,7 @@ runs: ' --file-annotations=${{ inputs.file-annotations }}' + ' --extra-arg="${{ inputs.extra-args }}"' + ' --tidy-review="${{ inputs.tidy-review }}"' + - ' --format-review="${{ inputs.format-review }}"' + ' --format-review="${{ inputs.format-review }}"' + + ' --jobs=${{ inputs.jobs }}' Invoke-Expression -Command $app