Skip to content

Commit b03ae2e

Browse files
authored
Merge pull request #10 from per1234/ci
Modernize continuous integration system
2 parents 3b90c25 + d5471eb commit b03ae2e

12 files changed

+216
-53
lines changed

Diff for: .codespellrc

+7
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

Diff for: .github/dependabot.yml

+10
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

Diff for: .github/workflows/check-arduino.yml

+28
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

Diff for: .github/workflows/compile-examples.yml

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Compile Examples
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+
- "examples/**"
9+
- "src/**"
10+
pull_request:
11+
paths:
12+
- ".github/workflows/compile-examples.yml"
13+
- "examples/**"
14+
- "src/**"
15+
schedule:
16+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
17+
- cron: "0 8 * * TUE"
18+
workflow_dispatch:
19+
repository_dispatch:
20+
21+
jobs:
22+
build:
23+
name: ${{ matrix.board.fqbn }}
24+
runs-on: ubuntu-latest
25+
26+
env:
27+
SKETCHES_REPORTS_PATH: sketches-reports
28+
29+
strategy:
30+
fail-fast: false
31+
32+
matrix:
33+
board:
34+
- fqbn: arduino:avr:nano
35+
platforms: |
36+
- name: arduino:avr
37+
softwareserial: true
38+
- fqbn: arduino:avr:mega
39+
platforms: |
40+
- name: arduino:avr
41+
softwareserial: true
42+
- fqbn: arduino:avr:leonardo
43+
platforms: |
44+
- name: arduino:avr
45+
softwareserial: true
46+
- fqbn: arduino:megaavr:nona4809
47+
platforms: |
48+
- name: arduino:megaavr
49+
softwareserial: true
50+
- fqbn: arduino:sam:arduino_due_x_dbg
51+
platforms: |
52+
- name: arduino:sam
53+
softwareserial: false
54+
- fqbn: arduino:samd:mkrzero
55+
platforms: |
56+
- name: arduino:samd
57+
softwareserial: false
58+
- fqbn: arduino:mbed_portenta:envie_m4
59+
platforms: |
60+
- name: arduino:mbed_portenta
61+
softwareserial: false
62+
- fqbn: arduino:mbed_portenta:envie_m7
63+
platforms: |
64+
- name: arduino:mbed_portenta
65+
softwareserial: false
66+
- fqbn: arduino:mbed_nano:nano33ble
67+
platforms: |
68+
- name: arduino:mbed_nano
69+
softwareserial: false
70+
- fqbn: arduino:mbed_nano:nanorp2040connect
71+
platforms: |
72+
- name: arduino:mbed_nano
73+
softwareserial: false
74+
75+
# Make board type-specific customizations to the matrix jobs
76+
include:
77+
- board:
78+
# Boards with a SoftwareSerial library
79+
softwareserial: true
80+
# Compile these sketches in addition to the ones defined by env.UNIVERSAL_SKETCH_PATHS
81+
sketch-paths: |
82+
- examples/Arduino_Debug_Advance
83+
- board:
84+
softwareserial: false
85+
sketch-paths: ""
86+
87+
steps:
88+
- name: Checkout repository
89+
uses: actions/checkout@v2
90+
91+
- name: Compile examples
92+
uses: arduino/compile-sketches@v1
93+
with:
94+
github-token: ${{ secrets.GITHUB_TOKEN }}
95+
fqbn: ${{ matrix.board.fqbn }}
96+
platforms: ${{ matrix.board.platforms }}
97+
libraries: |
98+
# Install the library from the local path.
99+
- source-path: ./
100+
# Additional library dependencies can be listed here.
101+
# See: https://github.com/arduino/compile-sketches#libraries
102+
sketch-paths: |
103+
- examples/Arduino_Debug_Basic
104+
${{ matrix.sketch-paths }}
105+
enable-deltas-report: true
106+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
107+
108+
- name: Save sketches report as workflow artifact
109+
uses: actions/upload-artifact@v2
110+
with:
111+
if-no-files-found: error
112+
path: ${{ env.SKETCHES_REPORTS_PATH }}
113+
name: ${{ env.SKETCHES_REPORTS_PATH }}

Diff for: .github/workflows/report-size-deltas.yml

+24
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

Diff for: .github/workflows/spell-check.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Spell Check
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+
13+
jobs:
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

Diff for: .travis.yml

-46
This file was deleted.

Diff for: README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Arduino_DebugUtils
22
==================
33

4+
[![Check Arduino status](https://github.com/arduino-libraries/Arduino_DebugUtils/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_DebugUtils/actions/workflows/check-arduino.yml)
5+
[![Compile Examples status](https://github.com/arduino-libraries/Arduino_DebugUtils/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_DebugUtils/actions/workflows/compile-examples.yml)
6+
[![Spell Check status](https://github.com/arduino-libraries/Arduino_DebugUtils/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_DebugUtils/actions/workflows/spell-check.yml)
7+
48
This class provides functionality useful for debugging sketches via `printf`-style statements.
59

610
# How-To-Use Basic
@@ -23,7 +27,7 @@ float pi = 3.1459;
2327
Debug.print(DBG_VERBOSE, "i = %d, pi = %f", i, pi);
2428
```
2529

26-
If desired timestamps can be prefixed to the debug message. Timestamp output can be enabled and disabled via `timestampOn` and `timestampOff`.
30+
If desired, timestamps can be prefixed to the debug message. Timestamp output can be enabled and disabled via `timestampOn` and `timestampOff`.
2731

2832
# How-To-Use Advanced
2933
Normally all debug output is redirected to the primary serial output of each board (`Serial`). In case you want to redirect the output to another output stream you can make use of `setDebugOutputStream(&Serial2)`.

Diff for: examples/Arduino_Debug_Advance/Arduino_Debug_Advance.ino

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/*
22
Advanced Debug can be helpful in embedded applications when
3-
there are more that two microcontrollers connected serially
3+
there are more than two microcontrollers connected serially
44
or a wireless sensor like XBee is connected to the serial port
5-
that will send data wirelessly to other XBee node.
5+
that will send data wirelessly to other XBee nodes.
66
7-
In boards like Arduino Nano, UNO, MEGA only one serial port is available,
8-
therefore additional Software Serial ports can be made using SoftwareSerial
7+
In boards like Arduino Nano, UNO, or MEGA only one serial port is available,
8+
therefore additional software serial ports can be made using the
9+
SoftwareSerial library.
910
*/
1011

1112
#include "Arduino_DebugUtils.h"

Diff for: extras/codespell-ignore-words-list.txt

Whitespace-only changes.

Diff for: src/Arduino_DebugUtils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ bool Arduino_DebugUtils::shouldPrint(int const debug_level) const
120120
Arduino_DebugUtils Debug;
121121
void setDebugMessageLevel(int const debug_level) {
122122
Debug.setDebugLevel(debug_level);
123-
}
123+
}

Diff for: src/Arduino_DebugUtils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ class Arduino_DebugUtils {
7878

7979
extern Arduino_DebugUtils Debug;
8080

81-
#endif /* ARDUINO_DEBUG_UTILS_H_ */
81+
#endif /* ARDUINO_DEBUG_UTILS_H_ */

0 commit comments

Comments
 (0)