-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine cmake and c++ linter in one job (#185)
* Combine linters * Add whitelines to trigger formatting * Automatically applied linter * add linter PAT * Automatically applied linter * Remove new lines * rename linter job --------- Co-authored-by: GitHub Actions Bot <>
- Loading branch information
Showing
2 changed files
with
16 additions
and
37 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
name: cpp-linter | ||
name: Run all linters | ||
|
||
on: | ||
on: | ||
pull_request: | ||
branches: [master] | ||
|
||
branches: [ master, develop ] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
cpp-linter: | ||
linter: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.head_ref }} | ||
token: ${{ secrets.LINTER_PAT }} | ||
|
||
- name: Install clang-format | ||
if: inputs.apply_clang_format | ||
|
@@ -28,6 +30,12 @@ jobs: | |
run: | ||
echo "branchName=$GITHUB_BASE_REF" >> $GITHUB_OUTPUT | ||
|
||
- name: Format CMake files | ||
id: cmake-format | ||
uses: PuneetMatharu/[email protected] | ||
with: | ||
args: --config-files .cmake-format.py --in-place | ||
|
||
- name: Define base git diff args | ||
id: git-diff-args | ||
run: | | ||
|