Skip to content

Commit ac87668

Browse files
authored
Merge pull request #11 from arduino-libraries/CI_addition
Added CI actions
2 parents 5670f29 + f6ddeec commit ac87668

10 files changed

+162
-6
lines changed

.github/dependabot.yml

+10
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

+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/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
+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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:avr:uno
35+
platforms: |
36+
- name: arduino:avr
37+
- fqbn: arduino:avr:mega
38+
platforms: |
39+
- name: arduino:avr
40+
- fqbn: arduino:avr:leonardo
41+
platforms: |
42+
- name: arduino:avr
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v2
47+
48+
- name: Compile examples
49+
uses: arduino/compile-sketches@v1
50+
with:
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
52+
fqbn: ${{ matrix.board.fqbn }}
53+
platforms: ${{ matrix.board.platforms }}
54+
libraries: |
55+
# Install the library from the local path.
56+
- source-path: ./
57+
sketch-paths: |
58+
- examples
59+
enable-deltas-report: true
60+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
61+
62+
- name: Save sketches report as workflow artifact
63+
uses: actions/upload-artifact@v2
64+
with:
65+
if-no-files-found: error
66+
path: ${{ env.SKETCHES_REPORTS_PATH }}
67+
name: ${{ env.SKETCHES_REPORTS_PATH }}
+24
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

+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/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.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
> **Note:** this library is deprecated and no longer maintained.
22
33
9 Axes Motion Library
4+
5+
[![Check Arduino status](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/check-arduino.yml)
6+
[![Compile Examples status](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/compile-examples.yml)
7+
[![Spell Check status](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/NineAxesMotion/actions/workflows/spell-check.yml)
8+
49
-----------
510
The NineAxesMotion.cpp and NineAxesMotion.h files are C++ wrapper codes for the
611
BNO055.c and BNO055.h Sensor API. The wrapper code has been designed to

src/NineAxesMotion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
********************************************************************************************************************************************************
1919
*
2020
* Fixed Wire Class,
21-
* Changed Motion.ino example to be connected allways with the pin D2 and
21+
* Changed Motion.ino example to be connected always with the pin D2 and
2222
* fixed the interrupt attach function
2323
*
2424
* Date: 04/26/2021

src/NineAxesMotion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
****************************************************************************
1919
*
2020
* Fixed Wire Class,
21-
* Changed Motion.ino example to be connected allways with the pin D2 and
21+
* Changed Motion.ino example to be connected always with the pin D2 and
2222
* fixed the interrupt attach function
2323
*
2424
* Date: 04/26/2021

src/utility/BNO055.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ BNO055_RETURN_FUNCTION_TYPE bno055_init(struct bno055_t *bno055)
106106
*/
107107
u_8 a_SW_ID_u_8[ARRAY_SIZE_TWO] = {
108108
BNO055_ZERO_U8X, BNO055_ZERO_U8X};
109-
/* stuct parameters are assign to bno055*/
109+
/* struct parameters are assign to bno055*/
110110
p_bno055 = bno055;
111111
/* Write the default page as zero*/
112112
com_rslt = p_bno055->BNO055_BUS_WRITE_FUNC

src/utility/BNO055.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
#ifdef __KERNEL__
8585

8686
#include <linux/types.h>
87-
/* singed integer type*/
87+
/* signed integer type*/
8888
typedef int8_t s_8;/**< used for signed 8bit */
8989
typedef int16_t s_16;/**< used for signed 16bit */
9090
typedef int32_t s_32;/**< used for signed 32bit */
@@ -4103,7 +4103,7 @@ BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_temp_celsius(
41034103
double *v_temp_d);
41044104
#endif
41054105
/**************************************************************************/
4106-
/**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYTEM CALIBRATION STATUS*/
4106+
/**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYSTEMCALIBRATION STATUS*/
41074107
/*************************************************************************/
41084108
/*!
41094109
* @brief This API used to read
@@ -4162,7 +4162,7 @@ u_8 *v_gyro_calib_u_8);
41624162
BNO055_RETURN_FUNCTION_TYPE bno055_get_sys_calib_stat(
41634163
u_8 *v_sys_calib_u_8);
41644164
/******************************************************************/
4165-
/**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYTEM SELF TEST */
4165+
/**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYSTEMSELF TEST */
41664166
/******************************************************************/
41674167
/*!
41684168
* @brief This API used to read

0 commit comments

Comments
 (0)