Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Update continuous integration system #54

Merged
merged 10 commits into from
May 12, 2021
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
7 changes: 7 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See: https://github.com/codespell-project/codespell#using-a-config-file
[codespell]
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
ignore-words-list = ,
check-filenames =
check-hidden =
skip = ./.git,./src/utility/ioexpander/I2Cdev.*,./src/utility/ioexpander/TCA6424A.*,./src/utility/QEI,./src/utility/RS485,
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#about-the-dependabotyml-file
version: 2

updates:
# Configure check for outdated GitHub Actions actions in workflows.
# See: https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot
- package-ecosystem: github-actions
directory: / # Check the repository's workflows under /.github/workflows/
schedule:
interval: daily
28 changes: 28 additions & 0 deletions .github/workflows/check-arduino.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Check Arduino

# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
pull_request:
schedule:
# Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint.
- cron: "0 8 * * TUE"
workflow_dispatch:
repository_dispatch:

jobs:
lint:
runs-on: ubuntu-latest

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

- name: Arduino Lint
uses: arduino/arduino-lint-action@v1
with:
compliance: strict
library-manager: submit
# Always use this setting for official repositories. Remove for 3rd party projects.
official: true
project-type: library
44 changes: 13 additions & 31 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ on:
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "library.properties"
- "src/**"
- "examples/**"
push:
paths:
- ".github/workflows/compile-examples.yml"
- "library.properties"
- "src/**"
- "examples/**"
# Scheduled trigger checks for breakage caused by changes to external resources (libraries, platforms)
Expand All @@ -30,42 +32,16 @@ jobs:
compile-examples:
runs-on: ubuntu-latest

env:
ARDUINOCORE_MBED_STAGING_PATH: extras/ArduinoCore-mbed
ARDUINOCORE_API_STAGING_PATH: extras/ArduinoCore-API

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

# It's necessary to checkout the platform before installing it so that the ArduinoCore-API dependency can be added
- name: Checkout ArduinoCore-mbed
uses: actions/checkout@v2
with:
repository: arduino/ArduinoCore-mbed
# The arduino/actions/libraries/compile-examples action will install the platform from this path
path: ${{ env.ARDUINOCORE_MBED_STAGING_PATH }}

- name: Checkout ArduinoCore-API
uses: actions/checkout@v2
with:
repository: arduino/ArduinoCore-API
path: ${{ env.ARDUINOCORE_API_STAGING_PATH }}

- name: Install ArduinoCore-API
run: |
mv "${{ env.ARDUINOCORE_API_STAGING_PATH }}/api" "${{ env.ARDUINOCORE_MBED_STAGING_PATH }}/cores/arduino"

- name: Compile example sketches
uses: arduino/compile-sketches@main
uses: arduino/compile-sketches@v1
with:
fqbn: arduino:mbed:envie_m7
fqbn: arduino:mbed_portenta:envie_m7
platforms: |
# Install Arduino mbed-Enabled Boards via Boards Manager for the toolchain
- name: arduino:mbed
# Overwrite the Arduino mbed-Enabled Boards release version with version from the tip of the master branch (located in local path because of the need to first install ArduinoCore-API)
- source-path: extras/ArduinoCore-mbed
name: arduino:mbed
- name: arduino:mbed_portenta
enable-deltas-report: true
enable-warnings-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
Expand All @@ -74,21 +50,27 @@ jobs:
- name: Save memory usage change report as artifact
uses: actions/upload-artifact@v2
with:
if-no-files-found: error
path: ${{ env.SKETCHES_REPORTS_PATH }}
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}

report:
needs: compile-examples
# Only run the job when the workflow is triggered by a pull request from this repository (because arduino/report-size-deltas requires write permissions)
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
if: always() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- name: Download sketches reports artifact
id: download-artifact
continue-on-error: true # If compilation failed for all boards then there are no artifacts
uses: actions/download-artifact@v2
with:
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
path: ${{ env.SKETCHES_REPORTS_PATH }}

- uses: arduino/report-size-deltas@main
- name: Comment size deltas report to PR
uses: arduino/report-size-deltas@v1
# If actions/download-artifact failed, there are no artifacts to report from.
if: steps.download-artifact.outcome == 'success'
with:
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
22 changes: 22 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Spell Check

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

jobs:
spellcheck:
runs-on: ubuntu-latest

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

- name: Spell check
uses: codespell-project/actions-codespell@master
Loading