Skip to content

Commit 3240fc2

Browse files
Create compile-examples.yml
1 parent 0730db7 commit 3240fc2

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Source: https://github.com/per1234/.github/blob/main/workflow-templates/compile-examples-private.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+
workflow_dispatch:
19+
repository_dispatch:
20+
21+
env:
22+
UNIVERSAL_SKETCH_PATHS: |
23+
- examples/Barcode
24+
- examples/Keyboard
25+
- examples/KeyboardAndMouse
26+
- examples/Mouse
27+
SKETCHES_REPORTS_PATH: sketches-reports
28+
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports
29+
30+
jobs:
31+
build:
32+
name: ${{ matrix.board.fqbn }}
33+
runs-on: ubuntu-latest
34+
permissions:
35+
contents: read
36+
pull-requests: read
37+
38+
strategy:
39+
fail-fast: false
40+
41+
matrix:
42+
board:
43+
- fqbn: arduino:renesas_portenta:portenta_c33
44+
platforms: |
45+
- name: arduino:renesas_portenta
46+
artifact-name-suffix: arduino-renesas_portenta-portenta_c33
47+
48+
steps:
49+
- name: Checkout repository
50+
uses: actions/checkout@v4
51+
52+
- name: Compile examples
53+
uses: arduino/compile-sketches@v1
54+
with:
55+
github-token: ${{ secrets.GITHUB_TOKEN }}
56+
fqbn: ${{ matrix.board.fqbn }}
57+
platforms: ${{ matrix.board.platforms }}
58+
sketch-paths: |
59+
${{ env.UNIVERSAL_SKETCH_PATHS }}
60+
${{ matrix.board.additional-sketch-paths }}
61+
enable-deltas-report: true
62+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
63+
64+
- name: Save sketches report as workflow artifact
65+
uses: actions/upload-artifact@v4
66+
with:
67+
if-no-files-found: error
68+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
69+
path: ${{ env.SKETCHES_REPORTS_PATH }}

0 commit comments

Comments
 (0)