Skip to content

Commit a9ce4f0

Browse files
authored
Merge pull request #91 from arduino-libraries/ci
Modernize continuous integration system
2 parents df53bf5 + 2f2044d commit a9ce4f0

File tree

13 files changed

+200
-37
lines changed

13 files changed

+200
-37
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 = wan
5+
check-filenames =
6+
check-hidden =
7+
skip = ./.git,./examples/MKRWANFWUpdate_standalone/dev_table.c,./examples/MKRWANFWUpdate_standalone/stm32.*,./examples/MKRWANFWUpdate_standalone/utils.*

.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
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: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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:samd:mkrwan1300
35+
platforms: |
36+
- name: arduino:samd
37+
updater: true
38+
- fqbn: arduino:samd:mkrwan1310
39+
platforms: |
40+
- name: arduino:samd
41+
updater: true
42+
- fqbn: arduino:mbed_portenta:envie_m4
43+
platforms: |
44+
- name: arduino:mbed_portenta
45+
updater: false
46+
- fqbn: arduino:mbed_portenta:envie_m7
47+
platforms: |
48+
- name: arduino:mbed_portenta
49+
updater: true
50+
51+
# make board type-specific customizations to the matrix jobs
52+
include:
53+
- board:
54+
updater: true
55+
sketch-paths: |
56+
- examples/FWUpdaterBridge
57+
- examples/MKRWANFWUpdate_standalone
58+
- board:
59+
updater: false
60+
sketch-paths: ""
61+
62+
steps:
63+
- name: Checkout repository
64+
uses: actions/checkout@v2
65+
66+
- name: Compile examples
67+
uses: arduino/compile-sketches@v1
68+
with:
69+
github-token: ${{ secrets.GITHUB_TOKEN }}
70+
fqbn: ${{ matrix.board.fqbn }}
71+
platforms: ${{ matrix.board.platforms }}
72+
libraries: |
73+
# Install the library from the local path.
74+
- source-path: ./
75+
- name: LoRa
76+
sketch-paths: |
77+
# Compile these sketches for all boards
78+
- examples/DumbModemLoraSender
79+
- examples/FirstConfiguration
80+
- examples/LoraSendAndReceive
81+
# Board-specific sketches
82+
${{ matrix.sketch-paths }}
83+
enable-deltas-report: true
84+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
85+
86+
- name: Save sketches report as workflow artifact
87+
uses: actions/upload-artifact@v2
88+
with:
89+
if-no-files-found: error
90+
path: ${{ env.SKETCHES_REPORTS_PATH }}
91+
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

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# MKRWAN
22

3-
[![Build Status](https://travis-ci.org/arduino-libraries/MKRWAN.svg?branch=master)](https://travis-ci.org/arduino-libraries/MKRWAN)
3+
[![Check Arduino status](https://github.com/arduino-libraries/MKRWAN/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/MKRWAN/actions/workflows/check-arduino.yml)
4+
[![Compile Examples status](https://github.com/arduino-libraries/MKRWAN/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/MKRWAN/actions/workflows/compile-examples.yml)
5+
[![Spell Check status](https://github.com/arduino-libraries/MKRWAN/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/MKRWAN/actions/workflows/spell-check.yml)
46

5-
Provides APIs to communicate with LoRa and LoraWAN networks
7+
Provides APIs to communicate with LoRa and LoRaWAN networks
68

79
For more information about this library please visit us at
810
https://www.arduino.cc/en/Reference/MKRWAN

examples/DumbModemLoraSender/DumbModemLoraSender.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* https://github.com/sandeepmistry/arduino-LoRa
88
*
99
* Starting from https://github.com/sandeepmistry/arduino-LoRa/commit/5f62ed2ce9d1623bfc12f468b8152ba1878b5b16,
10-
* LoRa library knows about MKRWAN1300/1310 and automatically restarts the module in dumb mode, uses SPI1 and the correct gpios.
10+
* LoRa library knows about MKR WAN 1300/1310 and automatically restarts the module in dumb mode, uses SPI1 and the correct GPIOs.
1111
*
12-
* Since there is no IRQ pin available the host must poll for data (unfortunately)
12+
* Since there is no IRQ pin available, the host must poll for data (unfortunately)
1313
*
1414
*/
1515

@@ -30,8 +30,8 @@ void setup() {
3030

3131
Serial.println("LoRa Sender");
3232

33-
// Configure LoRa module to transmit and receive at 915MHz (915*10^6)
34-
// Replace 915E6 with the frequency you need (eg. 433E6 for 433MHz)
33+
// Configure LoRa module to transmit and receive at 915 MHz (915*10^6)
34+
// Replace 915E6 with the frequency you need (eg. 433E6 for 433 MHz)
3535
if (!LoRa.begin(915E6)) {
3636
Serial.println("Starting LoRa failed!");
3737
while (1);

examples/FirstConfiguration/FirstConfiguration.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void setup() {
2121
// put your setup code here, to run once:
2222
Serial.begin(115200);
2323
while (!Serial);
24-
Serial.println("Welcome to MKRWAN1300/1310 first configuration sketch");
24+
Serial.println("Welcome to MKR WAN 1300/1310 first configuration sketch");
2525
Serial.println("Register to your favourite LoRa network and we are ready to go!");
2626
// change this to your regional band (eg. US915, AS923, ...)
2727
if (!modem.begin(EU868)) {

0 commit comments

Comments
 (0)