Skip to content

Commit 9651c89

Browse files
authored
Add more auto-checks (#180)
Arduino lint and report size deltas (for PRs only)
1 parent b672ef0 commit 9651c89

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

.github/workflows/arduino_lint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Arduino Lint
2+
on:
3+
push:
4+
pull_request:
5+
# Allow manual trigger
6+
workflow_dispatch:
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: arduino/arduino-lint-action@v1
15+
with:
16+
project-type: library
17+
library-manager: update
18+
compliance: specification

.github/workflows/compile_examples.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ name: Compile Examples
44
on:
55
push:
66
paths:
7-
- ".github/workflows/compile_examples.yml"
7+
- ".github/workflows/**"
88
- "examples/**"
99
- "**.cpp"
1010
- "**.h"
1111
- "**.hpp"
1212
pull_request:
1313
paths:
14-
- ".github/workflows/compile_examples.yml"
14+
- ".github/workflows/**"
1515
- "examples/**"
1616
- "**.cpp"
1717
- "**.h"
@@ -69,4 +69,21 @@ jobs:
6969
with:
7070
if-no-files-found: error
7171
path: ${{ env.SKETCHES_REPORTS_PATH }}
72-
name: ${{ env.SKETCHES_REPORTS_PATH }}
72+
name: sketches-reports-artifact
73+
74+
# When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report
75+
report:
76+
needs: build # Wait for the compile job to finish to get the data for the report
77+
if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request
78+
runs-on: ubuntu-latest
79+
steps:
80+
# This step is needed to get the size data produced by the compile jobs
81+
- name: Download sketches reports artifact
82+
uses: actions/download-artifact@v2
83+
with:
84+
name: sketches-reports-artifact
85+
path: ${{ env.SKETCHES_REPORTS_PATH }}
86+
87+
- uses: arduino/report-size-deltas@v1
88+
with:
89+
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}

0 commit comments

Comments
 (0)