Skip to content

Commit 6fee8c8

Browse files
authored
Use GitHub actions for continuous integration (arduino-libraries#26)
- On every pull request and push, compile appropriate examples for MKR1000, MKRGSM, Uno WiFi Rev2 - Comment on pull requests with a report of how the proposed changes affect memory usage - Check all files, except the external resource src/bearssl, for commonly misspelled words. In the event of false positives, add the word (in lower case) to extras/codespell-ignore-words-list.txt.
1 parent 73f4763 commit 6fee8c8

File tree

4 files changed

+107
-0
lines changed

4 files changed

+107
-0
lines changed
+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Compile Examples
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- .github/workflows/compile-examples.yml
7+
- examples/**
8+
- src/**
9+
push:
10+
paths:
11+
- .github/workflows/compile-examples.yml
12+
- examples/**
13+
- src/**
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
env:
20+
# libraries to install for all boards
21+
UNIVERSAL_LIBRARIES: |
22+
# install the ArduinoBearSSL library from the local path
23+
- source-path: ./
24+
- name: ArduinoECCX08
25+
# sketch paths to compile (recursive) for all boards
26+
UNIVERSAL_SKETCH_PATHS: '"examples/SHA1" "examples/SHA256"'
27+
28+
strategy:
29+
fail-fast: false
30+
31+
matrix:
32+
board:
33+
- fqbn: arduino:samd:mkr1000
34+
type: wifi101
35+
- fqbn: arduino:samd:mkrgsm1400
36+
type: gsm
37+
- fqbn: arduino:megaavr:uno2018
38+
type: megaavr
39+
40+
# make board type-specific customizations to the matrix jobs
41+
include:
42+
# WiFi101-compatible boards
43+
- board:
44+
type: wifi101
45+
libraries: |
46+
- name: WiFi101
47+
sketch-paths: '"examples/WiFiSSLClient"'
48+
# GSM boards
49+
- board:
50+
type: gsm
51+
libraries: |
52+
- name: MKRGSM
53+
sketch-paths: '"examples/MKRGSMSSLClient"'
54+
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v2
58+
59+
- name: Compile examples
60+
uses: per1234/actions/libraries/compile-examples@beaac5ae4bb7ab294f1305e436172fde4c281fc8
61+
with:
62+
fqbn: ${{ matrix.board.fqbn }}
63+
libraries: |
64+
${{ env.UNIVERSAL_LIBRARIES }}
65+
${{ matrix.libraries }}
66+
sketch-paths: ${{ env.UNIVERSAL_SKETCH_PATHS }} ${{ matrix.sketch-paths }}
67+
size-report-sketch: SHA256
68+
enable-size-deltas-report: true
69+
verbose: true
70+
71+
- name: Save sketches report as artifact
72+
if: github.event_name == 'pull_request'
73+
uses: actions/upload-artifact@v2
74+
with:
75+
name: size-deltas-reports
76+
path: size-deltas-reports
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Report Size Deltas
2+
3+
on:
4+
schedule:
5+
# schedule action for every five minutes (ends up being a little longer in practice)
6+
- cron: "*/5 * * * *"
7+
8+
jobs:
9+
report:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Comment size deltas reports to PRs
14+
uses: arduino/actions/libraries/report-size-deltas@master

.github/workflows/spell-check.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Spell Check
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
spellcheck:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
13+
- name: Spell check
14+
uses: arduino/actions/libraries/spell-check@master
15+
with:
16+
ignore-words-list: extras/codespell-ignore-words-list.txt
17+
skip-paths: ./extras/TrustAnchors,./src/bearssl

extras/codespell-ignore-words-list.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)