Skip to content

Commit 481f960

Browse files
authored
Merge pull request arduino-libraries#159 from arduino-libraries/ci
Use GitHub Actions for continuous integration
2 parents 75a3c37 + 753cd95 commit 481f960

File tree

28 files changed

+292
-117
lines changed

28 files changed

+292
-117
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 = nd,
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: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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+
- fqbn: arduino:avr:mega
38+
platforms: |
39+
- name: arduino:avr
40+
- fqbn: arduino:avr:leonardo
41+
platforms: |
42+
- name: arduino:avr
43+
- fqbn: arduino:megaavr:uno2018
44+
platforms: |
45+
- name: arduino:megaavr
46+
- fqbn: arduino:megaavr:nona4809
47+
platforms: |
48+
- name: arduino:megaavr
49+
- fqbn: arduino:sam:arduino_due_x_dbg
50+
platforms: |
51+
- name: arduino:sam
52+
- fqbn: arduino:samd:arduino_zero_edbg
53+
platforms: |
54+
- name: arduino:samd
55+
- fqbn: arduino:samd:mkr1000
56+
platforms: |
57+
- name: arduino:samd
58+
- fqbn: arduino:samd:mkrzero
59+
platforms: |
60+
- name: arduino:samd
61+
- fqbn: arduino:samd:mkrwifi1010
62+
platforms: |
63+
- name: arduino:samd
64+
- fqbn: arduino:samd:mkrfox1200
65+
platforms: |
66+
- name: arduino:samd
67+
- fqbn: arduino:samd:mkrwan1300
68+
platforms: |
69+
- name: arduino:samd
70+
- fqbn: arduino:samd:mkrwan1310
71+
platforms: |
72+
- name: arduino:samd
73+
- fqbn: arduino:samd:mkrgsm1400
74+
platforms: |
75+
- name: arduino:samd
76+
- fqbn: arduino:samd:mkrnb1500
77+
platforms: |
78+
- name: arduino:samd
79+
- fqbn: arduino:samd:mkrvidor4000
80+
platforms: |
81+
- name: arduino:samd
82+
- fqbn: arduino:samd:nano_33_iot
83+
platforms: |
84+
- name: arduino:samd
85+
86+
steps:
87+
- name: Checkout repository
88+
uses: actions/checkout@v2
89+
90+
- name: Compile examples
91+
uses: arduino/compile-sketches@v1
92+
with:
93+
github-token: ${{ secrets.GITHUB_TOKEN }}
94+
fqbn: ${{ matrix.board.fqbn }}
95+
platforms: ${{ matrix.board.platforms }}
96+
libraries: |
97+
# Install the library from the local path.
98+
- source-path: ./
99+
# Additional library dependencies can be listed here.
100+
# See: https://github.com/arduino/compile-sketches#libraries
101+
sketch-paths: |
102+
- examples
103+
enable-deltas-report: true
104+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
105+
106+
- name: Save sketches report as workflow artifact
107+
uses: actions/upload-artifact@v2
108+
with:
109+
if-no-files-found: error
110+
path: ${{ env.SKETCHES_REPORTS_PATH }}
111+
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: 22 additions & 0 deletions
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

AUTHORS

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Alberto Panu https://github.com/bigjohnson
32
Alasdair Allan https://github.com/aallan
43
Alice Pintus https://github.com/00alis
@@ -33,6 +32,5 @@ Richard Sim
3332
Scott Fitzgerald https://github.com/shfitz
3433
Thibaut Viard https://github.com/aethaniel
3534
Tom Igoe https://github.com/tigoe
36-
WizNet http://www.wiznet.co.kr
35+
WIZnet http://www.wiznet.co.kr
3736
Zach Eveland https://github.com/zeveland
38-

README.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
= Ethernet Library for Arduino =
1+
:repository-owner: arduino-libraries
2+
:repository-name: Ethernet
3+
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"]
29

310
With the Arduino Ethernet Shield, this library allows an Arduino board to connect to the internet.
411

512
For more information about this library please visit us at
6-
https://www.arduino.cc/en/Reference/Ethernet
13+
https://www.arduino.cc/en/Reference/{repository-name}
714

815
== License ==
916

