Skip to content

Commit fe89daa

Browse files
authored
Merge pull request #21 from per1234/update-ci
Expand CI system
2 parents 15bdb40 + de7362e commit fe89daa

File tree

10 files changed

+90
-12
lines changed

10 files changed

+90
-12
lines changed

.codespellrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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 = inot
5+
skip = ./.git
6+
builtin = clear,informal,en-GB_to_en-US
7+
check-filenames =
8+
check-hidden =

.github/workflows/check-arduino.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check Arduino
2+
3+
# See: https://docs.github.com/en/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: strict
25+
# Change this to "update" once the library is added to the index.
26+
library-manager: submit
27+
# Always use this setting for official repositories. Remove for 3rd party projects.
28+
official: true

.github/workflows/compile-examples.yml

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
11
name: Compile Examples
22

3+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
34
on:
45
pull_request:
56
paths:
67
- ".github/workflows/compile-examples.yml"
8+
- "library.properties"
79
- "examples/**"
810
- "src/**"
911
push:
1012
paths:
1113
- ".github/workflows/compile-examples.yml"
14+
- "library.properties"
1215
- "examples/**"
1316
- "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:
1422

1523
env:
1624
SKETCHES_REPORTS_PATH: sketches-reports
1725
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports
1826

1927
jobs:
2028
compile-test:
29+
name: compile for ${{ matrix.fqbn }}
2130
runs-on: ubuntu-latest
2231

2332
env:
@@ -63,7 +72,6 @@ jobs:
6372
uses: actions/checkout@v2
6473
with:
6574
repository: arduino/ArduinoCore-API
66-
# as specified at https://github.com/arduino/ArduinoCore-mbed/blob/master/README.md#installation
6775
path: ${{ env.ARDUINOCORE_API_STAGING_PATH }}
6876

6977
- name: Install ArduinoCore-API
@@ -94,24 +102,29 @@ jobs:
94102
verbose: 'true'
95103

96104
- name: Save memory usage change report as artifact
97-
if: github.event_name == 'pull_request'
98105
uses: actions/upload-artifact@v2
99106
with:
100107
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
108+
if-no-files-found: error
101109
path: ${{ env.SKETCHES_REPORTS_PATH }}
102110

103111
report-size-deltas:
104112
needs: compile-test
105-
# Only run the job when the workflow is triggered by a pull request from this repository (because arduino/report-size-deltas requires write permissions)
106-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
113+
# Run even if some compilations failed.
114+
if: always() && github.event_name == 'pull_request'
107115
runs-on: ubuntu-latest
108116
steps:
109117
- name: Download sketches reports artifact
118+
id: download-artifact
119+
continue-on-error: true # If compilation failed for all boards then there are no artifacts
110120
uses: actions/download-artifact@v2
111121
with:
112122
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
113123
path: ${{ env.SKETCHES_REPORTS_PATH }}
114124

115-
- uses: arduino/report-size-deltas@main
125+
- name: Comment size deltas report to PR
126+
uses: arduino/report-size-deltas@v1
127+
# If actions/download-artifact failed, there are no artifacts to report from.
128+
if: steps.download-artifact.outcome == 'success'
116129
with:
117130
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}

.github/workflows/spell-check.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Spell Check
2+
3+
# See: https://docs.github.com/en/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.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `Arduino_Threads` library for Arduino
2+
3+
[![Compile Examples status](https://github.com/arduino-libraries/Arduino_Threads/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_Threads/actions/workflows/compile-examples.yml)
4+
[![Check Arduino status](https://github.com/arduino-libraries/Arduino_Threads/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_Threads/actions/workflows/check-arduino.yml)
5+
[![Spell Check status](https://github.com/arduino-libraries/Arduino_Threads/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_Threads/actions/workflows/spell-check.yml)
6+
7+
This library makes it easy to use the multi-threading capability of [Arduino](https://www.arduino.cc/) boards that use an [Mbed OS](https://os.mbed.com/docs/mbed-os/latest/introduction/index.html)-based core library.

examples/Blocks/data_writer.inot

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
/*
33
* An 'int' SINK with a size of '0'. This kind of SINK has no buffer so the reading thread
4-
* will block until the writing thread has written something, or viceversa.
4+
* will block until the writing thread has written something, or vice versa.
55
*/
66
SINK(in, int, 0)
77

@@ -10,7 +10,7 @@ void setup() {
1010
}
1111

1212
void loop() {
13-
// Read an 'int' from the SINK and discards it. Since there is basically no delay in the loop
13+
// Read an 'int' from the SINK and discard it. Since there is basically no delay in the loop
1414
// this call will surely block until something comes from the connected SOURCE. In this case
1515
// the pace is dictated by the SOURCE that sends data every 100 ms.
1616
in.read();

examples/SharedResources/SharedVariables.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// The preprocessor should enforce that all variables belonging here are declared Shared
2-
// There's no risk to spill other variables around since they are all private memeber of the automatic class
2+
// There's no risk to spill other variables around since they are all private members of the automatic class
33

44
struct i2cScanResults {
55
uint8_t address[128];

examples/SharedResourcesVariousLibraries/SharedVariables.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// The preprocessor should enforce that all variables belonging here are declared Shared
2-
// There's no risk to spill other variables around since they are all private memeber of the automatic class
2+
// There's no risk to spill other variables around since they are all private members of the automatic class
33

44
struct i2cScanResults {
55
uint8_t address[128];

examples/i2c_concurrent/SharedVariables.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// The preprocessor should enforce that all variables belonging here are declared Shared
2-
// There's no risk to spill other variables around since they are all private memeber of the automatic class
2+
// There's no risk to spill other variables around since they are all private members of the automatic class
33

44
struct i2cScanResults {
55
uint8_t address[128];

library.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name=Arduino_Threads
22
version=0.0.1
33
author=Arduino
44
maintainer=Arduino <[email protected]>
5-
sentence=Easy multi-threading for your mbed based Arduino.
6-
paragraph=This library allows an easy access to the multi-threading capability inherent in all mbed based Arduino boards.
5+
sentence=Easy multi-threading for your Mbed OS-based Arduino.
6+
paragraph=This library allows an easy access to the multi-threading capability inherent in all Mbed OS-based Arduino boards.
77
category=Other
88
url=https://github.com/bcmi-labs/Arduino_Threads
99
architectures=mbed

0 commit comments

Comments
 (0)