Skip to content

Commit 7df4916

Browse files
authored
Merge pull request #9 from facchinm/ci-compile-examples
CI: Add smoke-test style compilation of all examples.
2 parents b189f6c + c0da6a7 commit 7df4916

File tree

4 files changed

+92
-1
lines changed

4 files changed

+92
-1
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Compile Examples
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/compile-examples.yml"
8+
- "examples/**"
9+
- "src/**"
10+
pull_request:
11+
paths:
12+
- ".github/workflows/compile-examples.yml"
13+
- "examples/**"
14+
- "src/**"
15+
schedule:
16+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
17+
- cron: "0 8 * * TUE"
18+
workflow_dispatch:
19+
repository_dispatch:
20+
21+
jobs:
22+
build:
23+
name: ${{ matrix.board.fqbn }}
24+
runs-on: ubuntu-latest
25+
26+
env:
27+
SKETCHES_REPORTS_PATH: sketches-reports
28+
29+
strategy:
30+
fail-fast: false
31+
32+
matrix:
33+
board:
34+
- fqbn: arduino:mbed_portenta:envie_m7
35+
platforms: |
36+
- name: arduino:mbed_portenta
37+
- fqbn: arduino:mbed_giga:giga
38+
platforms: |
39+
- name: arduino:mbed_giga
40+
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v3
44+
45+
- name: Compile examples
46+
uses: arduino/compile-sketches@v1
47+
with:
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
fqbn: ${{ matrix.board.fqbn }}
50+
platforms: ${{ matrix.board.platforms }}
51+
libraries: |
52+
# Install the library from the local path.
53+
- source-path: ./
54+
- name: Arduino_Portenta_OTA
55+
- name: Arduino_DebugUtils
56+
sketch-paths: |
57+
- examples
58+
enable-deltas-report: true
59+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
60+
61+
- name: Save sketches report as workflow artifact
62+
uses: actions/upload-artifact@v3
63+
with:
64+
if-no-files-found: error
65+
path: ${{ env.SKETCHES_REPORTS_PATH }}
66+
name: ${{ env.SKETCHES_REPORTS_PATH }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Report Size Deltas
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/report-size-deltas.yml"
8+
schedule:
9+
# Run at the minimum interval allowed by GitHub Actions.
10+
# Note: GitHub Actions periodically has outages which result in workflow failures.
11+
# In this event, the workflows will start passing again once the service recovers.
12+
- cron: "*/5 * * * *"
13+
workflow_dispatch:
14+
repository_dispatch:
15+
16+
jobs:
17+
report:
18+
runs-on: ubuntu-latest
19+
steps:
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 sketch compilation workflow
24+
sketches-reports-source: sketches-reports

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
`USBHostMbed5`
44
==============
5+
[![Compile Examples status](https://github.com/facchinm/USBHostMbed5/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/facchinm/USBHostMbed5/actions/workflows/compile-examples.yml)
56
[![Spell Check status](https://github.com/facchinm/USBHostMbed5/actions/workflows/spell-check.yml/badge.svg)](https://github.com/facchinm/USBHostMbed5/actions/workflows/spell-check.yml)
67
[![Sync Labels status](https://github.com/facchinm/USBHostMbed5/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/facchinm/USBHostMbed5/actions/workflows/sync-labels.yml)
78
[![Arduino Lint](https://github.com/facchinm/USBHostMbed5/workflows/Arduino%20Lint/badge.svg)](https://github.com/facchinm/USBHostMbed5/actions?workflow=Arduino+Lint)

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ sentence=Porting mbed5 usbhost library
66
paragraph=Porting mbed5 usbhost library
77
category=Communication
88
url=https://github.com/facchinm/USBHostMbed5
9-
architectures=mbed,mbed_portenta
9+
architectures=mbed,mbed_portenta,mbed_giga

0 commit comments

Comments
 (0)