examples/AdvancedChatServer/AdvancedChatServer.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
to all connected clients but the client the message comes from.
66
To use, telnet to your device's IP address and type.
77
You can see the client's input in the serial monitor as well.
8-
Using an Arduino Wiznet Ethernet shield.
8+
Using an Arduino WIZnet Ethernet shield.
99
1010
Circuit:
1111
* Ethernet shield attached to pins 10, 11, 12, 13
@@ -42,11 +42,11 @@ EthernetClient clients[8];
4242
void setup() {
4343
// You can use Ethernet.init(pin) to configure the CS pin
4444
//Ethernet.init(10); // Most Arduino shields
45-
//Ethernet.init(5); // MKR ETH shield
45+
//Ethernet.init(5); // MKR ETH Shield
4646
//Ethernet.init(0); // Teensy 2.0
4747
//Ethernet.init(20); // Teensy++ 2.0
48-
//Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet
49-
//Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet
48+
//Ethernet.init(15); // ESP8266 with Adafruit FeatherWing Ethernet
49+
//Ethernet.init(33); // ESP32 with Adafruit FeatherWing Ethernet
5050

5151
// initialize the Ethernet device
5252
Ethernet.begin(mac, ip, myDns, gateway, subnet);

examples/BarometricPressureWebServer/BarometricPressureWebServer.ino

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ long lastReadingTime = 0;
6060
void setup() {
6161
// You can use Ethernet.init(pin) to configure the CS pin
6262
//Ethernet.init(10); // Most Arduino shields
63-
//Ethernet.init(5); // MKR ETH shield
63+
//Ethernet.init(5); // MKR ETH Shield
6464
//Ethernet.init(0); // Teensy 2.0
6565
//Ethernet.init(20); // Teensy++ 2.0
66-
//Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet
67-
//Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet
66+
//Ethernet.init(15); // ESP8266 with Adafruit FeatherWing Ethernet
67+
//Ethernet.init(33); // ESP32 with Adafruit FeatherWing Ethernet
6868

6969
// start the SPI library:
7070
SPI.begin();
@@ -92,7 +92,7 @@ void setup() {
9292
// start listening for clients
9393
server.begin();
9494

95-
// initalize the data ready and chip select pins:
95+
// initialize the data ready and chip select pins:
9696
pinMode(dataReadyPin, INPUT);
9797
pinMode(chipSelectPin, OUTPUT);
9898

@@ -104,7 +104,7 @@ void setup() {
104104
// give the sensor and Ethernet shield time to set up:
105105
delay(1000);
106106

107-
//Set the sensor to high resolution mode tp start readings:
107+
//Set the sensor to high resolution mode to start readings:
108108
writeRegister(0x03, 0x0A);
109109

110110
}
@@ -131,7 +131,7 @@ void getData() {
131131
//Read the temperature data
132132
int tempData = readRegister(0x21, 2);
133133

134-
// convert the temperature to celsius and display it:
134+
// convert the temperature to Celsius and display it:
135135
temperature = (float)tempData / 20.0;
136136

137137
//Read the pressure data highest 3 bits:
@@ -155,16 +155,16 @@ void listenForEthernetClients() {
155155
EthernetClient client = server.available();
156156
if (client) {
157157
Serial.println("Got a client");
158-
// an http request ends with a blank line
158+
// an HTTP request ends with a blank line
159159
bool currentLineIsBlank = true;
160160
while (client.connected()) {
161161
if (client.available()) {
162162
char c = client.read();
163163
// if you've gotten to the end of the line (received a newline
164-
// character) and the line is blank, the http request has ended,
164+
// character) and the line is blank, the HTTP request has ended,
165165
// so you can send a reply
166166
if (c == '\n' && currentLineIsBlank) {
167-
// send a standard http response header
167+
// send a standard HTTP response header
168168
client.println("HTTP/1.1 200 OK");
169169
client.println("Content-Type: text/html");
170170
client.println();

examples/ChatServer/ChatServer.ino

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
A simple server that distributes any incoming messages to all
55
connected clients. To use, telnet to your device's IP address and type.
66
You can see the client's input in the serial monitor as well.
7-
Using an Arduino Wiznet Ethernet shield.
7+
Using an Arduino WIZnet Ethernet shield.
88
99
Circuit:
1010
* Ethernet shield attached to pins 10, 11, 12, 13
@@ -37,13 +37,13 @@ bool alreadyConnected = false; // whether or not the client was connected previo
3737
void setup() {
3838
// You can use Ethernet.init(pin) to configure the CS pin
3939
//Ethernet.init(10); // Most Arduino shields
40-
//Ethernet.init(5); // MKR ETH shield
40+
//Ethernet.init(5); // MKR ETH Shield
4141
//Ethernet.init(0); // Teensy 2.0
4242
//Ethernet.init(20); // Teensy++ 2.0
43-
//Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet
44-
//Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet
43+
//Ethernet.init(15); // ESP8266 with Adafruit FeatherWing Ethernet
44+
//Ethernet.init(33); // ESP32 with Adafruit FeatherWing Ethernet
4545

46-
// initialize the ethernet device
46+
// initialize the Ethernet device
4747
Ethernet.begin(mac, ip, myDns, gateway, subnet);
4848

4949
// Open serial communications and wait for port to open:
@@ -94,6 +94,3 @@ void loop() {
9494
}
9595
}
9696
}
97-
98-
99-

examples/DhcpAddressPrinter/DhcpAddressPrinter.ino

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
This sketch uses the DHCP extensions to the Ethernet library
55
to get an IP address via DHCP and print the address obtained.
6-
using an Arduino Wiznet Ethernet shield.
6+
using an Arduino WIZnet Ethernet shield.
77
88
Circuit:
99
Ethernet shield attached to pins 10, 11, 12, 13
@@ -28,11 +28,11 @@ byte mac[] = {
2828
void setup() {
2929
// You can use Ethernet.init(pin) to configure the CS pin
3030
//Ethernet.init(10); // Most Arduino shields
31-
//Ethernet.init(5); // MKR ETH shield
31+
//Ethernet.init(5); // MKR ETH Shield
3232
//Ethernet.init(0); // Teensy 2.0
3333
//Ethernet.init(20); // Teensy++ 2.0
34-
//Ethernet.init(15); // ESP8266 with Adafruit Featherwing Ethernet
35-
//Ethernet.init(33); // ESP32 with Adafruit Featherwing Ethernet
34+
//Ethernet.init(15); // ESP8266 with Adafruit FeatherWing Ethernet
35+
//Ethernet.init(33); // ESP32 with Adafruit FeatherWing Ethernet
3636

3737
// Open serial communications and wait for port to open:
3838
Serial.begin(9600);
@@ -92,4 +92,3 @@ void loop() {
9292
break;
9393
}
9494
}
95-

0 commit comments

Comments
 (0)