-
Notifications
You must be signed in to change notification settings - Fork 148
111 lines (97 loc) · 2.69 KB
/
check-code-formatting.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Check code formatting
on:
pull_request:
paths:
- ".github/workflows/check-code-formatting.yml"
- "megaavr/bootloaders/**"
# - "megaavr/cores/**"
- "megaavr/libraries/**"
- "megaavr/variants/**"
push:
paths:
- ".github/workflows/check-code-formatting.yml"
- "megaavr/bootloaders/**"
# - "megaavr/cores/**"
- "megaavr/libraries/**"
- "megaavr/variants/**"
# workflow_dispatch event allows the workflow to be triggered manually
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# repository_dispatch event allows the workflow to be triggered via the GitHub API
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:
env:
OPTIONS_FILE_PATH: megaavr/extras/ci/arduino-code-style.conf
NAME_PATTERNS: |
- '*.ino'
- '*.h'
- '*.hpp'
- '*.hh'
- '*.hxx'
- '*.h++'
- '*.cpp'
- '*.cc'
- '*.cxx'
- '*.c++'
- '*.cp'
- '*.c'
- '*.ipp'
- '*.ii'
- '*.ixx'
- '*.inl'
- '*.tpp'
- '*.txx'
- '*.tpl'
jobs:
bootloaders:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check code formatting
uses: per1234/artistic-style-action@main
with:
options-file-path: ${{ env.OPTIONS_FILE_PATH }}
name-patterns: |
${{ env.NAME_PATTERNS }}
target-paths: |
- megaavr/bootloaders
# cores:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Check code formatting
# uses: per1234/artistic-style-action@main
# with:
# options-file-path: ${{ env.OPTIONS_FILE_PATH }}
# name-patterns: |
# ${{ env.NAME_PATTERNS }}
# target-paths: |
# - megaavr/cores
libraries:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check code formatting
uses: per1234/artistic-style-action@main
with:
options-file-path: ${{ env.OPTIONS_FILE_PATH }}
name-patterns: |
${{ env.NAME_PATTERNS }}
target-paths: |
- megaavr/libraries
variants:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check code formatting
uses: per1234/artistic-style-action@main
with:
options-file-path: ${{ env.OPTIONS_FILE_PATH }}
name-patterns: |
${{ env.NAME_PATTERNS }}
target-paths: |
- megaavr/variants