Skip to content

Commit f5309c2

Browse files
authored
Merge pull request #4 from arduino-libraries/ci
Modernize continuous integration system
2 parents 0a04ffc + 26371f5 commit f5309c2

File tree

7 files changed

+219
-30
lines changed

7 files changed

+219
-30
lines changed

.codespellrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See: https://github.com/codespell-project/codespell#using-a-config-file
2+
[codespell]
3+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
4+
ignore-words-list = ,
5+
check-filenames =
6+
check-hidden =
7+
skip = ./.git

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# See: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#about-the-dependabotyml-file
2+
version: 2
3+
4+
updates:
5+
# Configure check for outdated GitHub Actions actions in workflows.
6+
# See: https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot
7+
- package-ecosystem: github-actions
8+
directory: / # Check the repository's workflows under /.github/workflows/
9+
schedule:
10+
interval: daily

.github/workflows/check-arduino.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check Arduino
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint.
9+
- cron: "0 8 * * TUE"
10+
workflow_dispatch:
11+
repository_dispatch:
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Arduino Lint
22+
uses: arduino/arduino-lint-action@v1
23+
with:
24+
compliance: specification
25+
library-manager: update
26+
# Always use this setting for official repositories. Remove for 3rd party projects.
27+
official: true
28+
project-type: library
Lines changed: 123 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,125 @@
11
name: Compile Examples
2-
on: [push, pull_request]
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/compile-examples.yml"
8+
- "library.properties"
9+
- "examples/**"
10+
- "src/**"
11+
pull_request:
12+
paths:
13+
- ".github/workflows/compile-examples.yml"
14+
- "library.properties"
15+
- "examples/**"
16+
- "src/**"
17+
schedule:
18+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
19+
- cron: "0 8 * * TUE"
20+
workflow_dispatch:
21+
repository_dispatch:
22+
323
jobs:
4-
build:
5-
runs-on: ubuntu-latest
6-
7-
strategy:
8-
matrix:
9-
fqbn: [
10-
"arduino:avr:uno",
11-
"arduino:samd:mkrzero"
12-
]
13-
14-
steps:
15-
- uses: actions/checkout@v1
16-
with:
17-
fetch-depth: 1
18-
- uses: arduino/actions/libraries/compile-examples@master
19-
with:
20-
fqbn: ${{ matrix.fqbn }}
21-
libraries: ArduinoRS485
24+
build:
25+
name: ${{ matrix.board.fqbn }}
26+
runs-on: ubuntu-latest
27+
28+
env:
29+
SKETCHES_REPORTS_PATH: sketches-reports
30+
31+
strategy:
32+
fail-fast: false
33+
34+
matrix:
35+
board:
36+
- fqbn: arduino:avr:nano
37+
platforms: |
38+
- name: arduino:avr
39+
- fqbn: arduino:avr:mega
40+
platforms: |
41+
- name: arduino:avr
42+
- fqbn: arduino:avr:leonardo
43+
platforms: |
44+
- name: arduino:avr
45+
- fqbn: arduino:avr:yun
46+
platforms: |
47+
- name: arduino:avr
48+
- fqbn: arduino:megaavr:uno2018
49+
platforms: |
50+
- name: arduino:megaavr
51+
- fqbn: arduino:megaavr:nona4809
52+
platforms: |
53+
- name: arduino:megaavr
54+
- fqbn: arduino:sam:arduino_due_x_dbg
55+
platforms: |
56+
- name: arduino:sam
57+
- fqbn: arduino:samd:arduino_zero_edbg
58+
platforms: |
59+
- name: arduino:samd
60+
- fqbn: arduino:samd:mkrzero
61+
platforms: |
62+
- name: arduino:samd
63+
- fqbn: arduino:samd:mkr1000
64+
platforms: |
65+
- name: arduino:samd
66+
- fqbn: arduino:samd:mkrwifi1010
67+
platforms: |
68+
- name: arduino:samd
69+
- fqbn: arduino:samd:mkrfox1200
70+
platforms: |
71+
- name: arduino:samd
72+
- fqbn: arduino:samd:mkrwan1300
73+
platforms: |
74+
- name: arduino:samd
75+
- fqbn: arduino:samd:mkrwan1310
76+
platforms: |
77+
- name: arduino:samd
78+
- fqbn: arduino:samd:mkrgsm1400
79+
platforms: |
80+
- name: arduino:samd
81+
- fqbn: arduino:samd:mkrnb1500
82+
platforms: |
83+
- name: arduino:samd
84+
- fqbn: arduino:samd:mkrvidor4000
85+
platforms: |
86+
- name: arduino:samd
87+
- fqbn: arduino:samd:nano_33_iot
88+
platforms: |
89+
- name: arduino:samd
90+
- fqbn: arduino:mbed_portenta:envie_m7
91+
platforms: |
92+
- name: arduino:mbed_portenta
93+
- fqbn: arduino:mbed_nano:nano33ble
94+
platforms: |
95+
- name: arduino:mbed_nano
96+
- fqbn: arduino:mbed_nano:nanorp2040connect
97+
platforms: |
98+
- name: arduino:mbed_nano
99+
100+
steps:
101+
- name: Checkout repository
102+
uses: actions/checkout@v2
103+
104+
- name: Compile examples
105+
uses: arduino/compile-sketches@v1
106+
with:
107+
github-token: ${{ secrets.GITHUB_TOKEN }}
108+
fqbn: ${{ matrix.board.fqbn }}
109+
platforms: ${{ matrix.board.platforms }}
110+
libraries: |
111+
# Install the library from the local path.
112+
- source-path: ./
113+
# Additional library dependencies
114+
- name: ArduinoRS485
115+
sketch-paths: |
116+
- examples
117+
enable-deltas-report: true
118+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
119+
120+
- name: Save sketches report as workflow artifact
121+
uses: actions/upload-artifact@v2
122+
with:
123+
if-no-files-found: error
124+
path: ${{ env.SKETCHES_REPORTS_PATH }}
125+
name: ${{ env.SKETCHES_REPORTS_PATH }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Report Size Deltas
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/report-size-deltas.yml"
8+
schedule:
9+
# Run at the minimum interval allowed by GitHub Actions.
10+
# Note: GitHub Actions periodically has outages which result in workflow failures.
11+
# In this event, the workflows will start passing again once the service recovers.
12+
- cron: "*/5 * * * *"
13+
workflow_dispatch:
14+
repository_dispatch:
15+
16+
jobs:
17+
report:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Comment size deltas reports to PRs
21+
uses: arduino/report-size-deltas@v1
22+
with:
23+
# The name of the workflow artifact created by the sketch compilation workflow
24+
sketches-reports-source: sketches-reports

.github/workflows/spell-check.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
name: Spell Check
2-
on: [push, pull_request]
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates.
9+
- cron: "0 8 * * TUE"
10+
workflow_dispatch:
11+
repository_dispatch:
12+
313
jobs:
4-
build:
5-
runs-on: ubuntu-latest
6-
7-
steps:
8-
- uses: actions/checkout@v1
9-
with:
10-
fetch-depth: 1
11-
- uses: arduino/actions/libraries/spell-check@master
14+
spellcheck:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Spell check
22+
uses: codespell-project/actions-codespell@master

README.adoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
= DMX Library for Arduino =
1+
:repository-owner: arduino-libraries
2+
:repository-name: ArduinoDMX
23

3-
image:https://github.com/arduino-libraries/ArduinoDMX/workflows/Compile%20Examples/badge.svg["Compile Examples Status", link="https://github.com/arduino-libraries/ArduinoDMX/actions?workflow=Compile+Examples"] image:https://github.com/arduino-libraries/ArduinoDMX/workflows/Spell%20Check/badge.svg["Spell Check Status", link="https://github.com/arduino-libraries/ArduinoDMX/actions?workflow=Spell+Check"]
4+
= {repository-name} Library for Arduino =
5+
6+
image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-arduino.yml/badge.svg["Check Arduino status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-arduino.yml"]
7+
image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/compile-examples.yml/badge.svg["Compile Examples status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/compile-examples.yml"]
8+
image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml/badge.svg["Spell Check status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml"]
49

510
Control DMX lights with your Arduino.
611

0 commit comments

Comments
 (0)