Skip to content

Commit 3450eac

Browse files
committed
Add CI system
1 parent 6d70824 commit 3450eac

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Source: https://github.com/arduino/.github/blob/master/workflow-templates/compile-examples.md
2+
name: Compile Examples
3+
4+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5+
on:
6+
push:
7+
paths:
8+
- ".github/workflows/compile-examples.ya?ml"
9+
- "library.properties"
10+
- "examples/**"
11+
- "src/**"
12+
pull_request:
13+
paths:
14+
- ".github/workflows/compile-examples.ya?ml"
15+
- "library.properties"
16+
- "examples/**"
17+
- "src/**"
18+
schedule:
19+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
20+
- cron: "0 8 * * TUE"
21+
workflow_dispatch:
22+
repository_dispatch:
23+
24+
jobs:
25+
build:
26+
name: ${{ matrix.board.fqbn }}
27+
runs-on: ubuntu-latest
28+
29+
env:
30+
SKETCHES_REPORTS_PATH: sketches-reports
31+
32+
strategy:
33+
fail-fast: false
34+
35+
matrix:
36+
board:
37+
# TODO: Add list of boards to compile for here:
38+
- fqbn: arduino:mbed_portenta:envie_m7
39+
# TODO: Define the board's platform dependencies here.
40+
# See: https://github.com/arduino/compile-sketches#platforms
41+
platforms: |
42+
- name: arduino:mbed_portenta
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v2
47+
48+
- name: Compile examples
49+
uses: arduino/compile-sketches@v1
50+
with:
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
52+
fqbn: ${{ matrix.board.fqbn }}
53+
platforms: ${{ matrix.board.platforms }}
54+
libraries: |
55+
# Install the library from the local path.
56+
- source-path: ./
57+
# Additional library dependencies can be listed here.
58+
# See: https://github.com/arduino/compile-sketches#libraries
59+
- name: SD
60+
- name: TimeAlarms
61+
- name: TimeLib
62+
sketch-paths: |
63+
- examples
64+
enable-deltas-report: true
65+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
66+
67+
- name: Save sketches report as workflow artifact
68+
uses: actions/upload-artifact@v2
69+
with:
70+
if-no-files-found: error
71+
path: ${{ env.SKETCHES_REPORTS_PATH }}
72+
name: ${{ env.SKETCHES_REPORTS_PATH }}

0 commit comments

Comments
 (0)