Skip to content

Add github workflows #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# See: https://docs.github.com/en/code-security/supply-chain-security/configuration-options-for-dependency-updates#about-the-dependabotyml-file
version: 2

updates:
# Configure check for outdated GitHub Actions actions in workflows.
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/dependabot/README.md
# See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-actions-up-to-date-with-dependabot
- package-ecosystem: github-actions
directory: / # Check the repository's workflows under /.github/workflows/
schedule:
interval: daily
labels:
- "topic: infrastructure"
26 changes: 26 additions & 0 deletions .github/workflows/arduino-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Arduino Lint
on:
push:
pull_request:
# Scheduled trigger checks for breakage caused by new rules added to Arduino Lint
schedule:
# run every Saturday at 3 AM UTC
- cron: "0 3 * * 6"
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Arduino Lint
uses: arduino/arduino-lint-action@v1
with:
official: true
library-manager: update
104 changes: 104 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Compile Examples

on:
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "library.properties"
- "examples/**"
- "src/**"
push:
paths:
- ".github/workflows/compile-examples.yml"
- "library.properties"
- "examples/**"
- "src/**"
# Scheduled trigger checks for breakage caused by changes to external resources (libraries, platforms)
schedule:
# run every Saturday at 3 AM UTC
- cron: "0 3 * * 6"
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:

jobs:
build:
name: ${{ matrix.board.fqbn }}
runs-on: ubuntu-latest

env:
UNIVERSAL_SKETCH_PATHS: |
- examples/backlight/SimpleBacklight
- examples/basic/ArduinoLogoDrawing
- examples/basic/SimpleText
- examples/camera/display_camera
- examples/gfx/geometrical-shapes
- examples/gfx/hello-world
- examples/gfx/touch-switch
- examples/imu/accelerometer
- examples/imu/gyroscope
- examples/lvgl/bar_lvgl
- examples/lvgl/button_lvgl
- examples/lvgl/check_radio_lvgl
- examples/lvgl/image_lvgl
- examples/lvgl/imu_orientation
- examples/lvgl/slider_lvgl
- examples/microphone/PDMSerialPlotter
- examples/rgb/SimpleRGB
- examples/rgb/blink

SKETCHES_REPORTS_PATH: sketches-reports

strategy:
fail-fast: false

matrix:
board:
- fqbn: arduino:mbed_portenta:envie_m7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool that we can compile for the Portenta H7 (M7 core) as well. If this library is compatible with the Portenta H7, could we mention this in the README?

platform-name: arduino:mbed_portenta
- fqbn: arduino:mbed_giga:giga
platform-name: arduino:mbed_giga

include:
- board:
platform-name: arduino:mbed_portenta
platforms: |
# Install Arduino mbed_portenta Boards via Boards Manager
- name: arduino:mbed_portenta
- board:
platform-name: arduino:mbed_giga
platforms: |
# Install Arduino mbed_giga Boards via Boards Manager
- name: arduino:mbed_giga

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Compile examples
uses: arduino/compile-sketches@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
platforms: ${{ matrix.platforms }}
fqbn: ${{ matrix.board.fqbn }}
libraries: |
# Install the library from the local path.
- source-path: ./
- name: ArduinoGraphics
- name: Arduino_GigaDisplayTouch
- name: Arduino_BMI270_BMM150
- name: Arduino_GigaDisplay_GFX
- name: lvgl
- name: Arducam_dvp
sketch-paths: |
${{ env.UNIVERSAL_SKETCH_PATHS }}
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}

- name: Save memory usage change report as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.SKETCHES_REPORTS_PATH }}
if-no-files-found: error
path: ${{ env.SKETCHES_REPORTS_PATH }}
24 changes: 24 additions & 0 deletions .github/workflows/report-size-deltas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Report Size Deltas

on:
push:
paths:
- ".github/workflows/report-size-deltas.ya?ml"
schedule:
- cron: '*/5 * * * *'
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:

jobs:
report:
runs-on: ubuntu-latest

steps:
# See: https://github.com/arduino/actions/blob/master/libraries/report-size-deltas/README.md
- name: Comment size deltas reports to PRs
uses: arduino/report-size-deltas@v1
with:
# The name of the workflow artifact created by the "Compile Examples" workflow
sketches-reports-source: sketches-reports
70 changes: 0 additions & 70 deletions .github/workflows/spell-check-task.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Spell Check

on:
pull_request:
push:
schedule:
# Run every Saturday at 3 AM UTC to catch new misspelling detections resulting from dictionary updates.
- cron: "0 3 * * 6"
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:

jobs:
spellcheck:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

# See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
- name: Spell check
uses: codespell-project/actions-codespell@v2
Loading
Loading