Skip to content

Commit 6fa9bcf

Browse files
authored
Merge pull request #9 from arduino-libraries/ci
Use GitHub Actions for continuous integration
2 parents 6ec34c1 + 8d2917e commit 6fa9bcf

File tree

10 files changed

+185
-9
lines changed

10 files changed

+185
-9
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 = ,
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: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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+
- "library.properties"
9+
- "examples/**"
10+
- "src/**"
11+
pull_request:
12+
paths:
13+
- ".github/workflows/compile-examples.yml"
14+
- "library.properties"
15+
- "examples/**"
16+
- "src/**"
17+
schedule:
18+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
19+
- cron: "0 8 * * TUE"
20+
workflow_dispatch:
21+
repository_dispatch:
22+
23+
jobs:
24+
build:
25+
name: ${{ matrix.board.fqbn }}
26+
runs-on: ubuntu-latest
27+
28+
env:
29+
SKETCHES_REPORTS_PATH: sketches-reports
30+
31+
strategy:
32+
fail-fast: false
33+
34+
matrix:
35+
board:
36+
- fqbn: arduino:mbed_nano:nano33ble
37+
platforms: |
38+
- name: arduino:mbed_nano
39+
libraries: |
40+
- name: Arduino_APDS9960
41+
- name: Arduino_HTS221
42+
- name: Arduino_LPS22HB
43+
- name: Arduino_LSM9DS1
44+
sketch-paths: examples/Nano33BLESenseFirmware
45+
- fqbn: arduino:samd:mkrwifi1010
46+
platforms: |
47+
- name: arduino:samd
48+
libraries: |
49+
- name: ArduinoBLE
50+
- name: Adafruit LSM9DS1 Library
51+
sketch-paths: examples/PhysicsLabFirmware
52+
53+
steps:
54+
- name: Checkout repository
55+
uses: actions/checkout@v2
56+
57+
- name: Compile examples
58+
uses: arduino/compile-sketches@v1
59+
with:
60+
github-token: ${{ secrets.GITHUB_TOKEN }}
61+
fqbn: ${{ matrix.board.fqbn }}
62+
platforms: ${{ matrix.board.platforms }}
63+
libraries: |
64+
# Install the library from the local path.
65+
- source-path: ./
66+
# Board-specific library dependencies
67+
${{ matrix.board.libraries }}
68+
sketch-paths: |
69+
${{ matrix.board.sketch-paths }}
70+
enable-deltas-report: true
71+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
72+
73+
- name: Save sketches report as workflow artifact
74+
uses: actions/upload-artifact@v2
75+
with:
76+
if-no-files-found: error
77+
path: ${{ env.SKETCHES_REPORTS_PATH }}
78+
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

README.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
= Arduino_ScienceJournal Library for Arduino =
1+
:repository-owner: arduino-libraries
2+
:repository-name: Arduino_ScienceJournal
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
Firmware for the Physics Lab kit and the Arduino Nano 33 BLE Sense.
411

examples/PhysicsLabFirmware/PhysicsLabFirmware.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ void setup() {
8181
digitalWrite(RESISTANCE_AUX_PIN, LOW);
8282

8383
if (!INA226.begin(0x45)) {
84-
Serial.println("Failled to initialized INA226!");
84+
Serial.println("Failed to initialized INA226!");
8585

8686
while (1);
8787
}
8888

8989
if (!imu.begin()) {
90-
Serial.println("Failled to initialized IMU!");
90+
Serial.println("Failed to initialized IMU!");
9191

9292
while (1);
9393
}
@@ -97,7 +97,7 @@ void setup() {
9797
imu.setupGyro(imu.LSM9DS1_GYROSCALE_245DPS);
9898

9999
if (!BLE.begin()) {
100-
Serial.println("Failled to initialized BLE!");
100+
Serial.println("Failed to initialized BLE!");
101101

102102
while (1);
103103
}

extras/BLE_spec BLE Sense Firmware.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
BLE Sense - BLE specifications.txt
22
==================================
33

4-
GAP (Adversisement)
4+
GAP (Advertisement)
55
-------------------
66
Local name: BLESense - <last 4 characters of BT address>
7-
Serivice UUID: 555a0002-0000-467a-9538-01f0652c74e8
7+
Service UUID: 555a0002-0000-467a-9538-01f0652c74e8
88

99

1010
GATT

extras/BLE_spec MKR Science Kit Firmware.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ MKR Science Kit Firmware - BLE specifications.txt
22
=================================================
33

44

5-
GAP (Adversisement)
5+
GAP (Advertisement)
66
-------------------
77
Local name: MKRSci<last 4 characters of BT address>
8-
Serivice UUID: 555a0001-0000-467a-9538-01f0652c74e8
8+
Service UUID: 555a0001-0000-467a-9538-01f0652c74e8
99

1010

1111
GATT
@@ -114,7 +114,7 @@ UUID: 555a0001-5001-467a-9538-01f0652c74e8
114114
Properties: notify
115115
Value size: 12 bytes
116116
Data format: Array of 3 x 32-bit IEEE floats (little endian)
117-
Description: X, Y, Z acceleration values in G's, if subscribed notification sent every 10 ms
117+
Description: X, Y, Z acceleration values in g's, if subscribed notification sent every 10 ms
118118

119119
Gyroscope Characteristic
120120
~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)