Skip to content

Commit

Permalink
Merge pull request #23 from leonardocavagnis/main
Browse files Browse the repository at this point in the history
Add github workflows
  • Loading branch information
leonardocavagnis committed May 20, 2024
2 parents 45fc30c + 318fe25 commit de47486
Show file tree
Hide file tree
Showing 10 changed files with 225 additions and 123 deletions.
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
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

0 comments on commit de47486

Please sign in to comment.