Skip to content

Commit

Permalink
Merge pull request arduino-libraries#151 from per1234/github-actions
Browse files Browse the repository at this point in the history
Use GitHub Actions for continuous integration
  • Loading branch information
aentinger authored Jan 13, 2021
2 parents 7a85845 + 8169895 commit 08f534e
Show file tree
Hide file tree
Showing 33 changed files with 199 additions and 165 deletions.
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
ignore-words-list = endianess
check-filenames =
check-hidden =
skip = ./.git
61 changes: 61 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Compile Examples

on:
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
push:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
# Scheduled trigger checks for breakage caused by changes to external resources (libraries, platforms)
schedule:
# run every Saturday at 3 AM UTC
- cron: "0 3 * * 6"
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:

jobs:
build:
runs-on: ubuntu-latest

env:
SKETCHES_REPORTS_PATH: sketches-reports

strategy:
fail-fast: false

matrix:
board:
- fqbn: arduino:samd:mkrwifi1010
- fqbn: arduino:samd:mkrvidor4000
- fqbn: arduino:megaavr:uno2018:mode=on

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Compile examples
uses: arduino/compile-sketches@main
with:
fqbn: ${{ matrix.board.fqbn }}
libraries: |
# Install the library from the local path.
- source-path: ./
# Install library dependencies.
- name: VidorPeripherals
sketch-paths: |
- ./examples/
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}

- name: Save memory usage change report as artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.SKETCHES_REPORTS_PATH }}
path: ${{ env.SKETCHES_REPORTS_PATH }}
21 changes: 21 additions & 0 deletions .github/workflows/report-size-deltas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Report Size Deltas

on:
schedule:
- cron: '*/5 * * * *'
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:

jobs:
report:
runs-on: ubuntu-latest

steps:
# See: https://github.com/arduino/actions/blob/master/libraries/report-size-deltas/README.md
- name: Comment size deltas reports to PRs
uses: arduino/report-size-deltas@main
with:
# The name of the workflow artifact created by the "Compile Examples" workflow
sketches-reports-source: sketches-reports
24 changes: 24 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Spell Check

on:
pull_request:
push:
schedule:
# Run every Saturday at 3 AM UTC to catch new misspelling detections resulting from dictionary updates.
- cron: "0 3 * * 6"
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:

jobs:
spellcheck:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

# See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
- name: Spell check
uses: codespell-project/actions-codespell@master
48 changes: 0 additions & 48 deletions .travis.yml

This file was deleted.

11 changes: 8 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
= WiFiNINA Library for Arduino =
// Define the repository information in these attributes
:repository-owner: arduino-libraries
:repository-name: WiFiNINA

image:https://travis-ci.org/arduino-libraries/WiFiNINA.svg?branch=master["Build Status", link="https://travis-ci.org/arduino-libraries/WiFiNINA"]
= {repository-name} library for Arduino =

image:https://github.com/{repository-owner}/{repository-name}/workflows/Compile%20Examples/badge.svg["Compile Examples Status", link="https://github.com/{repository-owner}/{repository-name}/actions?workflow=Compile+Examples"]
image:https://github.com/{repository-owner}/{repository-name}/workflows/Spell%20Check/badge.svg["Spell Check Status", link="https://github.com/{repository-owner}/{repository-name}/actions?workflow=Spell+Check"]

Enables network connection (local and Internet) with the Arduino MKR WiFi 1010, Arduino MKR VIDOR 4000 and Arduino UNO WiFi Rev.2.

With this library you can instantiate Servers, Clients and send/receive UDP packets through WiFi. The board can connect either to open or encrypted networks (WEP, WPA). The IP address can be assigned statically or through a DHCP. The library can also manage DNS.

For more information about this library please visit us at
http://www.arduino.cc/en/Reference/WiFiNINA
https://www.arduino.cc/en/Reference/{repository-name}

== License ==

Expand Down
6 changes: 3 additions & 3 deletions examples/AP_SimpleWebServer/AP_SimpleWebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A simple web server that lets you blink an LED via the web.
This sketch will create a new access point (with no password).
It will then launch a new server and print out the IP address
to the Serial monitor. From there, you can open that address in a web browser
to the Serial Monitor. From there, you can open that address in a web browser
to turn on and off the LED on pin 13.
If the IP address of your board is yourAddress:
Expand All @@ -22,7 +22,7 @@
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0; // your network key Index number (needed only for WEP)
int keyIndex = 0; // your network key index number (needed only for WEP)

int led = LED_BUILTIN;
int status = WL_IDLE_STATUS;
Expand Down Expand Up @@ -51,7 +51,7 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// by default the local IP address of will be 192.168.4.1
// by default the local IP address will be 192.168.4.1
// you can override it with the following:
// WiFi.config(IPAddress(10, 0, 0, 1));

