Skip to content

Commit de47486

Browse files
Merge pull request #23 from leonardocavagnis/main
Add github workflows
2 parents 45fc30c + 318fe25 commit de47486

10 files changed

+225
-123
lines changed

Diff for: .github/dependabot.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# See: https://docs.github.com/en/code-security/supply-chain-security/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+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/dependabot/README.md
7+
# See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-actions-up-to-date-with-dependabot
8+
- package-ecosystem: github-actions
9+
directory: / # Check the repository's workflows under /.github/workflows/
10+
schedule:
11+
interval: daily
12+
labels:
13+
- "topic: infrastructure"

Diff for: .github/workflows/arduino-lint.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Arduino Lint
2+
on:
3+
push:
4+
pull_request:
5+
# Scheduled trigger checks for breakage caused by new rules added to Arduino Lint
6+
schedule:
7+
# run every Saturday at 3 AM UTC
8+
- cron: "0 3 * * 6"
9+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
10+
workflow_dispatch:
11+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
12+
repository_dispatch:
13+
14+
jobs:
15+
lint:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Arduino Lint
23+
uses: arduino/arduino-lint-action@v1
24+
with:
25+
official: true
26+
library-manager: update

Diff for: .github/workflows/compile-examples.yml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Compile Examples
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/compile-examples.yml"
7+
- "library.properties"
8+
- "examples/**"
9+
- "src/**"
10+
push:
11+
paths:
12+
- ".github/workflows/compile-examples.yml"
13+
- "library.properties"
14+
- "examples/**"
15+
- "src/**"
16+
# Scheduled trigger checks for breakage caused by changes to external resources (libraries, platforms)
17+
schedule:
18+
# run every Saturday at 3 AM UTC
19+
- cron: "0 3 * * 6"
20+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
21+
workflow_dispatch:
22+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
23+
repository_dispatch:
24+
25+
jobs:
26+
build:
27+
name: ${{ matrix.board.fqbn }}
28+
runs-on: ubuntu-latest
29+
30+
env:
31+
UNIVERSAL_SKETCH_PATHS: |
32+
- examples/backlight/SimpleBacklight
33+
- examples/basic/ArduinoLogoDrawing
34+
- examples/basic/SimpleText
35+
- examples/camera/display_camera
36+
- examples/gfx/geometrical-shapes
37+
- examples/gfx/hello-world
38+
- examples/gfx/touch-switch
39+
- examples/imu/accelerometer
40+
- examples/imu/gyroscope
41+
- examples/lvgl/bar_lvgl
42+
- examples/lvgl/button_lvgl
43+
- examples/lvgl/check_radio_lvgl
44+
- examples/lvgl/image_lvgl
45+
- examples/lvgl/imu_orientation
46+
- examples/lvgl/slider_lvgl
47+
- examples/microphone/PDMSerialPlotter
48+
- examples/rgb/SimpleRGB
49+
- examples/rgb/blink
50+
51+
SKETCHES_REPORTS_PATH: sketches-reports
52+
53+
strategy:
54+
fail-fast: false
55+
56+
matrix:
57+
board:
58+
- fqbn: arduino:mbed_portenta:envie_m7
59+
platform-name: arduino:mbed_portenta
60+
- fqbn: arduino:mbed_giga:giga
61+
platform-name: arduino:mbed_giga
62+
63+
include:
64+
- board:
65+
platform-name: arduino:mbed_portenta
66+
platforms: |
67+
# Install Arduino mbed_portenta Boards via Boards Manager
68+
- name: arduino:mbed_portenta
69+
- board:
70+
platform-name: arduino:mbed_giga
71+
platforms: |
72+
# Install Arduino mbed_giga Boards via Boards Manager
73+
- name: arduino:mbed_giga
74+
75+
steps:
76+
- name: Checkout
77+
uses: actions/checkout@v4
78+
79+
- name: Compile examples
80+
uses: arduino/compile-sketches@v1
81+
with:
82+
github-token: ${{ secrets.GITHUB_TOKEN }}
83+
platforms: ${{ matrix.platforms }}
84+
fqbn: ${{ matrix.board.fqbn }}
85+
libraries: |
86+
# Install the library from the local path.
87+
- source-path: ./
88+
- name: ArduinoGraphics
89+
- name: Arduino_GigaDisplayTouch
90+
- name: Arduino_BMI270_BMM150
91+
- name: Arduino_GigaDisplay_GFX
92+
- name: lvgl
93+
- name: Arducam_dvp
94+
sketch-paths: |
95+
${{ env.UNIVERSAL_SKETCH_PATHS }}
96+
enable-deltas-report: true
97+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
98+
99+
- name: Save memory usage change report as artifact
100+
uses: actions/upload-artifact@v3
101+
with:
102+
name: ${{ env.SKETCHES_REPORTS_PATH }}
103+
if-no-files-found: error
104+
path: ${{ env.SKETCHES_REPORTS_PATH }}

Diff for: .github/workflows/report-size-deltas.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Report Size Deltas
2+
3+
on:
4+
push:
5+
paths:
6+
- ".github/workflows/report-size-deltas.ya?ml"
7+
schedule:
8+
- cron: '*/5 * * * *'
9+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
10+
workflow_dispatch:
11+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
12+
repository_dispatch:
13+
14+
jobs:
15+
report:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
# See: https://github.com/arduino/actions/blob/master/libraries/report-size-deltas/README.md
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 "Compile Examples" workflow
24+
sketches-reports-source: sketches-reports

Diff for: .github/workflows/spell-check-task.yml

-70
This file was deleted.

Diff for: .github/workflows/spell-check.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Spell Check
2+
3+
on:
4+
pull_request:
5+
push:
6+
schedule:
7+
# Run every Saturday at 3 AM UTC to catch new misspelling detections resulting from dictionary updates.
8+
- cron: "0 3 * * 6"
9+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
10+
workflow_dispatch:
11+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
12+
repository_dispatch:
13+
14+
jobs:
15+
spellcheck:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
# See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
23+
- name: Spell check
24+
uses: codespell-project/actions-codespell@v2

0 commit comments

Comments
 (0)