Skip to content
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

Update CI workflows to modern standards #40

Merged
merged 8 commits into from
Feb 4, 2021
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,./extras/TrustAnchors,./src/bearssl
32 changes: 23 additions & 9 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Compile Examples

# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
pull_request:
paths:
Expand All @@ -11,6 +12,11 @@ on:
- .github/workflows/compile-examples.yml
- examples/**
- src/**
schedule:
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
- cron: "0 8 * * TUE"
workflow_dispatch:
repository_dispatch:

jobs:
build:
Expand All @@ -23,7 +29,10 @@ jobs:
- source-path: ./
- name: ArduinoECCX08
# sketch paths to compile (recursive) for all boards
UNIVERSAL_SKETCH_PATHS: '"examples/SHA1" "examples/SHA256"'
UNIVERSAL_SKETCH_PATHS: |
- examples/SHA1
- examples/SHA256
SKETCHES_REPORTS_PATH: sketches-reports

strategy:
fail-fast: false
Expand All @@ -44,33 +53,38 @@ jobs:
type: wifi101
libraries: |
- name: WiFi101
sketch-paths: '"examples/WiFiSSLClient"'
sketch-paths: |
- examples/WiFiSSLClient
# GSM boards
- board:
type: gsm
libraries: |
- name: MKRGSM
sketch-paths: '"examples/MKRGSMSSLClient"'
sketch-paths: |
- examples/MKRGSMSSLClient

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

- name: Compile examples
uses: per1234/actions/libraries/compile-examples@beaac5ae4bb7ab294f1305e436172fde4c281fc8
uses: arduino/compile-sketches@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fqbn: ${{ matrix.board.fqbn }}
libraries: |
${{ env.UNIVERSAL_LIBRARIES }}
${{ matrix.libraries }}
sketch-paths: ${{ env.UNIVERSAL_SKETCH_PATHS }} ${{ matrix.sketch-paths }}
size-report-sketch: SHA256
enable-size-deltas-report: true
sketch-paths: |
${{ env.UNIVERSAL_SKETCH_PATHS }}
${{ matrix.sketch-paths }}
verbose: true
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}

- name: Save sketches report as artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v2
with:
name: size-deltas-reports
path: size-deltas-reports
path: ${{ env.SKETCHES_REPORTS_PATH }}
name: ${{ env.SKETCHES_REPORTS_PATH }}
15 changes: 13 additions & 2 deletions .github/workflows/report-size-deltas.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
name: Report Size Deltas

# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/report-size-deltas.yml"
schedule:
# schedule action for every five minutes (ends up being a little longer in practice)
# Run at the minimum interval allowed by GitHub Actions.
# Note: GitHub Actions periodically has outages which result in workflow failures.
# In this event, the workflows will start passing again once the service recovers.
- cron: "*/5 * * * *"
workflow_dispatch:
repository_dispatch:

jobs:
report:
runs-on: ubuntu-latest

steps:
- name: Comment size deltas reports to PRs
uses: arduino/actions/libraries/report-size-deltas@master
uses: arduino/report-size-deltas@main
with:
# The name of the workflow artifact created by the sketch compilation workflow
sketches-reports-source: sketches-reports
17 changes: 11 additions & 6 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
name: Spell Check

on: [push, pull_request]
# 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
- name: Checkout repository
uses: actions/checkout@v2

- name: Spell check
uses: arduino/actions/libraries/spell-check@master
with:
ignore-words-list: extras/codespell-ignore-words-list.txt
skip-paths: ./extras/TrustAnchors,./src/bearssl
uses: codespell-project/actions-codespell@master
Empty file.