Skip to content

Commit ace5a3e

Browse files
cmaglieper1234
andauthored
Added sketch compile workflow (#7)
* Added sketch compile workflow * Temporarily disable delta reports * Simplify job * Update .github/workflows/compile-examples.yml Co-authored-by: Per Tillisch <accounts@perglass.com> * Removed useless 'type' tags in the matrix configuration * Added read permissions * Removed example --------- Co-authored-by: Per Tillisch <accounts@perglass.com>
1 parent 43256e8 commit ace5a3e

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Compile Examples
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/compile-examples.yml"
7+
- "library.properties"
8+
- "examples/**"
9+
- "src/**"
10+
push:
11+
paths:
12+
- ".github/workflows/compile-examples.yml"
13+
- "library.properties"
14+
- "examples/**"
15+
- "src/**"
16+
schedule:
17+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
18+
- cron: "0 8 * * TUE"
19+
workflow_dispatch:
20+
repository_dispatch:
21+
22+
jobs:
23+
build:
24+
name: ${{ matrix.board.fqbn }}
25+
runs-on: ubuntu-latest
26+
permissions: {
27+
contents: read
28+
}
29+
30+
env:
31+
LIBRARIES: |
32+
# Install the NetworkConfigurator library from the repository
33+
- source-path: ./
34+
- name: ArxContainer
35+
- name: ArxTypeTraits
36+
- name: DebugLog
37+
SKETCH_PATHS: |
38+
- examples/decoder_example
39+
- examples/dispatcher_example
40+
- examples/rpc_lite_client
41+
- examples/rpc_lite_server
42+
- examples/simple_client
43+
- examples/unpacker_test
44+
- examples/wrapper_example
45+
SKETCHES_REPORTS_PATH: sketches-reports
46+
strategy:
47+
fail-fast: false
48+
49+
matrix:
50+
board:
51+
- fqbn: arduino:samd:mkrwifi1010
52+
artifact-name-suffix: arduino-samd-mkrwifi1010
53+
- fqbn: arduino:samd:nano_33_iot
54+
artifact-name-suffix: arduino-samd-nano_33_iot
55+
- fqbn: arduino:mbed_portenta:envie_m7
56+
artifact-name-suffix: arduino-mbed_portenta-envie_m7
57+
- fqbn: arduino:mbed_nano:nanorp2040connect
58+
artifact-name-suffix: arduino-mbed_nano-nanorp2040connect
59+
- fqbn: arduino:mbed_nicla:nicla_vision
60+
artifact-name-suffix: arduino-mbed_nicla-nicla_vision
61+
- fqbn: arduino:mbed_opta:opta
62+
artifact-name-suffix: arduino-mbed_opta-opta
63+
- fqbn: arduino:mbed_giga:giga
64+
artifact-name-suffix: arduino-mbed_giga-giga
65+
- fqbn: arduino:renesas_portenta:portenta_c33
66+
artifact-name-suffix: arduino-renesas_portenta-portenta_c33
67+
- fqbn: arduino:renesas_uno:unor4wifi
68+
artifact-name-suffix: arduino-renesas_uno-unor4wifi
69+
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
74+
- name: Compile examples
75+
uses: arduino/compile-sketches@v1
76+
with:
77+
github-token: ${{ secrets.GITHUB_TOKEN }}
78+
platforms: ${{ matrix.platforms }}
79+
fqbn: ${{ matrix.board.fqbn }}
80+
libraries: ${{ env.LIBRARIES }}
81+
sketch-paths: ${{ env.SKETCH_PATHS }}
82+
#enable-deltas-report: 'true'
83+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
84+
85+
- name: Save memory usage change report as artifact
86+
if: github.event_name == 'pull_request'
87+
uses: actions/upload-artifact@v4
88+
with:
89+
if-no-files-found: error
90+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
91+
path: ${{ env.SKETCHES_REPORTS_PATH }}

0 commit comments

Comments
 (0)