Expand Down
7 changes: 3 additions & 4 deletions examples/ConnectNoEncryption/ConnectNoEncryption.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
This example connects to an unencrypted Wifi network.
This example connects to an unencrypted WiFi network.
Then it prints the MAC address of the board,
the IP address obtained, and other network details.
Expand All @@ -15,7 +14,7 @@
#include "arduino_secrets.h"
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
int status = WL_IDLE_STATUS; // the Wifi radio's status
int status = WL_IDLE_STATUS; // the WiFi radio's status

void setup() {
//Initialize serial and wait for port to open:
Expand All @@ -35,7 +34,7 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to Wifi network:
// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to open SSID: ");
Serial.println(ssid);
Expand Down
11 changes: 5 additions & 6 deletions examples/ConnectWithWEP/ConnectWithWEP.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
This example connects to a WEP-encrypted Wifi network.
Then it prints the MAC address of the Wifi module,
This example connects to a WEP-encrypted WiFi network.
Then it prints the MAC address of the WiFi module,
the IP address obtained, and other network details.
If you use 40-bit WEP, you need a key that is 10 characters long,
Expand All @@ -26,8 +25,8 @@
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0; // your network key Index number
int status = WL_IDLE_STATUS; // the Wifi radio's status
int keyIndex = 0; // your network key index number
int status = WL_IDLE_STATUS; // the WiFi radio's status

void setup() {
//Initialize serial and wait for port to open:
Expand All @@ -48,7 +47,7 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to Wifi network:
// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to WEP network, SSID: ");
Serial.println(ssid);
Expand Down
9 changes: 4 additions & 5 deletions examples/ConnectWithWPA/ConnectWithWPA.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
This example connects to an unencrypted Wifi network.
Then it prints the MAC address of the Wifi module,
This example connects to an unencrypted WiFi network.
Then it prints the MAC address of the WiFi module,
the IP address obtained, and other network details.
created 13 July 2010
Expand All @@ -16,7 +15,7 @@
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int status = WL_IDLE_STATUS; // the Wifi radio's status
int status = WL_IDLE_STATUS; // the WiFi radio's status

void setup() {
//Initialize serial and wait for port to open:
Expand All @@ -37,7 +36,7 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to Wifi network:
// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to WPA SSID: ");
Serial.println(ssid);
Expand Down
11 changes: 5 additions & 6 deletions examples/ConnectWithWPA2Enterprise/ConnectWithWPA2Enterprise.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This example connects to an WPA2 Enterprise WiFi network.
Then it prints the MAC address of the WiFi module,
This example connects to a WPA2 Enterprise WiFi network.
Then it prints the MAC address of the WiFi module,
the IP address obtained, and other network details.
Based on ConnectWithWPA.ino by dlf (Metodo2 srl) and Tom Igoe
Expand All @@ -13,7 +13,7 @@
char ssid[] = SECRET_SSID; // your WPA2 enterprise network SSID (name)
char user[] = SECRET_USER; // your WPA2 enterprise username
char pass[] = SECRET_PASS; // your WPA2 enterprise password
int status = WL_IDLE_STATUS; // the Wifi radio's status
int status = WL_IDLE_STATUS; // the WiFi radio's status

void setup() {
//Initialize serial and wait for port to open:
Expand All @@ -34,14 +34,13 @@ void setup() {
Serial.println("Please upgrade the firmware");
}

// attempt to connect to Wifi network:
// attempt to connect to WiFi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to WPA SSID: ");
Serial.println(ssid);
// Connect to WPA2 enterprise network:
// - You can optionally provide additional identity and CA cert (string) parameters:
// - You can optionally provide additional identity and CA cert (string) parameters if your network requires them:
// WiFi.beginEnterprise(ssid, user, pass, identity, caCert)
// . if your network requires them.
status = WiFi.beginEnterprise(ssid, user, pass);

// wait 10 seconds for connection:
Expand Down
5 changes: 2 additions & 3 deletions examples/ScanNetworks/ScanNetworks.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
This example prints the board's MAC address, and
scans for available Wifi networks using the NINA module.
scans for available WiFi networks using the NINA module.
Every ten seconds, it scans again. It doesn't actually
connect to any network, so no encryption scheme is specified.
Expand Down Expand Up @@ -56,7 +55,7 @@ void listNetworks() {
Serial.println("** Scan Networks **");
int numSsid = WiFi.scanNetworks();
if (numSsid == -1) {
Serial.println("Couldn't get a wifi connection");
Serial.println("Couldn't get a WiFi connection");
while (true);
}

Expand Down
1 change: 0 additions & 1 deletion examples/ScanNetworksAdvanced/ScanNetworksAdvanced.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*
This example prints the board's MAC address, and
scans for available WiFi networks using the NINA module.
Every ten seconds, it scans again. It doesn't actually
Expand Down
Loading

0 comments on commit 08f534e

Please sign in to comment.