-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (35 loc) · 1.19 KB
/
cpp-linter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: cpp-linter
on: [push, pull_request, workflow_dispatch]
jobs:
# check for duplicate jobs
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-20.04
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/[email protected]
with:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
paths_ignore: '["**/README.md", "**/docs/**"]'
do_not_skip: '["workflow_dispatch", "schedule"]'
cpp-linter:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- name: print skip check results
run: echo "should_skip=${{ needs.pre_job.outputs.should_skip }}, reason is ${{ needs.pre_job.outputs.reason }}"
- uses: actions/checkout@v3
- uses: cpp-linter/cpp-linter-action@v2
id: linter
with:
style: 'llvm'
files-changed-only: false
- name: Fail fast
if: steps.linter.outputs.checks-failed > 0
run: |
echo "Some files failed the linting checks!"
exit 1